Service switching method, electronic device and service switching system

By classifying clients and using the collaborative work between the server and the node, the problem of user experience decline caused by excessive server load is solved, and efficient and flexible client services are achieved.

CN113778716BActive Publication Date: 2025-05-27LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111074414.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-14
Publication Date
2025-05-27
Estimated Expiration
2041-09-14

AI Technical Summary

Technical Problem

In the desktop cloud client scenario, due to limited service capabilities, the server cannot provide effective services to a large number of clients at the same time, resulting in a decline in user experience.

Method used

By determining the self-start time and user information of the client, and combining the load information of the server, the client is divided into the first type of client and the second type of client. The first type of client provides services directly by the server, while the second type of client provides basic data services by nodes associated with the server.

Benefits of technology

This method effectively avoids errors caused by excessive server load, improves service efficiency and user experience, and realizes timely switching and flexibility of client services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113778716B_ABST
    Figure CN113778716B_ABST
Patent Text Reader

Abstract

The present application discloses a service switching method, an electronic device, and a service switching system. The method includes: determining at least one client connected to a server, and obtaining first data sent by the client; dividing the clients into a first type of clients and a second type of clients based on the first data and the load information of the server; in response to a service request of the first type of clients, providing a service by the server through a connection with the first type of clients; in response to a service request of the second type of clients, providing the requested service to the second type of clients by a node associated with the server, wherein basic data associated with the clients is installed in the node, and the service includes providing the basic data to the second type of clients. This method can provide services adapted to different types of clients, avoiding excessive load on the server caused by an overly large number of clients requesting services, thereby preventing errors from occurring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of interaction between a client and a server, and particularly to a service switching method, an electronic device, and a service switching system. Background Art

[0002] In a network, a client needs to interact with a server (such as a server). Especially in the usage scenario of a desktop cloud client, in order to achieve the same user experience as a traditional PC while ensuring performance requirements, it is necessary to install the user system on the client. However, the identities of users using the same client may be different. When users with different identities use the client, they need to use the operating system or other data corresponding to that identity, rather than the operating system corresponding to other identities. This requires the client to download the corresponding operating system and / or other data from the server to the local to reinstall the operating system. However, when a large number of clients obtain the required data from the server, due to limited service capabilities of the server, it cannot provide all effective services to a large number of clients simultaneously, resulting in a decline in the user experience. Summary of the Invention

[0003] A service switching method according to an embodiment of this application, the method includes:

[0004] Determine at least one client connected to the server, and obtain first data sent by the client;

[0005] Based on the first data and the load information of the server, divide the clients into first-class clients and second-class clients;

[0006] In response to the service requests of the first-class clients, the server provides services through the connections with the first-class clients;

[0007] In response to the service requests of the second-class clients, a node associated with the server provides the requested services to the second-class clients, where the node is installed with basic data associated with the clients, and the services include providing basic data services to the second-class clients.

[0008] Optionally, the first data includes at least one of the following: the self-start time of the client and the user information of the client. Correspondingly, based on the first data and the load information of the server, dividing the clients into first-class clients and second-class clients includes:

[0009] Based on the self-start time and the user information, divide the clients into first-class clients and second-class clients.

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

[0011] Determine a user weight corresponding to the client based on the user information;

[0012] Determine the client with the first user weight as the first type of client;

[0013] Perform a further differentiation operation on the client with the second user weight, where the differentiation operation includes: differentiating the client with the second user weight into the first type of client and the second type of client based on the load information and user information of the client with the second user weight.

[0014] Optionally, the method further includes:

[0015] Obtain a timestamp representing the self-start time of the client in the first data;

[0016] Construct a service queue based at least on the timestamp, where the service queue includes a plurality of object units for indicating services of the server, and the object units respectively correspond to their respective clients. Among them, the position of the first type of object unit corresponding to the first type of client in the service queue is different from the position of the second type of object unit corresponding to the second type of client in the service queue.

