Business request method and device, server and storage medium
By having the client send request information at different times as instructed by the server in high-concurrency request scenarios, combined with business effects and geographical dispersion, the problem of high instantaneous server traffic is solved, achieving resource savings and improved user experience.
Patent Information
- Application Number
- CN202310047384.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-31
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2043-01-31
AI Technical Summary
Under high concurrency requests, the server experiences high instantaneous traffic and processing pressure, which can easily lead to access blockage, errors, or even crashes. Existing technologies such as message queue asynchronous processing solutions affect user experience and consume a lot of resources.
By distributing the extremely high QPS concurrent traffic, the client sends request information sequentially at different times to achieve different business functions. The traffic is allocated by using the time information mapping relationship of the server. Combined with business effects and geographical dispersion, the peak QPS is reduced.
It effectively reduces the instantaneous traffic and processing pressure on the server, saves server resources, and improves the user experience.
Smart Images

Figure CN116346927B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a service request method and device, a server and a storage medium. BACKGROUND
[0002] With the development of computer network technology, more and more users request service through network. However, each background server has its own service capacity limit, such as the number of queries per second (QPS), the number of transaction per second (TPS), etc. When a large number of users access the server in high concurrency (for example, in the scene of ticket rush, hot commodity or virtual resource rush), the request peak at a certain moment is very large. If the request peak exceeds the service capacity of the background server, access blocking, access error and other problems will occur, and even the server will crash. SUMMARY
[0003] The present disclosure provides a service request method, device, server and storage medium, which solves the problem of high instantaneous traffic and high processing pressure of the server caused by high concurrency request. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of the embodiments of the present disclosure, a service request method is provided, applied to a client, and the method comprises: the client acquires request indication information of a target service; the target service comprises a first service function and a second service function; the request indication information comprises first time information and second time information; the first time information is different from the second time information; the client sends first request information to a server according to the first time information to request to realize the first service function; and the client sends second request information to the server according to the second time information to request to realize the second service function.
[0005] Optionally, the first time information comprises a first preset time period; the client sends the first request information to the server according to the first time information to request to realize the first service function, comprising: the client sends the first request information to the server at any moment in the first preset time period to request to realize the first service function.
[0006] Optionally, the second time information comprises a second preset time period, and the second preset time period is a period of time after the first preset time period; the client sends the second request information to the server according to the second time information to request to realize the second service function, comprising: the client sends the second request information to the server at any moment in the second preset time period to request to realize the second service function.
[0007] Optionally, the method further comprises: the client displaying a first display special effect of the target service within a first preset time period; and the client displaying a second display special effect of the target service within a second preset time period.
[0008] Optionally, the first time information and the second time information are determined by the server according to region information of the client; different region information corresponds to different first time information, and / or different region information corresponds to different second time information.
[0009] According to a second aspect of the embodiments of the present disclosure, a service request method is provided, applied to a server, and the method comprises: the server sending request indication information of a target service to a client; the target service comprises a first service function and a second service function; the request indication information comprises first time information and second time information; the request indication information is used to instruct the client to send first request information to the server according to the first time information, and to send second request information to the server according to the second time information; the server provides the first service function for the client in response to the first request information sent by the client; and the server provides the second service function for the client in response to the second request information sent by the client.
[0010] Optionally, the server sending the request indication information of the target service to the client comprises: the server obtaining region information of the client; the server determining the first time information and the second time information corresponding to the client according to the region information, obtaining the request information, and sending the request information to the client.
[0011] Optionally, the first time information comprises a first preset time period, the second time information comprises a second preset time period, and the second preset time period is a period of time after the first preset time period; the server determining the first time information and the second time information corresponding to the client according to the region information comprises: the server determining the first preset time period corresponding to the client from a first mapping relationship comprising a plurality of region information and a plurality of first preset time periods according to the region information, and determining the second preset time period corresponding to the client from a second mapping relationship comprising a plurality of region information and a plurality of second preset time periods; different region information corresponds to different first preset time periods, and / or different region information corresponds to different second preset time periods.
[0012] According to a third aspect of the embodiments of the present disclosure, a service request apparatus is provided, applied to a client, and the apparatus comprises an obtaining unit and a sending unit; the obtaining unit is configured to obtain request indication information of a target service; the target service comprises a first service function and a second service function; the request indication information comprises first time information and second time information; the first time information is different from the second time information; the sending unit is configured to send first request information to a server according to the first time information to request implementation of the first service function; and the sending unit is further configured to send second request information to the server according to the second time information to request implementation of the second service function.
[0013] Optionally, the first time information comprises a first preset time period; and the sending unit is specifically configured to send the first request information to the server at any time in the first preset time period to request implementation of the first service function.
[0014] Optionally, the second time information comprises a second preset time period, and the second preset time period is a period of time after the first preset time period; and the sending unit is specifically configured to send the second request information to the server at any time in the second preset time period to request implementation of the second service function.
[0015] Optionally, the apparatus further comprises a display unit; the display unit is configured to display a first display special effect of the target service within the first preset time period, and display a second display special effect of the target service within the second preset time period.
[0016] Optionally, the first time information and the second time information are both determined by the server according to region information of the client; different region information corresponds to different first time information, and / or different region information corresponds to different second time information.
[0017] According to a fourth aspect of the embodiments of the present disclosure, a service request apparatus is provided, applied to a server, and the apparatus comprises a sending unit and a processing unit; the sending unit is configured to send request indication information of a target service to a client; the target service comprises a first service function and a second service function; the request indication information comprises first time information and second time information; the request indication information is used to instruct the client to send first request information to the server according to the first time information, and to send second request information to the server according to the second time information; and the processing unit is configured to provide the first service function for the client in response to the first request information sent by the client, and further configured to provide the second service function for the client in response to the second request information sent by the client.
[0018] Optionally, the sending unit is specifically configured to: acquire, by the server, the area information of the client; determine, by the server, the first time information and the second time information corresponding to the client according to the area information, obtain the request information, and send the request information to the client.
[0019] Optionally, the first time information comprises a first preset time period, and the second time information comprises a second preset time period, the second preset time period being a time period after the first preset time period; the sending unit is specifically configured to: determine, by the server according to the area information, the first preset time period corresponding to the client from a first mapping relationship comprising a plurality of area information and a plurality of first preset time periods, and determine, by the server, the second preset time period corresponding to the client from a second mapping relationship comprising a plurality of area information and a plurality of second preset time periods; wherein the first preset time period corresponding to different area information is different, and / or the second preset time period corresponding to different area information is different.
[0020] According to a fifth aspect of the embodiments of the present disclosure, an electronic device is provided, comprising: a processor, and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the service request method of the first aspect.
[0021] According to a sixth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, and the computer readable storage medium stores instructions, when the instructions in the computer readable storage medium are executed by a processor of a server, the server can execute the service request method of the first aspect.
[0022] The technical solutions provided by the present disclosure at least bring the following beneficial effects: the client acquires request indication information of a target service; the target service comprises a first service function and a second service function; the request indication information comprises first time information and second time information; the first time information is different from the second time information. The client sends first request information to the server according to the first time information to request to implement the first service function; the client sends second request information to the server according to the second time information to request to implement the second service function. Since the first time information is different from the second time information, the client sends the first request information and the second request information in sequence at different times to request to implement the first service function and the second service function in batches. In this way, the concurrent requests generated at the same time can be allocated to different times to generate, so as to disperse the concurrent traffic with extremely high QPS, thereby greatly reducing the peak QPS, and further solving the problem of high instantaneous traffic and high processing pressure of the server.
[0023] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0024] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate an embodiment consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure without imposing on the disclosure any undue limitation.
[0025] Figure 1 is a high-concurrency traffic generation schematic diagram according to an exemplary embodiment;
[0026] Figure 2 is a server deployment schematic diagram according to an exemplary embodiment;
[0027] Figure 3 is a structure schematic diagram of a service request system according to an exemplary embodiment;
[0028] Figure 4 is one of flow schematic diagrams of a service request method according to an exemplary embodiment;
[0029] Figure 5 is one of traffic dispersion effect schematic diagrams according to an exemplary embodiment;
[0030] Figure 6 is another flow schematic diagram of a service request method according to an exemplary embodiment;
[0031] Figure 7 is a region division schematic diagram according to an exemplary embodiment;
[0032] Figure 8 is another traffic dispersion effect schematic diagram according to an exemplary embodiment;
[0033] Figure 9 is a third traffic dispersion effect schematic diagram according to an exemplary embodiment;
[0034] Figure 10 is one of structure schematic diagrams of a service request device according to an exemplary embodiment;
[0035] Figure 11 is another structure schematic diagram of a service request device according to an exemplary embodiment;
[0036] Figure 12 is a structure schematic diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0037] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings.
[0038] It should be noted that the terms "first", "second", etc. in the description of the present disclosure and claims and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0039] In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, " / " means or, for example, A / B can mean A or B. "And / or" herein is merely a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "multiple" means two or more than two.
[0040] It should be noted that the user information (including but not limited to user device information, user personal information, user behavior information, etc.) and data (including but not limited to program code, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties.
[0041] Before explaining the embodiments of the present disclosure in detail, some related technologies involved in the embodiments of the present disclosure are introduced.
[0042] QPS, i.e. query rate per second, is a measure of how much traffic a particular query server can handle in a specified time. On the Internet, the performance of a machine as a domain name system server is often measured by the query rate per second.
[0043] With the development of computer network technology, more and more users obtain services from servers through the network, such as users using clients to send service requests to servers, at which time the server needs to process the service requested by the user (such as allocating virtual resources to the user). Among them, the service can be a service in an application or a webpage, such as a red envelope grabbing activity, a lucky draw activity, etc. in a network live room. The virtual resource can be virtual currency, virtual coupons, etc.
[0044] However, within applications (APPs) with high daily active users (DAU), when launching large-scale events (such as a Chinese New Year red envelope giveaway where rewards are distributed to all APP users simultaneously), a large number of clients simultaneously request event-related services from the server. In this situation, the number of users approaches the server's peak concurrent users (PCU).
[0045] However, each backend server has its own service capacity limitations, such as QPS and transactions per second (TPS). When a large number of users access the server concurrently (e.g., in scenarios like ticket rushing, buying popular goods, or virtual resources), the request peak can be extremely large at a certain moment. Figure 1 As shown, if a large number of users access the server at 8:00 PM to request business processing, the server's QPS (Queries Per Second) at that time will reach a peak of 100 million. If the peak request volume exceeds the service capacity of the backend server, problems such as access blockage and access errors will occur, and it may even lead to server crashes.
[0046] like Figure 2 As shown, when a large number of users access the server concurrently, the peak request volume at a certain moment can be extremely high, potentially reaching hundreds of millions of QPS. Typically, handling user access requires servers with different functionalities configured together, such as an Nginx server providing web resources, an API server providing application programming interface (API) services, an RPC server providing remote procedure call (RPC) services, and a storage server providing storage resources. An average 8C instance server can handle 2000 QPS. To handle hundreds of millions of QPS, 50,000 servers with different functionalities would need to be deployed, which undoubtedly consumes enormous resources and is prohibitively expensive.
[0047] In some related technologies, to handle high-concurrency traffic, high-concurrency traffic is sent to a message queue (MQ) for asynchronous processing. For example, message consumption in the MQ can be rate-limited to reduce the business's dependence on server resources. While the MQ solution can save some server resources, the asynchronous processing and the backlog of massive messages can lead to situations where the business cannot obtain results synchronously, thus impacting the user experience.
[0048] To solve the above problems, the disclosure provides a service request method, which disperses the concurrent traffic with extremely high QPS, thereby greatly reducing the peak QPS, and further greatly saving the server resources for coping with the burst of extremely high traffic, and reducing the pressure of the server.
[0049] The service request method provided by the embodiments of the disclosure can be applied to a service request system, Figure 3 A structural schematic diagram of the service request system is shown. As shown in Figure 3 The service request system 10 includes a plurality of clients 11 and a server 12. Each client 11 is in communication connection with the server 12 through wired communication or wireless communication.
[0050] In some embodiments, the client 11 can be a terminal device used by a user, such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) \ virtual reality (VR) device, etc. The embodiments of the disclosure do not specially limit the specific form of the client 11.
[0051] In some embodiments, the server 12 can be a server, a server cluster composed of multiple servers, or a cloud platform control center. The embodiments of the disclosure do not limit this. Figure 3 For example, a server is taken as an example.
[0052] After introducing the application scenario and implementation environment of the embodiments of the disclosure, the service request method provided by the embodiments of the disclosure is introduced in detail.
[0053] Figure 4 A flowchart of a service request method according to some exemplary embodiments is shown. In some embodiments, the above service request method can be applied to the client and the server as shown in Figure 3 The service request method can also be applied to other similar devices.
[0054] As shown in Figure 4 The service request method provided by the embodiments of the disclosure includes the following S201-S203.
[0055] S201, the server sends request indication information of a target service to the client.
[0056] The target service includes a first service function and a second service function. The request indication information includes first time information and second time information. The first time information is different from the second time information.
[0057] As a possible implementation, before the target service starts, the server sends the request indication information of the target service to the client, to instruct the client to request the target service from the server according to the request indication information.
[0058] It should be noted that the service refers to a service provided by one entity unit (such as a server) to another entity unit (such as a client). The service function is the function of the service implementation. The developer can design the target service, and design the first service function and the second service function for the target service.
[0059] The time information can be a time point or a time period, and the specific content of the time information is not limited in the embodiments of the present disclosure. The first time information and the second time information can be pre-configured by the server and sent to the client after the configuration is completed.
[0060] S202, the client sends first request information to the server according to the first time information, to request to implement the first service function.
[0061] As a possible implementation, after the client obtains the request indication information of the target service, the client sends the first request information to the server according to the first time information in the request indication information.
[0062] For example, the first time information includes a first preset time period. The client can send the first request information to the server at any time in the first preset time period, to request to implement the first service function.
[0063] Correspondingly, the server provides the first service function for the client in response to the first request information sent by the client.
[0064] In some embodiments, the server provides the first service function for the client, so that the client displays the first display special effect of the target service within the first preset time period.
[0065] For example, the target service can be a service corresponding to a red envelope rain activity, and the first display special effect can be a raining special effect of the red envelope rain activity. The client sends the first request information to the server at 20:00:00, the server provides the first service function for the client in response to the first request information sent by the client, and the client displays the raining special effect of the red envelope rain activity to the user for 13 seconds.
[0066] For example, the target service can be a service corresponding to a red envelope rain activity, and the first display special effect can be a raining special effect of the red envelope rain activity. The client sends the first request information to the server at 20:00:00, the server provides the first service function for the client in response to the first request information sent by the client, and the client displays the raining special effect of the red envelope rain activity to the user for 13 seconds. Figure 5As shown, the client shows the red envelope rain special effect to the user from 20:00:00 to 20:00:13, and the special effect display time is 13 seconds, and the server is provided with 13 seconds of processing time during the special effect display. That is, the special effect display disperses the instant business special effect, so that the original instant traffic of 100 million QPS is reduced to 770 million / 13 = 770 million.
[0067] S203, the client sends second request information to the server according to the second time information to request to realize the second business function.
[0068] As a possible implementation manner, after the client obtains the request indication information of the target business, the client sends the second request information to the server according to the second time information in the request indication information.
[0069] For example, the second time information includes a second preset time period, and the second preset time period is a period of time after the first preset time period. The client sends the second request information to the server at any time in the second preset time period to request to realize the second business function.
[0070] Correspondingly, the server provides the second business function for the client in response to the second request information sent by the client.
[0071] In some embodiments, the server provides the second business function for the client, so that the client displays the second display special effect of the target business in the second preset time period.
[0072] For example, the target business can be a business corresponding to a red envelope rain activity, and the second display special effect can be a virtual resource display special effect after the rain special effect of the red envelope rain activity ends. The client sends the second request information to the server at 20:00:13, the server provides the second business function for the client in response to the second request information sent by the client, and the client displays the number of red envelopes obtained by the user.
[0073] The technical scheme provided by the disclosure has at least the following beneficial effects: a client obtains request indication information of a target service; the target service includes a first service function and a second service function; the request indication information includes first time information and second time information; the first time information is different from the second time information. The client sends first request information to a server to request implementation of the first service function according to the first time information; and the client sends second request information to the server to request implementation of the second service function according to the second time information. Because the first time information is different from the second time information, the client sends the first request information and the second request information in sequence at different times to request implementation of the first service function and the second service function in batches. In this way, concurrent requests generated at the same time can be allocated to different times to disperse high-QPS concurrent traffic, thereby greatly reducing peak QPS, and further solving the problem of high instantaneous traffic and high processing pressure of the server.
[0074] In one design, in order to send request indication information of a target service to a client, as shown in Figure 6 The S201 provided by the embodiment of the disclosure specifically includes the following steps:
[0075] S2011, the server obtains area information of the client.
[0076] As a possible implementation manner, the server obtains an Internet Protocol (IP) address of the client; further, the server determines the area information of the client from a mapping relationship including a plurality of IP addresses and a plurality of area information according to the obtained IP address.
[0077] It should be noted that an operation and maintenance (O&M) personnel can divide the client into a preset number of area information according to an IP address of the client to establish a corresponding mapping relationship.
[0078] S2012, the server determines first time information and second time information corresponding to the client according to the area information, obtains request information, and sends the request information to the client.
[0079] As a possible implementation manner, the server determines a first preset time period corresponding to the client from a first mapping relationship including a plurality of area information and a plurality of first preset time periods, and determines a second preset time period corresponding to the client from a second mapping relationship including a plurality of area information and a plurality of second preset time periods; wherein the first preset time period corresponding to different area information is different, and / or the second preset time period corresponding to different area information is different.
[0080] Optionally, the difference between the time nodes of any two adjacent area information in the first mapping relationship is equal to a preset threshold.
[0081] As shown in Figure 7 , the operation and maintenance personnel divide the clients into 60 areas, i.e., area 1, area 2, area 3, …, area 60, according to the IP of the clients. Among them, the first preset time period corresponding to the area 1 is 20:00:00-20:00:13, the first preset time period corresponding to the area 2 is 20:00:01-20:00:14, the first preset time period corresponding to the area 3 is 20:00:02-20:00:15, and the first preset time period corresponding to the area 60 is 20:00:59-20:01:12.
[0082] As shown in Figure 8 , after the target service is dispersed by the service special effect of Figure 5 and the client is dispersed by the region of Figure 7 , the original 100 million peak QPS is reduced to 1.38 million (i.e., 100 million / (20:01:12-20:00:00) = 7.7 million).
[0083] In some embodiments, before the above service special effect dispersion and region dispersion, the server also adds a pre-request stage to the target service (before the client requests the target service, the server pre-processes the non-core business logic of the target service).
[0084] It should be noted that the business logic refers to the rules and processes that an entity unit should have to provide services to another entity unit. For any target service, the operation and maintenance personnel need to disassemble the business logic of the target service to split out some non-core logic (such as risk control processes, etc.) to obtain non-core business logic and identify it.
[0085] In one design, in order to pre-process the non-core business logic of the target service, the service request method provided by the embodiments of the present disclosure further includes:
[0086] S301, before the client requests the target service, the server sends a pre-request trigger instruction to the client through a pre-request interface.
[0087] The pre-request trigger instruction is used to instruct the client to send pre-request information to the server.
[0088] It should be noted that the pre-request interface is an interface pre-set by the operation and maintenance personnel on the server. By setting the pre-request interface, the server can send a pre-request trigger instruction to the client through the pre-request interface.
[0089] Correspondingly, after receiving the pre-request trigger instruction, the client sends pre-request information to the server.
[0090] S302, in response to the pre-request information of the client, the server side pre-processes the non-core business logic of the target business.
[0091] As a possible implementation, the server side, after receiving the pre-request information of the client side, completes the processing of the non-core business logic of the target business through the pre-request interface.
[0092] It can be understood that the server side provides a pre-request interface, and triggers the pre-request within a period of time before the actual request occurs, so that the server side can complete part of the non-core business logic in advance, and thus when the actual request occurs, the business logic that the server side needs to process is greatly reduced, reducing the pressure on the server side.
[0093] For example, assuming that the total time of the pre-request stage is 120 seconds, and the total time of the business special effect scattering and the regional scattering is 60 seconds, then the final 100 million QPS instantaneous traffic will be scattered as: 100 million / (120+60) = 55w.
[0094] As can be seen, although the QPS that the server side finally bears is still in the order of millions, because the non-core logic of the target business has been processed in advance, the core logic can also be processed in an asynchronous manner, so the pressure on the server side is successfully reduced.
[0095] Reference Figure 9 As shown, after the target business passes through the pre-request stage, the business special effect scattering, and the regional scattering, the QPS peak value of the server side facing high-concurrency traffic is successfully reduced.
[0096] In actual application, according to an 8C instance of the server side, the average can bear 2000 QPS, after the pre-request stage of the non-core business logic disintegration, the average of the server side of an 8C instance can bear 4000 QPS. In this way, the traffic that needs 5W servers to bear before optimization, after optimization, only needs 345 servers, saving 99.31% of the server resources.
[0097] The above embodiments primarily describe the solutions provided by the embodiments of this disclosure from the perspective of an apparatus (device). It is understood that, in order to implement the above methods, the apparatus or device includes hardware structures and / or software modules corresponding to the execution of each method flow, and these hardware structures and / or software modules corresponding to the execution of each method flow can constitute a server. Those skilled in the art should readily recognize that, in conjunction with the algorithm steps of the various examples described in the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software-driven hardware manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0098] This disclosure embodiment can divide the apparatus or device into functional modules according to the above method examples. For example, the apparatus or device can be divided into functional modules corresponding to each function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0099] Figure 10 This is a schematic diagram illustrating the structure of a service request device according to an exemplary embodiment. (Refer to...) Figure 10 As shown, the service request device 40 provided in this embodiment of the present disclosure is applied to a client. The service request device 40 includes an acquisition unit 401 and a sending unit 402.
[0100] The acquisition unit 401 is configured to acquire request indication information of a target service; the target service includes a first service function and a second service function; the request indication information includes first time information and second time information; the first time information and the second time information are different; the sending unit 402 is configured to send first request information to the server based on the first time information to request the implementation of the first service function; the sending unit 402 is also configured to send second request information to the server based on the second time information to request the implementation of the second service function.
[0101] Optionally, the first time information includes a first preset time period; the sending unit 402 is specifically used for: the client sending a first request information to the server at any time during the first preset time period to request the implementation of a first business function.
[0102] Optionally, the second time information comprises a second preset time period, and the second preset time period is a time period after the first preset time period; the sending unit 402 is specifically configured to: send, by the client, second request information to the server at any time in the second preset time period to request implementation of the second business function.
[0103] Optionally, the apparatus further comprises a display unit 403; the display unit 403 is configured to: display, by the client, a first display special effect of the target business within the first preset time period; and display, by the client, a second display special effect of the target business within the second preset time period.
[0104] Optionally, the first time information and the second time information are determined by the server according to region information of the client; wherein the first time information corresponding to different region information is different, and / or the second time information corresponding to different region information is different.
[0105] Figure 11 FIG. 1 is a structural schematic diagram of a business request apparatus according to an example embodiment. As shown in FIG. 1, the business request apparatus 50 provided by the present disclosure is applied to a server, and comprises a sending unit 501 and a processing unit 502. Figure 11
[0106] The sending unit 501 is configured to send, to a client, request indication information of a target business; the target business comprises a first business function and a second business function; the request indication information comprises first time information and second time information; the request indication information is used to instruct the client to send first request information to the server according to the first time information and to send second request information to the server according to the second time information; the processing unit 502 is configured to provide the first business function for the client in response to the first request information sent by the client; and the processing unit 502 is further configured to provide the second business function for the client in response to the second request information sent by the client.
[0107] Optionally, the sending unit 501 is specifically configured to: acquire, by the server, region information of the client; and determine, by the server, first time information and second time information corresponding to the client according to the region information, to obtain the request information and send the request information to the client.
[0108] Optionally, the first time information comprises a first preset time period, and the second time information comprises a second preset time period, the second preset time period being a period of time after the first preset time period; the sending unit 501 is specifically configured to: the server determines the first preset time period corresponding to the client according to the region information from a first mapping relationship comprising a plurality of region information and a plurality of first preset time periods, and determines the second preset time period corresponding to the client from a second mapping relationship comprising a plurality of region information and a plurality of second preset time periods; wherein the first preset time period corresponding to different region information is different, and / or the second preset time period corresponding to different region information is different.
[0109] Figure 12 is a structural schematic diagram of an electronic device provided by the present disclosure. As Figure 12 The electronic device 60 can include at least one processor 601 and a memory 602 for storing processor-executable instructions, wherein the processor 601 is configured to execute the instructions in the memory 602 to implement the service request method in the above embodiments.
[0110] In addition, the electronic device 60 can further include a communication bus 603 and at least one communication interface 604.
[0111] The processor 601 can be a central processing unit (CPU), a micro processing unit, an ASIC, or one or more integrated circuits for controlling program execution of the present disclosure scheme.
[0112] The communication bus 603 can include a path for transmitting information between the above components.
[0113] The communication interface 604 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.
[0114] The memory 602 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory can exist independently of the processor, and be connected to the processor via a bus. The memory can also be integrated with the processor.
[0115] The memory 602 is configured to store instructions for implementing the solutions of the present disclosure, and the processor 601 is configured to execute the instructions stored in the memory 602, thereby implementing the functions in the service request method of the present disclosure.
[0116] As an example, in combination with Figure 10 , the functions implemented by the acquisition unit 401 and the sending unit 402 in the service request apparatus 40 are the same as the functions of the processor 601 in Figure 12 .
[0117] As another example, in combination with Figure 11 , the functions implemented by the sending unit 501 and the processing unit 502 in the service request apparatus 50 are the same as the functions of the processor 601 in Figure 12 .
[0118] In a specific implementation, as an example, the processor 601 can include one or more CPUs, such as the CPU0 and the CPU1 in Figure 12 .
[0119] In a specific implementation, as an example, the electronic device 60 can include multiple processors, such as the processor 601 and the processor 607 in Figure 12 . Each of these processors can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (for example, computer program instructions).
[0120] In a particular implementation, as one example, the electronic device 60 can also include an output device 605 and an input device 606. The output device 605 is in communication with the processor 601 and can take on many forms. For example, the output device 605 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, a projector, or the like. The input device 606 is in communication with the processor 601 and can take on many forms. For example, the input device 606 can be a mouse, a keyboard, a touch screen device, a sensor device, or the like.
[0121] Those skilled in the art can understand that the structure shown in the above embodiments does not constitute a limitation on the electronic device 60, and the electronic device 60 can include more or fewer components than shown, or combine certain components, or have different arrangements of components. Figure 12 Those skilled in the art can understand that the structure shown in the above embodiments does not constitute a limitation on the electronic device 60, and the electronic device 60 can include more or fewer components than shown, or combine certain components, or have different arrangements of components.
[0122] In addition, the present disclosure also provides a computer readable storage medium, when the instructions in the computer readable storage medium are executed by the processor of the electronic device, the electronic device can execute the service request method provided by the above embodiments.
[0123] In addition, the present disclosure also provides a computer program product, including computer instructions, when the computer instructions run on the electronic device, the electronic device executes the service request method provided by the above embodiments.
[0124] Other embodiments of the present disclosure will be apparent to those skilled in the art with the consideration of the specification and practice of the present disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including the modifications and variations thereof that are obvious to those skilled in the art and the equivalents thereof. The specification and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A service request method characterized by, The method applied to a client comprises: The client acquires request indication information of a target service; the target service comprises a first service function and a second service function; the request indication information comprises first time information and second time information; the first time information is different from the second time information; the first time information comprises a first preset time period, and the second time information comprises a second preset time period, the second preset time period being a time period after the first preset time period; the first time information and the second time information are determined by a server according to region information of the client; different region information corresponds to different first time information, and / or different region information corresponds to different second time information; The client sends first request information to the server at any time in the first preset time period to request implementation of the first service function; and the client sends second request information to the server at any time in the second preset time period to request implementation of the second service function.
2. The service request method of claim 1, wherein, The method further comprises: The client displays a first display special effect of the target service in the first preset time period; The client displays a second display special effect of the target service in the second preset time period.
3. A service request method characterized by, The method applied to a server comprises: The server acquires region information of a client; The server determines first time information and second time information corresponding to the client according to the region information, acquires request indication information of a target service, and sends the request indication information to the client; the target service comprises a first service function and a second service function; the request indication information comprises the first time information and the second time information; the request indication information is used to indicate the client to send first request information to the server according to the first time information, and to send second request information to the server according to the second time information; the first time information comprises a first preset time period, and the second time information comprises a second preset time period, the second preset time period being a time period after the first preset time period; The server provides the first service function for the client in response to the first request information sent by the client; The server provides the second service function for the client in response to the second request information sent by the client.
4. The service request method of claim 3, wherein, The server determines the first time information and the second time information corresponding to the client according to the region information, comprising: The server determines a first preset time period corresponding to the client from a first mapping relationship comprising a plurality of region information and a plurality of first preset time periods, and determines a second preset time period corresponding to the client from a second mapping relationship comprising a plurality of region information and a plurality of second preset time periods; different region information corresponds to different first preset time periods, and / or different region information corresponds to different second preset time periods.
5. A service request apparatus characterized by comprising: The device applied to a client comprises an obtaining unit and a sending unit. The obtaining unit is configured to obtain request indication information of a target service; the target service comprises a first service function and a second service function; the request indication information comprises first time information and second time information; the first time information is different from the second time information; the first time information comprises a first preset time period, and the second time information comprises a second preset time period, which is a period of time after the first preset time period; the first time information and the second time information are determined by a server according to region information of the client; different region information corresponds to different first time information, and / or different region information corresponds to different second time information; The sending unit is configured to send first request information to the server at any time in the first preset time period to request to realize the first service function. The sending unit is further configured to send second request information to the server at any time in the second preset time period to request to realize the second service function.
6. A service request apparatus characterized by comprising: The device applied to a server comprises a sending unit and a processing unit. The sending unit is configured to obtain region information of a client. The sending unit is further configured to determine first time information and second time information corresponding to the client according to the region information, obtain request indication information of a target service, and send the request indication information to the client; the target service comprises a first service function and a second service function; the request indication information comprises the first time information and the second time information. The request indication information is used to instruct the client to send first request information to the server according to the first time information, and to send second request information to the server according to the second time information; the first time information comprises a first preset time period, and the second time information comprises a second preset time period, which is a period of time after the first preset time period. The processing unit is configured to provide the first service function for the client in response to the first request information sent by the client. The processing unit is further configured to provide the second service function for the client in response to the second request information sent by the client.
7. An electronic device, comprising: The device comprises: a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the service request method in any one of claims 1-4.
8. A computer-readable storage medium having stored thereon instructions, the computer-readable storage medium comprising: When the instructions in the computer readable storage medium are executed by the processor of the server, the server can execute the service request method in any one of claims 1-4.
Citation Information
Patent Citations
Virtual resource processing method and device
CN113747187A