[0017] Optionally, the method further includes:

[0018] Adjust the service queue based on the service conditions of the server for the first type of client and the second type of client.

[0019] Optionally, adjusting the service queue based on the service conditions of the server for the first type of client and the second type of client includes:

[0020] When at least some of the first type of client and / or the second type of client complete downloading the required data packets, adjust the service queue based on the load information.

[0021] Optionally, the data packet includes an image file and user data, and the server providing services through the connection with the first type of client includes:

[0022] The server sends the image file and / or user data to the first type of client, so that the first type of client installs the operating system based on the obtained image file and / or uses the user data locally.

[0023] Optionally, the node is a hotspot machine. Responding to the service request of the second type of client, the node associated with the server provides the requested service to the second type of client, including:

[0024] Based on the first instruction, connect the second type of client to the hotspot machine to perform basic data interaction with the second type of client through the hotspot machine. Wherein, the second type of client accepts or waits for the response of the server while performing basic data interaction with the hotspot machine.

[0025] An embodiment of the present application also provides an electronic device, including:

[0026] An acquisition module configured to determine at least one client connected to the server and acquire first data sent by the client;

[0027] A partitioning module configured to partition the clients into a first type of client and a second type of client based on the first data and the load information of the server;

[0028] A processing module configured to respond to the service request of the first type of client and provide a service through the connection between the server and the first type of client;

[0029] Responding to the service request of the second type of client, the node associated with the server provides the requested service to the second type of client. Wherein, the basic data associated with the client is installed in the node, and the service includes providing the service of basic data to the second type of client.

[0030] An embodiment of the present application also provides a service switching system, including the server, the client, and the node as described above.

[0031] The service switching method can provide adapted services to different types of clients according to the actual needs of the clients and the actual situation of the load of the server itself, avoiding the situation where the number of clients requesting services is too large, resulting in an excessive load on the server and causing errors. Moreover, even if the load of the server and / or the situation of the client itself changes during the service provision process, the method can also re-switch the service to the client, improving the service efficiency, ensuring the effectiveness and flexibility of the service to the client, and enhancing user satisfaction. Description of the Drawings

[0032] Figure 1 It is a flowchart of the service switching method according to an embodiment of the present application;

[0033] Figure 2 For an embodiment of the present application Figure 1Flowchart of an embodiment of step S200;

[0034] Figure 3 Flowchart of an embodiment of the service switching method according to an embodiment of the present application;

[0035] Figure 4 Flowchart of a specific embodiment of the service switching method according to an embodiment of the present application;

[0036] Figure 5 Flowchart of another specific embodiment of the service switching method according to an embodiment of the present application;

[0037] Figure 6 Block diagram of the electronic device according to an embodiment of the present application. Detailed implementation manners

[0038] Reference is made herein to the various solutions and features of the present application with reference to the accompanying drawings.

[0039] It should be understood that various modifications can be made to the embodiments applied herein. Therefore, the above description should not be construed as limiting, but merely as an example of the embodiments. Those skilled in the art will think of other modifications within the scope and spirit of the present application.

[0040] The accompanying drawings included in and forming a part of the specification illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, are used to explain the principles of the present application.

[0041] These and other features of the present application will become apparent from the following description of the preferred forms of the embodiments given by way of non - limiting example with reference to the accompanying drawings.

[0042] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art can surely implement many other equivalent forms of the present application.

[0043] When combined with the accompanying drawings, the above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description.

[0044] Hereinafter, specific embodiments of the present application will be described with reference to the accompanying drawings; however, it should be understood that the embodiments applied are merely examples of the present application and can be implemented in various ways. Well - known and / or repetitive functions and structures are not described in detail to avoid obscuring the present application with unnecessary or redundant details. Therefore, the specific structural and functional details applied herein are not intended to be limiting, but merely as a basis for the claims and a representative basis for teaching those skilled in the art to use the present application in substantially any suitable detailed structure in a variety of ways.

[0045] This specification may use phrases such as "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 according to the present application.

[0046] A service switching method according to an embodiment of the present application, which can be applied to a server side (such as a server), and specifically can be applied to the interaction process between the server side and one or more clients. The server side can serve the clients according to the identity of the clients, its own load conditions, and the startup order of the clients, including using the server side itself to serve the first type of clients, and using associated nodes to serve the second type of clients. At the same time, the services are switched in a timely manner according to actual needs, so that even if the interaction process changes, services adapted to the clients can be provided, thereby ensuring the effectiveness of client services and improving user satisfaction.

[0047] As Figure 1 shown and in combination with Figure 4 , the method includes the following steps:

[0048] S100, determine at least one client connected to the server side, and obtain the first data sent by the client.

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

[0050] The server side can determine at least one client connected to it, such as by detecting the connection port, or by broadcasting to the clients and receiving feedback from the clients to determine the connected clients. Thereby, instructions can be sent to the clients to cause the clients to send the first data, so that the server side can obtain the first data through the corresponding communication line.

[0051] In addition, the client has a corresponding user identifier. After different users use the same client, the first data can change accordingly. For example, for a client originally used by a first user, if it is now used by a second user, when the identity information of the first user and the second user changes, the content of the first data sent by the client to the server side also changes accordingly.

[0052] S200. Based on the first data and the load information of the server, divide the client into a first type of client and a second type of client.

[0053] When the server (such as a server) is working, it has a load, which may include network load, hardware resource load, and / or software load, etc. The load information may be information related to the load and can characterize the current load situation of the server.

[0054] Based on the first data and the load information, the server can fully understand the information of each connected client and its own load situation. Therefore, based on the first data and the load information of the server, the clients can be classified, and at least divided into a first type of client and a second type of client. Clients of the same type have the same or similar status, identity, and / or interaction situation. For different types of clients, the service methods of the corresponding server are not the same. The server can uniformly process clients of the same type.

[0055] In this embodiment, after the server divides the clients into a first type of client and a second type of client, it can provide different services to the first type of client and the second type of client.

[0056] For example, in a specific embodiment, the first type of client divided has a higher identity priority and an earlier startup time, and requires the server to provide priority services; while the second type of client divided has a lower identity priority and a later startup time, and does not require the server to provide priority services.

[0057] S300. In response to the service request of the first type of client, the server provides services through the connection with the first type of client.

[0058] The first type of client sends a service request to the server to request the server to provide services to it, including providing the required files, programs, and / or user data corresponding to the client, etc. The server can directly provide the above services to the first type of client through the connection with the first type of client. Since the server directly provides services to the connected first type of client, the service quality is relatively high, such as the service efficiency is relatively high, and the first type of client can be given a complete service. For example, send the required data packet to the first type of client, and the data packet contains all the data required by the first type of client.

[0059] In addition, the server provides services through the connection with the first type of client, including providing services for it through the data path of the connection between the server and the first type of client. For example, the server sends a data packet to the first type of client through this data path, or receives the feedback information of the first type of client through this data path and further provides services for the first type of client according to the feedback information.

[0060] For the S400, in response to the service request of the second type of client, a node associated with the server provides the requested service to the second type of client, where the node is installed with basic data associated with the client, and the service includes providing the basic data to the second type of client.

[0061] Specifically, the node is associated with the server, and the node can be an intermediate device different from the server, an intermediate module (software and / or hardware), or other devices providing relay services.

[0062] After the second type of client sends a service request to the server, the server responds to the request and notifies the node to provide the service to the second type of client. This enables the second type of client to be provided with services through the node even when the server is busy and insufficient to provide complete services to all clients, especially the service of providing basic data, improving the service efficiency.

[0063] The basic data associated with the client is installed in the node, and the basic data includes the basic data required by the second type of client. In this way, the second type of client does not need to wait for the server to be idle and can receive the service of the basic data first. Once the server has additional service capabilities, such as after the load is reduced, it can convert some or all of the second type of clients into the first type of clients according to the first data of the second type of client, and the server directly provides complete services for them, realizing the timely switching of the services for the clients to adapt to the changing service process.

[0064] This service switching method can provide adapted services for different types of clients according to the actual needs of the clients and the actual situation of the server's own load, avoiding the situation where the number of clients requesting services is too large, resulting in an excessive load on the server and causing errors. Moreover, even if the load of the server and / or the client's own situation changes during the service provision process, this method can also realize the re-switching of the services for the clients, improving the service efficiency, ensuring the effectiveness and flexibility of the services for the clients, and increasing the user satisfaction.

[0065] In an embodiment of the present application, the first data includes at least one of the following: the self-start time of the client and the user information of the client. Correspondingly, based on the first data and the load information of the server, dividing the clients into the first type of clients and the second type of clients includes:

[0066] Dividing the clients into the first type of clients and the second type of clients based on the self-start time and the user information.

[0067] Specifically, the self-start time of the client is the time when the client starts its own small system (such as a microkernel system). After the client starts, it establishes a connection with the server. Generally, the service priority of a client with an earlier self-start time is higher than that of a client with a later self-start time. That is, relatively speaking, the server will first provide services to the client with an earlier self-start time.

[0068] The user information of the client can be the identification information of the client or the identity information of the user using the client. For example, in a school computer room, the teacher has a teacher client for their own use, and the student also has a student client for their own use. The user information of the teacher client is different from that of the student client.

[0069] Based on the self-start time and user information, the server divides the clients into first-class clients and second-class clients. For example, a part of all clients can be divided into first-class clients based on user information. For example, all teacher clients can be divided into first-class clients, so that the server can directly provide them with complete services. Subsequently, if the server still has service capabilities, the remaining clients can be further divided. For example, they can be divided according to the self-start time of the remaining clients. The student clients with an earlier self-start time can also be divided into first-class clients, while the student clients with a later self-start time can be divided into second-class clients. Of course, the judgment of the self-start time can be implemented based on a preset time standard.

[0070] In an embodiment of the present application, the first data includes the user information of the client. Based on the first data and the load information of the server, the clients are divided into first-class clients and second-class clients, as Figure 2 shown, including:

[0071] S210, based on the user information, determine the user weight corresponding to the client.

[0072] The client has its own weight. The division of the weight can be determined based on the user information of the client, the network location where it is located, and / or the processing capacity of the client itself. For example, the clients in the core network in the network have a higher corresponding weight, while the clients in the external network have a lower corresponding weight.

[0073] In this embodiment, the user weight corresponding to the client can be determined based on the user information. For example, if the user identity in the user information has a higher weight, it can be determined that the corresponding client has a higher user weight. On the contrary, it is determined that the user weight corresponding to the client is lower. In addition, the user information can be directly reflected by specific user-related data or can be based on the used account.

[0074] Of course, the user weights corresponding to different clients can also be the same. In the above specific embodiments, the second user weights of the clients used in the student identity are the same. The first user weight of the client used in the teacher identity is higher than the second user weight.

[0075] S220. Determine the client with the first user weight as the first type of client.

[0076] Since the first user weight is higher than other user weights, in order to give priority to serving the client with the first user weight, the server can determine the client with the first user weight as the first type of client.

[0077] The second user weight is lower than the first user weight. The server may not provide services for the clients with the second user weight for the time being. Instead, the node provides basic services for them.

[0078] S230. Perform a further differentiation operation on the client with the second user weight, where the differentiation operation includes: based on the load information and the user information of the client with the second user weight, differentiating the client with the second user weight into the first type of client and the second type of client.

[0079] The server directly provides services for the clients with the first user weight, and the number of clients with the first user weight may be limited, which means that the server still has additional service capabilities. In order to improve service efficiency, the server needs to further divide some or all of the second type of clients with the second user weight and convert some or all of the second type of clients into the first type of clients.

[0080] Combining the above embodiments of teachers and students again, for example, first divide the teacher client into the first type of client. After the server directly provides complete services for the first type of client, the server can, based on the current load and the user information of the client with the second user weight, further divide the remaining undivided clients and differentiate the clients with the second user weight into the first type of client and the second type of client. That is, divide a part of the remaining undivided clients into the first type of client and the other part into the second type of client.

[0081] For example, the second user weight of the client that has been provided with the basic data service but still needs the complete service is relatively high, and the second user weight of the client that has not been provided with the basic data service is relatively low. When the server further divides the remaining undivided clients, it can divide the clients that have been provided with the basic data service but still need the complete service into the first type of client, and the other clients can be divided into the second type of client.

[0082] In one embodiment of the present application, as Figure 3 shown, the method further includes the following steps:

[0083] S500, obtaining a timestamp in the first data that represents the self-start time of the client;

[0084] S600, constructing a service queue at least based on the timestamp, where the service queue includes a plurality of object units for indicating the services of the server, and the object units respectively correspond to their respective clients. Among them, the position of the first type of object unit corresponding to the first type of client in the service queue is different from the position of the second type of object unit corresponding to the second type of client in the service queue.

[0085] Specifically, the self-start time of the client corresponds to a timestamp, which is associated with the client, and the first data sent by the client to the server includes this timestamp.

[0086] When the server directly or indirectly provides services to the client, it is necessary to establish a service queue. The service queue is arranged with object units, and the object units contain specific service contents for indicating the services of the server. The server services the object units in the service queue.

[0087] The object unit is associated with the client. The first type of client corresponds to the first object unit, and 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. The position of the first object unit is ahead of that of the second object unit in the service queue, so that the server can process it first. And the sequence relationship of the same type of object units is also different. For example, for the object units with earlier timestamps in the first type of object units, their arrangement positions in the service queue are more forward, and the server services them first.

[0088] In one embodiment of the present application, the method further includes:

[0089] Adjusting the service queue based on the service conditions of the server for the first type of client and the second type of client.

[0090] Specifically, during the process of the server servicing different types of clients, the service conditions may change, and the server can adjust its service objects and methods based on the changed current state.

[0091] For example, during the service process for the first type of client, the server gradually completes the service tasks for the first type of client, and the number of the first type of object units in the service queue gradually decreases. To ensure the processing efficiency, the server can adjust the service for the second type of client, such as converting some of the second type of clients into the first type of clients. Furthermore, the positions of the object units corresponding to each client in the service queue are adjusted so that the server can serve them.

[0092] In an embodiment of the present application, the adjustment of the service queue based on the service conditions of the first type of client and the second type of client by the server includes:

[0093] When at least some of the first type of clients and / or the second type of clients complete downloading the required data packets, the service queue is adjusted based on the load information.

[0094] Specifically, the server sends data packets to the first type of clients according to the service requests of the clients. The data in the data packets is the data required by the first type of clients, and the first type of clients meet the specific needs of users based on the received data packets. For example, the data packets contain application programs, files, or other user data required by the users. Of course, the nodes associated with the server can also send data packets with only basic data to the second type of clients.

[0095] After a period of service, at least some of the first type of clients and / or the second type of clients complete downloading the data packets sent by the server or the nodes. At this time, the server can adjust the service object, that is, adjust the service queue. Specifically, the server can adjust the service queue based on the current load information. When the load decreases, the number of the first type of object units can be increased, and the position of the first type of object unit in the service queue is moved to the front.

[0096] In a specific embodiment, in combination with Figure 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 times out with a client in the remote connection mode, the server adjusts the order of the corresponding object unit C in the service queue, moves the object unit C corresponding to the disconnected client to the end of the service queue. After the heartbeat is restored, if the user information corresponding to this client has not changed, the order of the object unit C in the service queue remains unchanged. If the user information corresponding to this client has changed during the disconnection, the server inserts the object unit C into the service queue according to the progress information of all clients downloading data packets from the server. For example: the progress of downloading data packets of the disconnected client is 70.1%, the download progress of client A is 80.1%, and the download progress of client B is 60.2%. Then, the object unit C corresponding to the client restored after disconnection is inserted between the object unit A corresponding to client A and the object unit B corresponding to client B.

[0097] In an embodiment of the present application, the data packet includes an image file and user data. The server provides services through the connection with the first type of clients, including:

[0098] The server sends the image file and / or user data to the first type of clients, so that the first type of clients can install the operating system based on the obtained image file and / or use the user data locally.

[0099] Specifically, the image file can be an image file of the operating system or an image file of other application programs. After the server sends the image file to the first type of clients, the first type of clients can install the operating system based on this image file or install application programs based on this image file.

[0100] The user data can be relevant data that the user needs to use locally on the client, such as the required documents of the user and the data set that the client needs to process, etc.

[0101] The server directly sends the image file and user data to the first type of clients, so as to meet the needs of the first type of clients in a timely manner.

[0102] In an embodiment of the present application, the node is a hotspot machine. Responding to the service request of the second type of clients, the node associated with the server provides the requested service to the second type of clients, including:

[0103] Based on the first instruction, connect the second type of clients to the hotspot machine to perform basic data interaction with the second type of clients through the hotspot machine. Among them, while the second type of clients perform basic data interaction with the hotspot machine, they accept or wait for the response of the server.

[0104] Specifically, in combination with Figure 5 , the server connects the second type of client to the hotspot machine based on the first instruction (of course, the connection status between the second type of client and itself can also be maintained). The hotspot machine can provide basic data for the second type of client, and the hotspot machine and the second type of client perform basic data interaction. However, while the second type of client receives the basic services provided by the hotspot machine, it can also wait for the response of the server at the same time. When the load of the server decreases, the server can respond to the second type of client. Specifically, some of the second type of clients can be converted into the first type of clients according to the load information, so that the server can continue to serve the converted first type of clients. Thus, the stagnation of service resources is avoided, and the service resources are effectively utilized. At the same time, since the hotspot machine is used to provide basic services for some of the second clients first, the load on the server is avoided from being too large, so that even when a large number of clients all request to be served, corresponding services can be gradually provided to all clients, and finally all clients can obtain complete service content.

[0105] The embodiment of the present application also provides an electronic device, as Figure 6 shown, including:

[0106] An obtaining module, configured to determine at least one client connected to the server and obtain the first data sent by the client.

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

[0108] The obtaining module can determine at least one client connected to it, such as by detecting the connection port, or by broadcasting to the clients and receiving the feedback from the clients to determine the connected clients. Thus, the server can send instructions to the clients to make the clients send the first data, so that the server can obtain the first data through the corresponding communication lines.

[0109] In addition, the client has a corresponding user identifier. After different users use the same client, the first data can change accordingly. For example, for a client originally used by a first user, when it is now used by a second user, and the identity information of the first user and the second user changes, the content of the first data sent by the client to the server also changes accordingly.

[0110] A partitioning module configured to partition the clients into a first type of clients and a second type of clients based on the first data and the load information of the server.

[0111] The server (such as a server) has a load during operation, which may include network load, hardware resource load, and / or software load, etc., and the load information may be information related to the load, capable of characterizing the current load situation of the server.

[0112] Based on the first data and the load information, the partitioning module can fully master the information of each connected client and its own load situation. Thus, based on the first data and the load information of the server, the clients can be classified, at least into a first type of clients and a second type of clients. Clients of the same type have the same or similar status, identity, and / or interaction situation. For different types of clients, the service methods of the corresponding server are not the same. The server can uniformly process clients of the same type.

[0113] In this embodiment, after the partitioning module partitions the clients into a first type of clients and a second type of clients, the server can provide different services to the first type of clients and the second type of clients.

[0114] For example, in a specific embodiment, the first type of clients partitioned have a higher identity priority and an earlier startup time, and require the server to provide priority services; while the second type of clients partitioned have a lower identity priority and a later startup time, and do not require the server to provide priority services.

[0115] A processing module configured to respond to the service requests of the first type of clients and provide services through the connection between the server and the first type of clients.

[0116] In response to the service requests of the second type of clients, a node associated with the server provides the requested services to the second type of clients, where the basic data associated with the clients is installed in the node, and the services include providing basic data services to the second type of clients.

[0117] Specifically, the first type of clients send service requests to the server to request the processing module of the server to provide services to them, including providing required files, programs, and / or user data corresponding to the clients, etc. The processing module can directly provide the above services to the first type of clients through the connection with the first type of clients. Since the processing module directly provides services to the connected first type of clients, the service quality is relatively high, such as high service efficiency, and can provide complete services to the first type of clients. For example, sending the required data packets to the first type of clients, and the data packets contain all the data required by the first type of clients.

[0118] In addition, the processing module provides services through the connection between the server and the first type of client, including providing services through the data path of the connection between the server and the first type of client. For example, the server sends data packets to the first type of client through this data path, or receives feedback information from the first type of client through this data path and further provides services to the first type of client based on this feedback information.

[0119] In this embodiment, the node is associated with the server, and the node can be an intermediate device different from the server, an intermediate module (software and / or hardware), or other devices providing relay services.

[0120] After the second type of client sends a service request to the server, the processing module responds to the request and notifies the node to provide services to the second type of client. This enables the second type of client to be provided with services through the node even when the server is busy and insufficient to provide complete services to all clients, especially services that can provide basic data, improving service efficiency.

[0121] The basic data associated with the client is installed in the node, and the basic data includes the basic data required by the second type of client. In this way, the second type of client does not need to wait for the server to be idle and can receive the service of the basic data first. Once the processing module has additional service capabilities, such as after the load is reduced, it can convert some or all of the second type of clients into the first type of clients according to the first data of the second type of clients, and the processing module directly provides complete services for them, realizing the timely switching of services for clients to adapt to the changing service process.

[0122] In an embodiment of the present application, the first data includes at least one of the following: the self-start time of the client and the user information of the client. Correspondingly, the partitioning module is further configured as:

[0123] Based on the self-start time and the user information, partition the client into the first type of client and the second type of client.

[0124] In an embodiment of the present application, the first data includes the user information of the client, and the partitioning module is further configured as:

[0125] Based on the user information, determine the user weight corresponding to the client;

[0126] Determine the client with the first user weight as the first type of client;

[0127] Perform a further differentiation operation on the client with the second user weight, where the differentiation operation includes: differentiating the client with the second user weight into the first type of client and the second type of client based on the load information and the user information of the client with the second user weight.

[0128] In an embodiment of the present application, the processing module is further configured to:

[0129] Obtain the timestamp in the first data that represents the self-start time of the client;

[0130] Construct a service queue based at least on the timestamp, where the service queue includes a plurality of object units for indicating the services of the server, and each object unit corresponds to its respective client. Among them, the position of the first type of object unit corresponding to the first type of client in the service queue is different from the position of the second type of object unit corresponding to the second type of client in the service queue.

[0131] In an embodiment of the present application, the processing module is further configured to:

[0132] Adjust the service queue based on the service conditions of the server for the first type of client and the second type of client.

[0133] In an embodiment of the present application, the processing module is further configured to:

[0134] When at least some of the first type of clients and / or the second type of clients complete downloading the required data packets, adjust the service queue based on the load information.

[0135] In an embodiment of the present application, the data packet includes an image file and user data, and the processing module is further configured to:

[0136] Send the image file and / or user data from the server to the first type of client, so that the first type of client can install the operating system based on the obtained image file and / or use the user data locally.

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

[0138] Connect the second type of client to the hotspot machine based on the first instruction to perform basic data interaction with the second type of client through the hotspot machine. Among them, the second type of client accepts or waits for the response of the server while performing basic data interaction with the hotspot machine.

[0139] The embodiment of the present application further provides a service switching system, including the service end, the client, and the node as described above. The service end and the node provide services for the client.

[0140] The above embodiments are only exemplary embodiments of the present application and are not used to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art can make various modifications or equivalent replacements within the essence and protection scope of the present application, and such modifications or equivalent replacements should also be regarded as falling within the protection scope of the present application.

Claims

1. A service switching method, the method comprises: Determine at least one client connected to the server, and obtain first data sent by the client; Based on the first data and the load information of the server, divide the clients into first-class clients and second-class clients; In response to the service requests of the first-class clients, the server provides services through the connections with the first-class clients; In response to the service requests of the second-class clients, a node associated with the server provides the requested services to the second-class clients, wherein basic data associated with the clients is installed in the node, and the services include providing basic data to the second-class clients; wherein, The first data includes user information of the client, and the dividing the clients into first-class clients and second-class clients based on the first data and the load information of the server includes: Based on the user information, determine the user weight corresponding to the client; Determine the clients with a first user weight as first-class clients; Perform a further differentiation operation on the clients with a second user weight, where the differentiation operation includes: based on the load information and the user information of the clients with a second user weight, differentiate the clients with a second user weight into the first-class clients and the second-class clients.

2. The method according to claim 1, wherein the first data at least includes one of the following: the self-start time of the client and the user information of the client. Correspondingly, the dividing the clients into first-class clients and second-class clients based on the first data and the load information of the server comprises: Based on the self-start time and the user information, divide the clients into first-class clients and second-class clients.

3. The method according to claim 1, the method further comprises: Obtain a timestamp in the first data that characterizes the self-start time of the client; Construct a service queue based at least on the timestamp, where the service queue includes multiple object units for indicating the services of the server, and each object unit corresponds to a respective client, wherein the position of the first-class object unit corresponding to the first-class clients in the service queue is different from the position of the second-class object unit corresponding to the second-class clients in the service queue.

4. The method according to claim 3, the method further comprises: Adjust the service queue based on the service conditions of the server for the first-class clients and the second-class clients.

5. The method according to claim 4, the adjusting the service queue based on the service conditions of the server for the first-class clients and the second-class clients comprises: When at least some of the first-class clients and / or the second-class clients complete downloading the required data packets, adjust the service queue based on the load information.

6. The method according to claim 5, wherein the data packet includes an image file and user data, and the server provides services through a connection with the first type of client, including: The server sends the image file and / or user data to the first type of client, so that the first type of client can install the operating system based on the obtained image file and / or use the user data locally.

7. The method according to claim 1, wherein the node is a hotspot machine, and in response to the service request of the second type of client, a node associated with the server provides the requested service to the second type of client, including: Based on a first instruction, connect the second type of client to the hotspot machine 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.

8. An electronic device, including: An acquisition module configured to determine at least one client connected to the server and acquire first data sent by the client; A division module configured to divide the clients into a first type of client and a second type of client based on the first data and the load information of the server; A processing module configured to respond to the service request of the first type of client and provide services through a connection between the server and the first type of client; In response to the service request of the second type of client, a node associated with the server provides the requested service to the second type of client, wherein the node is installed with basic data associated with the client, and the service includes providing basic data services to the second type of client; wherein, The first data includes the user information of the client, and the division module is further configured to: Determine the user weight corresponding to the client based on the user information; Determine the client with the first user weight as the first type of client; Perform a further differentiation operation on the client with the second user weight, wherein the differentiation operation includes: based on the load information and the user information of the client with the second user weight, differentiating the client with the second user weight into the first type of client and the second type of client.

9. A service switching system, including a server, a client, and a node according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • High-definition video on demand interaction method and system

    CN107454075A

  • Load balancing method, device and system, computer equipment and storage medium

    CN112866394A