A request processing method based on a cloud service system and a cloud server
Patent Information
- Application Number
- CN202510389962.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2026-09-29
AI Technical Summary
[0004]上述过程中,由于校时设备向云服务器提供校准时间所需的信息的过程中,需要云服务器与校时设备来回通信,每次通信过程均需花费一定的时间,这样反复多次通信会导致云服务器在利用这些信息所得到的校准后的时间与真实的时间之间存在一定的差距,即校准后的时间的精度不足
[0026]本申请实施例中,当用户存在业务需求时,用户可向云服务器发送属于同一批次的多个请求。接收到多个请求后,云服务器可从校时设备处获取属于同一批次的多个高精度时间戳,并对这多个高精度时间戳进行处理,从而得到多个混合时间戳,其中,由于这多个高精度时间戳用于指示第一时间段,故这多个混合时间戳用于指示第一时间段以及这多个混合时间戳的排序。然后,云服务器可对这多个请求进行处理,从而得到这多个请求的处理结果,并按照这多个混合时间戳的排序以及这多个请求的排序,将这多个混合时间戳分配给这多个请求的处理结果,从而得到这多个请求的调整后的处理结果,并将这多个请求的调整后的处理结果发送给用户,从而满足用户的业务需求。前述过程中,由于这多个混合时间戳所指示的第一时间段的起始时间晚于云服务器接收到这多个请求的时间,且这多个混合时间戳所指示的第一时间段的结束时间先于云服务器发送这多个请求的调整后的处理结果的时间,故第一时间段的结束时间配合这多个混合时间戳的排序可准确地描述这多个请求被云服务器所处理的时间。由此可见,云服务器仅需少量的通信过程即可得到校时设备提供的高精度时间戳,由于高精度时间戳本身所指示的时间段(即前述的第一时间段)非常靠近高精度时间戳所需反映的真实时间,故云服务器利用这些高精度时间戳所生成的混合时间戳,其所指示的用户的多个请求被云服务器所处理的时间也很靠近用户的多个请求被云服务器所处理的真实时间,使得二者之间仅存在在微小的差距,有利于提高时间校准的精度,这样在满足用户的业务需求的基础上,还可让用户准确地知晓其业务的完成时间。
Smart Images

Figure CN122845658A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud technology, and in particular to a request processing method and a cloud server based on a cloud service system. Background Technology
[0002] With the rapid development of cloud technology, more and more users are choosing cloud servers provided by cloud providers to complete their business. When cloud servers complete business for users, they often need to perform time calibration and notification, which helps both the cloud server and the user determine the completion time of the business.
[0003] In related technologies, after receiving a user's service request, the cloud server continuously receives the necessary time calibration information from the time synchronization device. Therefore, the cloud server uses the time synchronization algorithm and this information to perform a series of calculations to calibrate the local time. The calibrated time is then added to the processing result of the service request, and the result, carrying the calibrated time, is returned to the user. In this way, the cloud server not only calibrates the local time but also informs the user of the completion time of their service request.
[0004] In the process described above, the time synchronization device needs to communicate back and forth with the cloud server to provide the information required for time calibration. Each communication process takes a certain amount of time. Such repeated communication will result in a certain gap between the calibrated time obtained by the cloud server using this information and the actual time, that is, the accuracy of the calibrated time is insufficient. Summary of the Invention
[0005] This application provides a request processing method and a cloud server based on a cloud service system, which helps to improve the accuracy of time calibration. In this way, while meeting the user's business needs, it also allows the user to accurately know the completion time of their business.
[0006] A first aspect of this application provides a request processing method based on a cloud service system. The cloud service system implementing the method may include infrastructure that provides cloud services to users, and this infrastructure includes cloud servers. The method includes:
[0007] When a user has business needs, the user can send multiple requests belonging to the same batch to the cloud server serving the user.
[0008] After receiving multiple requests from users, the cloud server can request time synchronization from the time synchronization device. This allows the time synchronization device to provide the cloud server with multiple high-precision timestamps belonging to the current batch. These high-precision timestamps are used to indicate the first time period. The cloud server can then process these high-precision timestamps to obtain multiple mixed timestamps. These mixed timestamps are used not only to indicate the first time period but also to indicate the order of the mixed timestamps.
[0009] After obtaining multiple mixed timestamps, the cloud server can process each user's multiple requests separately, thereby obtaining the processing results for these multiple requests. Subsequently, the cloud server can match the sorting of these multiple requests with the sorting of these multiple mixed timestamps to allocate these multiple mixed timestamps to the processing results of these multiple requests, thereby obtaining the adjusted processing results for these multiple requests.
[0010] After receiving the adjusted processing results of these multiple requests, the cloud server can send these adjusted processing results to the user. It should be noted that since the end time of the first time period is later than the time when the cloud server receives the multiple requests, and the end time of the first time period is earlier than the time when the cloud server sends the adjusted processing results of these multiple requests, the end time of the first time period indicated by these multiple mixed timestamps, combined with the order of these mixed timestamps, can describe the time when these multiple requests were processed by the cloud server.
[0011] As can be seen from the above method, since the start time of the first time period indicated by these multiple mixed timestamps is later than the time when the cloud server receives these multiple requests, and the end time of the first time period indicated by these multiple mixed timestamps is earlier than the time when the cloud server sends the adjusted processing results of these multiple requests, the end time of the first time period, combined with the order of these multiple mixed timestamps, can accurately describe the time when these multiple requests were processed by the cloud server. Therefore, the cloud server only needs a small amount of communication to obtain the high-precision timestamps provided by the time synchronization device. Since the time period indicated by the high-precision timestamp itself (i.e., the aforementioned first time period) is very close to the actual time that the high-precision timestamp needs to reflect, the time indicated by the mixed timestamps generated by the cloud server using these high-precision timestamps is also very close to the actual time when the user's multiple requests were processed by the cloud server, leaving only a small difference between the two. This is beneficial to improving the accuracy of time calibration, thus meeting the user's business needs while allowing the user to accurately know the completion time of their business.
[0012] In one possible implementation, the cloud server obtains multiple high-precision timestamps from a time synchronization device based on multiple requests, and processes these high-precision timestamps to obtain multiple mixed timestamps. This includes: the cloud server constructing a second time period based on the multiple requests, wherein the end time of the second time period is earlier than or equal to the end time of the first time period, and the end time of the second time period is later than the time the cloud server receives the multiple requests; within the second time period, the cloud server obtains multiple high-precision timestamps from the time synchronization device and processes them to obtain multiple mixed timestamps. In the aforementioned implementation, the cloud server can construct the second time period after receiving at least one request from the user belonging to the current batch of multiple requests. Upon entering the second time period, the cloud server can request multiple high-precision timestamps from the time synchronization device and process these high-precision timestamps to obtain multiple mixed timestamps. The end time of the second time period is earlier than or equal to the end time of the first time period indicated by these multiple mixed timestamps; that is, these multiple mixed timestamps are valid within the second time period and invalid outside the second time period. This demonstrates that cloud servers can maintain the freshness of multiple mixed timestamps by setting a second time period.
[0013] In one possible implementation, the method further includes: after a second time period, the cloud server deletes multiple mixed timestamps. In the aforementioned implementation, after the second time period, these multiple mixed timestamps are invalid. Therefore, the cloud server can delete these multiple mixed timestamps and, upon receiving a new request from the user, re-apply for a new high-precision timestamp and obtain a new mixed timestamp. Thus, the cloud server can maintain the freshness of its multiple mixed timestamps in this way.
[0014] In one possible implementation, the length of the second time period is determined based on at least one of the following: the number of multiple high-precision timestamps and the clock drift of the cloud server, wherein the clock drift is used to indicate the difference between the start time of the second time period obtained by the cloud server and the actual start time of the second time period, and the difference between the end time of the second time period obtained by the cloud server and the actual end time of the second time period. In the aforementioned implementation, the cloud server can use the number of multiple high-precision timestamps it needs to obtain and the clock drift of the cloud server to calculate and thus determine the length of the second time period. Therefore, the cloud server can accurately determine the start time and end time of the second time period based on its length, which is equivalent to accurately obtaining the second time period. This is beneficial for the cloud server to accurately determine whether the multiple mixed timestamps it holds are valid based on the second time period.
[0015] In one possible implementation, the method further includes: the cloud server constructing a third time period based on multiple requests, wherein the end time of the third time period is later than the end time of the first time period; the cloud server sending the adjusted processing result to the user includes: after the third time period has elapsed, the cloud server sending the adjusted processing result to the user, wherein the end time of the third time period is earlier than or equal to the time when the cloud server sends the adjusted processing result. In the aforementioned implementation, after receiving at least one request from the multiple requests in the current batch, the cloud server may construct the third time period, the end time of which is later than the end time of the first time period. After the third time period has elapsed, the cloud server may send the adjusted processing result of these multiple requests to the user. Since the end time of the third time period is later than the end time of the first time period indicated by these multiple mixed timestamps, and the end time of the third time period is earlier than or equal to the time when the cloud server sends the adjusted processing results of these multiple requests, it is guaranteed that the end time of the first time period is earlier than the time when the cloud server sends the adjusted processing results of these multiple requests. In other words, the end time of the first time period, combined with the order of these multiple mixed timestamps, can accurately describe the time when these multiple requests were processed by the cloud server (because this time is earlier than the time when the cloud server sends the adjusted processing results of these multiple requests).
[0016] In one possible implementation, the length of the third time period is determined based on at least one of the following: the number of multiple high-precision timestamps, the length of the first time period, and the clock drift of the cloud server. The clock drift further indicates the difference between the start time of the third time period obtained by the cloud server and the actual start time of the third time period, as well as the difference between the end time of the third time period obtained by the cloud server and the actual end time of the third time period. In the aforementioned implementation, the cloud server can calculate the length of the third time period using the number of multiple high-precision timestamps it needs to obtain, the length of the first time period, and the clock drift of the cloud server. Therefore, the cloud server can accurately determine the start and end times of the third time period based on its length, which is equivalent to accurately obtaining the third time period. This is beneficial for the cloud server to subsequently control the accuracy of the multiple mixed timestamps it holds based on the third time period.
[0017] A second aspect of this application provides a cloud server, which is set in the infrastructure of a cloud service system that provides cloud services to users. The cloud server includes: a receiving module for receiving multiple requests sent by users; an obtaining module for obtaining multiple high-precision timestamps from a time synchronization device based on the multiple requests, and processing the multiple high-precision timestamps to obtain multiple mixed timestamps, wherein the multiple high-precision timestamps are used to indicate a first time period, and the multiple mixed timestamps are used to indicate the first time period and the sorting of the multiple mixed timestamps; a processing module for processing the multiple requests to obtain processing results of the multiple requests; an allocation module for allocating the multiple mixed timestamps to the processing results based on the sorting of the multiple requests and the sorting of the multiple mixed timestamps to obtain adjusted processing results of the multiple requests; and a sending module for sending the adjusted processing results to users, wherein the end time of the first time period is later than the time when the cloud server receives the multiple requests, and the end time of the first time period is earlier than the time when the cloud server sends the adjusted processing results.
[0018] In one possible implementation, the acquisition module is configured to: construct a second time period based on multiple requests, wherein the end time of the second time period is earlier than or equal to the end time of the first time period, and the end time of the second time period is later than the time when the cloud server receives the multiple requests; and within the second time period, acquire multiple high-precision timestamps from the time synchronization device, and process the multiple high-precision timestamps to obtain multiple mixed timestamps.
[0019] In one possible implementation, the cloud server also includes a deletion module for deleting multiple mixed timestamps after a second time period.
[0020] In one possible implementation, the length of the second time period is determined based on at least one of the following: the number of multiple high-precision timestamps and the clock drift of the cloud server, wherein the clock drift is used to indicate the difference between the start time of the second time period obtained by the cloud server and the actual start time of the second time period, and the difference between the end time of the second time period obtained by the cloud server and the actual end time of the second time period.
[0021] In one possible implementation, the cloud server further includes: a building module for building a third time period based on multiple requests, wherein the end time of the third time period is later than the end time of the first time period; and a sending module for sending the adjusted processing result to the user after the third time period has elapsed, wherein the end time of the third time period is earlier than or equal to the time when the cloud server sends the adjusted processing result.
[0022] In one possible implementation, the length of the third time period is determined based on at least one of the following: the number of multiple high-precision timestamps, the length of the first time period, and the clock drift of the cloud server, wherein the clock drift is also used to indicate the difference between the start time of the third time period obtained by the cloud server and the actual start time of the third time period, and the difference between the end time of the third time period obtained by the cloud server and the actual end time of the third time period.
[0023] A third aspect of this application provides a computing device cluster, the computing device cluster including at least one computing device, each computing device including a processor and a memory: the memory is used to store instructions; the processor is used to cause the computing device cluster to perform the method described in the first aspect or any possible implementation of the first aspect according to the instructions.
[0024] A fourth aspect of this application provides a computer storage medium storing one or more instructions that, when executed by one or more computers, cause the one or more computers to perform the method described in the first aspect or any possible implementation of the first aspect.
[0025] A fifth aspect of this application provides a computer program product storing instructions that, when executed by a computer, cause the computer to perform the method described in the first aspect or any possible implementation of the first aspect.
[0026] In this embodiment, when a user has business needs, the user can send multiple requests belonging to the same batch to the cloud server. Upon receiving multiple requests, the cloud server can obtain multiple high-precision timestamps belonging to the same batch from a time synchronization device, and process these high-precision timestamps to obtain multiple mixed timestamps. Since the high-precision timestamps are used to indicate a first time period, the mixed timestamps are used to indicate the first time period and the order of the mixed timestamps. Then, the cloud server can process these multiple requests to obtain processing results, and allocate the mixed timestamps to the processing results according to the order of the mixed timestamps and the order of the requests, thus obtaining adjusted processing results for the multiple requests. These adjusted processing results are then sent to the user to meet the user's business needs. In the aforementioned process, since the start time of the first time period indicated by these multiple mixed timestamps is later than the time when the cloud server receives these multiple requests, and the end time of the first time period indicated by these multiple mixed timestamps is earlier than the time when the cloud server sends the adjusted processing results of these multiple requests, the end time of the first time period, combined with the order of these multiple mixed timestamps, can accurately describe the time when these multiple requests were processed by the cloud server. Therefore, the cloud server only needs a small amount of communication to obtain the high-precision timestamps provided by the time synchronization device. Because the time period indicated by the high-precision timestamp itself (i.e., the aforementioned first time period) is very close to the actual time that the high-precision timestamp needs to reflect, the time indicated by the mixed timestamps generated by the cloud server using these high-precision timestamps is also very close to the actual time when the user's multiple requests were processed by the cloud server, leaving only a small difference between the two. This helps improve the accuracy of time calibration, thus meeting the user's business needs while allowing the user to accurately know the completion time of their business. Attached Figure Description
[0027] Figure 1 A schematic diagram of the structure of the cloud service system provided in the embodiments of this application;
[0028] Figure 2 This is another schematic diagram of the cloud service system provided in the embodiments of this application;
[0029] Figure 3 A flowchart illustrating a request processing method based on a cloud service system provided in an embodiment of this application;
[0030] Figure 4 A schematic diagram of a timeline provided for an embodiment of this application;
[0031] Figure 5 A schematic diagram of a timeline provided for an embodiment of this application;
[0032] Figure 6 A schematic diagram of the structure of a cloud server provided in an embodiment of this application;
[0033] Figure 7 A schematic diagram of the structure of a computing device provided in an embodiment of this application;
[0034] Figure 8 A schematic diagram of the structure of a computing device cluster provided in an embodiment of this application;
[0035] Figure 9 This is a schematic diagram illustrating the network connection of computer devices in a computer cluster provided in an embodiment of this application. Detailed Implementation
[0036] This application provides a request processing method and a cloud server based on a cloud service system, which helps to improve the accuracy of time calibration. In this way, while meeting the user's business needs, it also allows the user to accurately know the completion time of their business.
[0037] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0038] With the rapid development of cloud technology, more and more users are choosing cloud servers provided by cloud providers to complete their business. When cloud servers complete business for users, they often need to perform time calibration and notification, which helps both the cloud server and the user determine the completion time of the business.
[0039] In related technologies, after receiving a user's business request, the cloud server uses a time synchronization device to continuously provide the necessary information for time calibration. The cloud server then performs a series of calculations using time synchronization algorithms (e.g., Marzullo, Chrony, PTP, and Huygens algorithms) and this information to calibrate its local time. This calibrated time is then processed by the cloud server, and the calibrated time is added to the processing result before being returned to the user. In this way, the cloud server not only calibrates the local time but also informs the user of the completion time of their business request.
[0040] In the process described above, the time synchronization device needs to communicate back and forth with the cloud server to provide the information required for time calibration. Each communication process takes a certain amount of time. Such repeated communication will result in a certain gap between the calibrated time obtained by the cloud server using this information and the actual time, that is, the accuracy of the calibrated time is insufficient.
[0041] Furthermore, since the number of time synchronization devices is often small, while the number of cloud servers that need time synchronization is often large, the time synchronization devices need to communicate with multiple cloud servers continuously. This will cause the communication bottleneck of the time synchronization devices, and their network channels will be contested by multiple cloud servers, increasing the risk of network congestion and making it impossible to meet the time synchronization needs of multiple cloud servers.
[0042] To address the aforementioned issues, this application provides a request processing method based on a cloud service system, which can be implemented through the cloud service system. Figure 1 A schematic diagram of the structure of the cloud service system provided in the embodiments of this application is shown below. Figure 1 As shown, a cloud service system includes the infrastructure that provides cloud services to users and a cloud management platform that manages this infrastructure. The cloud management platform and the infrastructure are described separately below:
[0043] A cloud management platform can centrally manage the infrastructure of the entire cloud service system (for example, according to a user's instructions, it can create one or more cloud servers within the infrastructure, which can run one or more applications specified by the user to meet the user's application access needs, etc.). The cloud management platform can also be open to users outside the cloud service system and respond to their requests. For example, the cloud management platform can provide various interfaces such as login and instance creation interfaces for user clients (e.g., the user's terminal device or the browser on the terminal device, etc.) to access. Specifically, the cloud management platform can authenticate a user's client through the login interface, allowing the client to log in after successful authentication. Similarly, the cloud management platform can allow the user's client to send an instance creation request to the cloud management platform through the instance creation interface. Since the instance creation request indicates the cloud server to be created, the cloud management platform can create a dedicated cloud server for the user. These cloud servers can run applications that provide business services to the user, allowing the user to access these cloud servers when there are business needs, so that these cloud servers can process the user's business-related requests and thus meet the user's business requirements.
[0044] The infrastructure includes one or more cloud servers created by the cloud management platform for the user. Each of these cloud servers may contain a certain amount of computing resources (e.g., central processing unit (CPU) and graphics processing unit (GPU), etc.), a certain amount of storage resources (e.g., memory and disk), and a certain amount of network resources (e.g., network interface cards, etc.). Therefore, these cloud servers as a whole possess a large number of resources, and thus they can work together to provide users with high-quality remote services.
[0045] It should be noted that the time synchronization devices providing time synchronization services to these cloud servers can be one or more time synchronization devices. These devices can be deployed either within the cloud service system's infrastructure (i.e., these time synchronization devices belong to the cloud service system) or externally (i.e., these time synchronization devices do not belong to the cloud service system). When multiple time synchronization devices exist, these multiple time synchronization devices can be presented in the form of multi-layer time synchronization devices, such as... Figure 2 As shown ( Figure 2(This is another structural diagram of the cloud service system provided in this application embodiment). The first-layer time synchronization device may include an atomic clock and a satellite antenna, while the second-layer time synchronization device and the remaining layers may include time synchronization servers, etc. These multiple time synchronization devices can cooperate with each other. When the cloud server has a time synchronization requirement, these multiple time synchronization devices can provide the cloud server with multiple high-precision timestamps belonging to the same batch upon request. After obtaining multiple high-precision timestamps, the cloud server can process these multiple high-precision timestamps to obtain multiple mixed timestamps. Once the cloud server receives multiple requests from the user belonging to the same batch, if these multiple mixed timestamps are still within their validity period, the cloud server can process these multiple requests to obtain the processing results of these multiple requests. Based on the order of the multiple mixed timestamps and the order of the multiple requests, the cloud server allocates the multiple mixed timestamps to the processing results of the multiple requests to obtain the adjusted processing results of the multiple requests, and then provides the adjusted processing results of the multiple requests to the user. In this way, users can not only determine the completion status of their business based on the adjusted processing results of these multiple requests, but also determine the completion time of their business. To further understand high-precision timestamps and hybrid timestamps, these two types of timestamps are introduced below:
[0046] (1) A high-precision timestamp is a timestamp with high precision provided by a time synchronization device. A high-precision timestamp can be accurate to nanoseconds. Generally speaking, a high-precision timestamp can indicate a time period measured by the time synchronization device. This time period includes a start time (lower bound) and an end time (upper bound). Therefore, the real time reflected by the high-precision timestamp is within this time period. For example, if the real time reflected by a certain high-precision timestamp is 0:00:00:00:00:03 nanoseconds, then the high-precision timestamp can contain the following: [0000000000000,000000000005], where [0000000000000,0000000000005] is a time period. The start time "00000000000000" in this time period represents 0:0 ...
[0047] (2) A mixed timestamp (also known as a verification timestamp) is a timestamp obtained by the cloud server after processing a high-precision timestamp. For multiple high-precision timestamps in the same batch, the cloud server processes these high-precision timestamps to obtain multiple mixed timestamps. These multiple mixed timestamps belonging to the same batch can not only be used to indicate the same time period, but also to indicate the order of these multiple mixed timestamps. For example, in mixed timestamp 1 and mixed timestamp 2 belonging to the same batch, mixed timestamp 1 may contain the following content: [0000000000000.1,000000000005.1], where [0000000000000,0000000000005] is the time period, and ".1" in the content indicates the order of mixed timestamp 1. Mixed timestamp 2 may contain the following: [0000000000000.2,0000000000005.2], where [0000000000000,000000000005] is a time period and ".2" indicates the order of mixed timestamp 2.
[0048] Furthermore, these cloud servers can be used to run one or more applications specified by the user. These applications can be provided to the user by the cloud management platform (also known as cloud-native applications or cloud services, etc.) or the user's own applications, etc., without specific restrictions here.
[0049] Furthermore, these cloud servers can be presented in various ways. For example, they can be physical servers selected by the cloud management platform in the infrastructure, or they can be bare metal servers (BMS) selected by the cloud management platform in the infrastructure, and so on.
[0050] Furthermore, these cloud servers can host at least one virtual instance, which can be used to run user-specified applications. These virtual instances can be presented in various ways; for example, they can be virtual machines (VMs) created on physical servers by the cloud management platform using virtualization technology; they can also be containers created on physical servers by the cloud management platform using virtualization technology; and they can also be microVMs created on physical servers by the cloud management platform using virtualization technology, and so on.
[0051] Furthermore, if there are multiple cloud servers serving a user, these servers can be deployed on the same site or different sites. These sites can be presented in various forms, such as regions or availability zones (AZs) or data centers (DCs) within the infrastructure, or even single racks within the infrastructure.
[0052] Based on the aforementioned cloud service system, when a user has business needs, they can send multiple requests belonging to the same batch to the cloud server. Upon receiving multiple requests, the cloud server can obtain multiple high-precision timestamps belonging to the same batch from the time synchronization device and process these high-precision timestamps to obtain multiple mixed timestamps. Since the high-precision timestamps indicate a specific time period, the mixed timestamps indicate the time period and their order. The cloud server then processes these requests to obtain processing results and, according to the order of the mixed timestamps and the order of the requests, allocates the mixed timestamps to the processing results of the requests, thus obtaining adjusted processing results. These adjusted results are then sent to the user to meet their business needs. In the aforementioned process, since the start time of the time period indicated by these multiple mixed timestamps is later than the time when the cloud server receives these multiple requests, and the end time of the time period indicated by these multiple mixed timestamps is earlier than the time when the cloud server sends the adjusted processing results of these multiple requests, the end time of this time period, combined with the order of these multiple mixed timestamps, can accurately describe the time when these multiple requests are processed by the cloud server. Therefore, it can be seen that the cloud server only needs a small amount of communication to obtain the high-precision timestamps provided by the time synchronization device. Because the time period indicated by the high-precision timestamp itself is very close to the actual time that the high-precision timestamp needs to reflect, the mixed timestamps generated by the cloud server using these high-precision timestamps also indicate that the time when the user's request was processed by the cloud server is very close to the actual time when the user's request was processed by the cloud server, leaving only a small difference between the two. This is beneficial to improving the accuracy of time calibration. In this way, while meeting the user's business needs, it also allows the user to accurately know the completion time of their business. To further understand the workflow of the cloud service system, the following section combines... Figure 3 This workflow will be described in further detail. Figure 3A flowchart illustrating a request processing method based on a cloud service system provided in this application embodiment is shown below. Figure 3 As shown, this method can be achieved through, as Figure 1 or Figure 2 The illustrated cloud service system implementation includes infrastructure that provides cloud services to users, which may include cloud servers serving users. The method includes:
[0053] 301. The cloud server receives multiple requests sent by the user.
[0054] In this embodiment, when a user has business needs, the user can send multiple (business) requests belonging to the current batch to the cloud server serving them. It should be noted that the multiple requests belonging to the current batch are usually a series of consecutive requests generated instantaneously during user-side business concurrency, such as multiple access requests generated by the user for certain data (e.g., trending search terms, popular videos, etc.).
[0055] 302. The cloud server obtains multiple high-precision timestamps from the time synchronization device based on multiple requests, and processes the multiple high-precision timestamps to obtain multiple mixed timestamps. Among them, the multiple high-precision timestamps are used to indicate the first time period, and the multiple mixed timestamps are used to indicate the first time period and the sorting of the multiple mixed timestamps.
[0056] After receiving multiple requests from users, the cloud server can request time synchronization from the time synchronization device, so that the time synchronization device can provide the cloud server with multiple high-precision timestamps belonging to the current batch. These multiple high-precision timestamps are used to indicate the first time period measured by the time synchronization device. The first time period may include the real time in which the time synchronization device generates these multiple high-precision timestamps (or can be understood as the real time reflected by these multiple high-precision timestamps). Therefore, the first time period has extremely high accuracy.
[0057] After obtaining multiple high-precision timestamps, the cloud server can process the content indicated by these timestamps (i.e., modify the end time of the first time period indicated by these timestamps) to obtain multiple mixed timestamps. These mixed timestamps not only indicate the first time period but also the order of the mixed timestamps. It is worth noting that for any one of these mixed timestamps, it indicates not only the first time period but also its order within the multiple mixed timestamps. Therefore, the time reflected by that mixed timestamp is the time obtained by combining the end time of the first time period with its order within the multiple mixed timestamps. The same applies to the other mixed timestamps within this mixed timestamp; further details are omitted here.
[0058] Specifically, cloud servers can obtain multiple mixed timestamps in the following ways:
[0059] Upon receiving at least one request from a user belonging to the current batch, the cloud server can determine that the user has a business need. Therefore, the cloud server can first construct a second time period. It should be noted that the cloud server can perform a series of calculations using the number of high-precision timestamps it needs to acquire and the cloud server's clock drift to determine the length of the second time period. Therefore, the cloud server can use the current time as the start time of the second time period, and based on the start time and length of the second time period, determine the end time of the second time period, which is equivalent to obtaining the second time period. It is worth noting that the cloud server's clock drift is used to indicate the difference between the start time of the second time period collected by the cloud server using its own clock and the actual start time of the second time period, as well as the difference between the end time of the second time period collected by the cloud server using its own clock and the actual end time of the second time period.
[0060] Upon entering the second time period, the cloud server can send a request to the time synchronization device, which will then provide multiple high-precision timestamps. The cloud server can then process these high-precision timestamps to obtain multiple mixed timestamps. The end time of the second time period is earlier than or equal to the end time of the first time period indicated by these mixed timestamps. Therefore, the second time period can be considered as the validity period set by the cloud server for these mixed timestamps. In other words, these mixed timestamps are valid within the second time period, and invalid outside of the second time period (or after the second time period has elapsed).
[0061] It should be noted that since the cloud server receives these requests belonging to the current batch sequentially, the earliest few requests arriving at the cloud server will be received at a time equal to or later than the start time of the second time period. Conversely, the remaining requests arriving later will be received at a time later than the start time of the second time period. However, since the cloud server receives all requests belonging to the current batch before the end time of the second time period, it can determine that these multiple mixed timestamps can be allocated to these requests.
[0062] It should also be noted that if the cloud server continues to receive multiple new requests after the end of the second time period, these new requests belong to the next batch. Therefore, the cloud server can perform the same operations on the multiple new requests belonging to the next batch as it would on the multiple requests in the current batch. This will not be elaborated further here.
[0063] For example, such as Figure 4 As shown ( Figure 4 (A schematic diagram of the timeline provided in this application embodiment) When a user has business needs, the user can successively send requests 1 to n belonging to the current batch to the cloud server. Let the time when the cloud server receives request 1 be 0 hours 0 minutes 0 seconds 0 milliseconds 00 nanoseconds, ..., and the time when the cloud server receives request n be 0 hours 0 minutes 0 seconds 0 milliseconds 038 nanoseconds. After receiving request 1, the cloud server can immediately construct a validity period 1 (the aforementioned first time period) for timing based on request 1. The length of the validity period 1 can be determined by the following formula: TTL*(1+D), where TTL is the number of high-precision timestamps that the cloud server needs to obtain, and D is the clock drift of the cloud server.
[0064] After determining the length of validity period 1 (let's say it's 4 nanoseconds), the cloud server can construct validity period 1 based on this length. The start time of validity period 1 is 0 hours 0 minutes 0 seconds 0 milliseconds 00 nanoseconds, ..., and the end time of validity period 1 is 0 hours 0 minutes 0 seconds 0 milliseconds 04 nanoseconds. Therefore, validity period 1 can also be represented as [0000000000000,0000000000004].
[0065] Since it has entered the validity period 1, the cloud server can obtain high-precision timestamps 1 to m from the time synchronization device (generally, m is greater than or equal to n). High-precision timestamps 1 to m all contain the target time period [0000000000001, 0000000000005] (i.e. the aforementioned first time period). Then, the cloud server can adjust the content of high-precision timestamps 1 to m to obtain mixed timestamps 1 to m. Mixed timestamp 1 contains [0000000000001.1,0000000000005.1], where [0000000000001,0000000000005] represents the aforementioned target time period, and ".1" indicates the order of mixed timestamp 1 among mixed timestamps 1 to m (i.e., the first mixed timestamp). Mixed timestamp 2 contains [0000000000001.2,00000000]. [00005.2], [0000000000001,0000000000005] refers to the aforementioned target time period, ".2" refers to the order of the mixed timestamp 2 among mixed timestamps 1 to m (i.e., the second mixed timestamp), ..., the mixed timestamp m contains [0000000000001.m,000000000005.m], [0000000000001,0000000000005] refers to the aforementioned target time period, ".m" refers to the order of the mixed timestamp m among mixed timestamps 1 to m (i.e., the mth mixed timestamp).
[0066] As can be seen, since the cloud server received requests 1 to n successively after the start of validity period 1 and before the end of validity period 1, that is, the time when the cloud server received requests 1 to n was equal to or later than the start time of validity period 1, and the time when the cloud server received requests 1 to n was earlier than the end time of validity period 1, and since the mixed timestamps 1 to m are all valid within validity period 1, the cloud server can determine that mixed timestamps 1 to m can be allocated to requests 1 to n.
[0067] More specifically, cloud servers can also perform the following operations:
[0068] When the second time period ends, that is, after the second time period has elapsed, these multiple mixed timestamps become invalid, and the cloud server can delete these multiple mixed timestamps.
[0069] Continuing with the example above, when the time reaches 0:00:00:00:04 nanoseconds, it indicates that the validity period 1 has expired, meaning that mixed timestamps 1 to m are invalid. Therefore, the cloud server can delete mixed timestamps 1 to m. It should be noted that if the cloud server subsequently receives scoring requests from the next batch n+1 (e.g., arriving at the cloud server at 0:00:00:00:06 nanoseconds) to request 2n (e.g., arriving at the cloud server at 0:00:00:00:11 nanoseconds), the cloud server can perform similar operations, i.e., constructing validity period 2 and obtaining high-precision timestamps m+1 to 2m, etc., which will not be elaborated here.
[0070] 303. The cloud server processes multiple requests and obtains the processing results of multiple requests.
[0071] After obtaining multiple mixed timestamps, the cloud server can process the user's multiple requests separately, thereby obtaining the processing results of these multiple requests.
[0072] As in the example above, after obtaining mixed timestamps 1 to m, the cloud server can process requests 1 to n, thereby obtaining the processing results of requests 1 to n.
[0073] 304. The cloud server sorts multiple requests and multiple mixed timestamps, assigns multiple mixed timestamps to the processing results, and obtains the adjusted processing results of multiple requests.
[0074] After obtaining the processing results of these multiple requests, since the cloud server can determine the order of these multiple requests based on the time it received these multiple requests, and determine the order of these multiple mixed timestamps based on the content indicated by the multiple mixed timestamps, the cloud server can match the order of these multiple requests and the order of these multiple mixed timestamps, and assign these multiple mixed timestamps to the processing results of these multiple requests based on the matching results, thereby obtaining the adjusted processing results of these multiple requests.
[0075] It should be noted that for the adjusted processing result of any one of these multiple requests, the adjusted processing result of the request carries a mixed timestamp whose sorting matches the sorting of the request. Therefore, the end time of the first time period indicated by the mixed timestamp and the sorting of the mixed timestamp can be used as the time when the cloud server processes the request.
[0076] Continuing with the example above, from the processing result of request 1 to the processing result of request n, since the cloud server can determine the order of request 1 (ordered as 1) to the order of request n (ordered as n), and the order of mixed timestamp 1 (ordered as ".1", i.e., ordered as 1) to the order of mixed timestamp m (ordered as ".m", i.e., ordered as m), the cloud server can, based on these orders, assign mixed timestamp 1 to the processing result of request 1, ..., assign mixed timestamp n to the processing result of request n, thereby obtaining the adjusted processing result of request 1, ..., the adjusted processing result of request n.
[0077] Among them, the adjusted processing result of request 1 carries a mixed timestamp 1, and the mixed timestamp 1 indicates 0000000000005.1, which can be used as the time when the cloud server processes request 1, that is, 0 hours 0 minutes 0 seconds 0 milliseconds 5.1 nanoseconds, ..., the adjusted processing result of request 1 carries a mixed timestamp n, and the mixed timestamp n indicates 0000000000005.n, which can be used as the time when the cloud server processes request n, that is, 0 hours 0 minutes 0 seconds 0 milliseconds 5.n nanoseconds.
[0078] 305. The cloud server sends the adjusted processing result to the user. The end time of the first time period is later than the time when the cloud server receives multiple requests, and the end time of the first time period is earlier than the time when the cloud server sends the adjusted processing result.
[0079] After receiving the adjusted processing results of these multiple requests, the cloud server can send these results to the user. It should be noted that the cloud server can control the end time of the first time period to be later than the time when the cloud server receives the multiple requests, and control the end time of the first time period to be earlier than the time when the cloud server sends the adjusted processing results of these multiple requests. Based on this, since the adjusted processing results of these multiple requests carry multiple mixed timestamps, the end time of the first time period indicated by these mixed timestamps, combined with the order of these mixed timestamps, can describe the time when these multiple requests were processed by the cloud server.
[0080] Specifically, the cloud server can send the adjusted processing results of these multiple requests in the following ways:
[0081] Upon receiving at least one request from multiple requests in the current batch, the cloud server can construct a third time segment. It's important to note that the cloud server can perform a series of calculations using the number of high-precision timestamps it needs to acquire, the length of the first time segment, and the cloud server's clock drift to determine the length of the third time segment. Therefore, the cloud server can use the current time as the start time of the third time segment, and based on the start time and length of the third time segment, determine its end time, thus obtaining the third time segment. It's worth noting that the cloud server's clock drift indicates the difference between the start time of the third time segment collected by the cloud server using its own clock and the actual start time of the third time segment, as well as the difference between the end time of the third time segment collected by the cloud server using its own clock and the actual end time of the third time segment.
[0082] It should also be noted that the start time of the third time period can be the same as or different from the start time of the second time period; there is no restriction here. Furthermore, the end time of the third time period is later than the end time of the first time period. Since the end time of the first time period is later than the end time of the second time period, the end time of the third time period is also later than the end time of the second time period.
[0083] After the third time period, the cloud server can send the adjusted processing results of these multiple requests to the user. It is worth noting that the cloud server can send the adjusted processing results of these multiple requests later than the end time of the third time period, or it can be at the end time of the third time period; there is no restriction here.
[0084] Therefore, cloud servers can ensure the freshness of multiple mixed timestamps by setting a second time period. This is achieved by setting the end time of the second time period earlier than the end time of the first time period, and later than the time the cloud server receives the multiple requests, thus ensuring that the end time of the first time period is later than the time the cloud server receives the multiple requests. Similarly, cloud servers can ensure the accuracy of multiple mixed timestamps by setting a third time period. This is achieved by setting the end time of the third time period later than the end time of the first time period, and earlier than or equal to the time the cloud server sends the adjusted processing results of the multiple requests, thus ensuring that the end time of the first time period is earlier than the time the cloud server sends the adjusted processing results of the multiple requests.
[0085] As in the example above, such as Figure 5 As shown ( Figure 5 (A schematic diagram of the timeline provided in this application embodiment) When a user has business needs, the user can successively send requests 1 to n belonging to the current batch to the cloud server. Let the time when the cloud server receives request 1 be 0 hours 0 minutes 0 seconds 0 milliseconds 00 nanoseconds, ..., and the time when the cloud server receives request n be 0 hours 0 minutes 0 seconds 0 milliseconds 038 nanoseconds. After receiving request 1, the cloud server can also immediately construct a timing period 1 (the aforementioned third time period) based on request 1, wherein the length of timing period 1 can be determined by the following formula: 2(a+TTL)*(1+D), where a is the length of the aforementioned target time period.
[0086] After determining the length of timing period 1 (let's say it's 4 nanoseconds), the cloud server can construct timing period 1 based on this length. The start time of timing period 1 is 0 hours 0 minutes 0 seconds 0 milliseconds 00 nanoseconds, ..., and the end time of timing period 1 is 0 hours 0 minutes 0 seconds 0 milliseconds 06 nanoseconds. Therefore, timing period 1 can also be represented as [0000000000000,0000000000006].
[0087] After receiving the adjusted processing results of request 1, ..., and request n, the cloud server will send the adjusted processing results of request 1, ..., and request n to the user only after the timer period 1 has elapsed, i.e., after reaching 0 hours 0 minutes 0 seconds 0 milliseconds 06 nanoseconds.
[0088] In this embodiment, when a user has business needs, the user can send multiple requests belonging to the same batch to the cloud server. Upon receiving multiple requests, the cloud server can obtain multiple high-precision timestamps belonging to the same batch from a time synchronization device, and process these high-precision timestamps to obtain multiple mixed timestamps. Since the high-precision timestamps are used to indicate a first time period, the mixed timestamps are used to indicate the first time period and the order of the mixed timestamps. Then, the cloud server can process these multiple requests to obtain processing results, and allocate the mixed timestamps to the processing results according to the order of the mixed timestamps and the order of the requests, thus obtaining adjusted processing results for the multiple requests. These adjusted processing results are then sent to the user to meet the user's business needs. In the aforementioned process, since the start time of the first time period indicated by these multiple mixed timestamps is later than the time when the cloud server receives these multiple requests, and the end time of the first time period indicated by these multiple mixed timestamps is earlier than the time when the cloud server sends the adjusted processing results of these multiple requests, the end time of the first time period, combined with the order of these multiple mixed timestamps, can accurately describe the time when these multiple requests were processed by the cloud server. Therefore, the cloud server only needs a small amount of communication to obtain the high-precision timestamps provided by the time synchronization device. Because the time period indicated by the high-precision timestamp itself (i.e., the aforementioned first time period) is very close to the actual time that the high-precision timestamp needs to reflect, the time indicated by the mixed timestamps generated by the cloud server using these high-precision timestamps is also very close to the actual time when the user's multiple requests were processed by the cloud server, leaving only a small difference between the two. This helps improve the accuracy of time calibration, thus meeting the user's business needs while allowing the user to accurately know the completion time of their business.
[0089] Furthermore, in this embodiment of the application, since the cloud server communicates with the time synchronization device less frequently when the time synchronization device needs to be synchronized, even if the number of time synchronization devices is small, it does not need to occupy too much network channel of the time synchronization device. This can avoid the situation where multiple cloud servers compete for the network channel of the time synchronization device, that is, avoid the situation where the time synchronization device has a communication bottleneck, thereby reducing the risk of network congestion and meeting the time synchronization needs of multiple cloud servers.
[0090] The above is a detailed description of the request processing method based on the cloud service system provided in the embodiments of this application. The cloud server provided in the embodiments of this application will be described below. Figure 6 A schematic diagram of the structure of a cloud server provided in an embodiment of this application, as shown below. Figure 6As shown, the cloud server is located within the infrastructure of the cloud service system that provides cloud services to users. The cloud server includes:
[0091] The receiving module 601 is used to receive multiple requests sent by the user;
[0092] The acquisition module 602 is used to acquire multiple high-precision timestamps from the time synchronization device based on multiple requests, and process the multiple high-precision timestamps to obtain multiple mixed timestamps. The multiple high-precision timestamps are used to indicate a first time period, and the multiple mixed timestamps are used to indicate the first time period and the sorting of the multiple mixed timestamps.
[0093] The processing module 603 is used to process multiple requests and obtain the processing results of multiple requests;
[0094] The allocation module 604 is used to allocate multiple mixed timestamps to the processing results based on the sorting of multiple requests and the sorting of multiple mixed timestamps, so as to obtain the adjusted processing results of multiple requests.
[0095] The sending module 605 is used to send the adjusted processing result to the user. The end time of the first time period is later than the time when the cloud server receives multiple requests, and the end time of the first time period is earlier than the time when the cloud server sends the adjusted processing result.
[0096] In one possible implementation, the acquisition module 602 is used to: construct a second time period based on multiple requests, wherein the end time of the second time period is earlier than or equal to the end time of the first time period, and the end time of the second time period is later than the time when the cloud server receives the multiple requests; during the second time period, acquire multiple high-precision timestamps from the time synchronization device, and process the multiple high-precision timestamps to obtain multiple mixed timestamps.
[0097] In one possible implementation, the cloud server also includes a deletion module for deleting multiple mixed timestamps after a second time period.
[0098] In one possible implementation, the length of the second time period is determined based on at least one of the following: the number of multiple high-precision timestamps and the clock drift of the cloud server, wherein the clock drift is used to indicate the difference between the start time of the second time period obtained by the cloud server and the actual start time of the second time period, and the difference between the end time of the second time period obtained by the cloud server and the actual end time of the second time period.
[0099] In one possible implementation, the cloud server further includes: a building module for building a third time period based on multiple requests, wherein the end time of the third time period is later than the end time of the first time period; and a sending module 605 for sending the adjusted processing result to the user after the third time period has elapsed, wherein the end time of the third time period is earlier than or equal to the time when the cloud server sends the adjusted processing result.
[0100] In one possible implementation, the length of the third time period is determined based on at least one of the following: the number of multiple high-precision timestamps, the length of the first time period, and the clock drift of the cloud server, wherein the clock drift is also used to indicate the difference between the start time of the third time period obtained by the cloud server and the actual start time of the third time period, and the difference between the end time of the third time period obtained by the cloud server and the actual end time of the third time period.
[0101] It should be noted that the information interaction and implementation process between the modules / units of the above-mentioned device are based on the same concept as the method embodiments of this application, and the resulting technical effects are the same as those of the method embodiments of this application. For details, please refer to the description in the method embodiments shown above in the embodiments of this application, and will not be repeated here.
[0102] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Figure 7 As shown, the computing device 700 (which can be used to present the aforementioned cloud server) includes: a processor 701, a memory 702, a communication interface 703, and a bus 704. The processor 701, memory 702, and communication interface 703 are coupled via the bus (not shown in the figure). The memory 702 stores instructions. When the instructions in the memory 702 are executed, the computing device 700 executes the method performed by the cloud management platform in the above method embodiment.
[0103] The computing device 700 may be one or more integrated circuits configured to implement the methods described above, such as: one or more application-specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), or a combination of at least two of these forms of integrated circuits. Furthermore, when the units in the device can be implemented in the form of a processing element scheduler, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of calling programs. Alternatively, these units may be integrated together to implement a system-on-a-chip (SOC).
[0104] The processor 701 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0105] The memory 702 can be volatile memory or non-volatile memory, or it can include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0106] The memory 702 stores executable program code, and the processor 701 executes this executable program code to implement the functions of the aforementioned receiving module, acquiring module, processing module, allocation module, and sending module, thereby realizing the aforementioned request processing method based on the cloud service system. That is, the memory 702 stores instructions for executing the aforementioned request processing method based on the cloud service system.
[0107] The communication interface 703 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 700 and other devices or communication networks.
[0108] In addition to the data bus, the 704 bus can also include a power bus, a control bus, and a status signal bus. The bus can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL) bus, a Cache Coherent Interconnect for Accelerators (CCIX) bus, etc. The bus can be divided into address bus, data bus, and control bus.
[0109] Please see Figure 8 , Figure 8 This is a schematic diagram of a computing device cluster provided in an embodiment of this application. Figure 8 As shown, the computing device cluster 800 includes at least one computing device 700.
[0110] like Figure 8 As shown, the computing device cluster 800 includes at least one computing device 700. The memory 702 of one or more computing devices 700 in the computing device cluster 800 may store the same instructions for executing the request processing method described above for the cloud service system.
[0111] In some possible implementations, the memory 702 of one or more computing devices 700 in the computing device cluster 800 may also store partial instructions for executing the request processing method of the cloud service-based system described above. In other words, a combination of one or more computing devices 700 can jointly execute the request processing method of the cloud service-based system described above.
[0112] It should be noted that the memory 702 in different computing devices 700 within the computing device cluster 800 can store different instructions, each used to execute a portion of the functions of the aforementioned cloud management platform. That is, the instructions stored in the memory 702 of different computing devices 700 can implement the functions of one or more modules, such as the receiving module, acquisition module, processing module, allocation module, and sending module.
[0113] In some possible implementations, one or more computing devices 700 in the computing device cluster 800 can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc.
[0114] Please see Figure 9, Figure 9 This is a schematic diagram illustrating the network connection of computer devices in a computer cluster provided in an embodiment of this application. Figure 9 As shown, the two computing devices 700A and 700B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device.
[0115] In one possible implementation, the memory in computing device 700A stores instructions for performing the functions of modules such as the receiving module and the transmitting module. Meanwhile, the memory in computing device 700B stores instructions for performing the functions of modules such as the acquiring module, the processing module, and the allocation module.
[0116] It should be understood that Figure 9 The functions of computing device 700A shown can also be performed by multiple computing devices. Similarly, the functions of computing device 700B can also be performed by multiple computing devices.
[0117] This application also relates to a computer storage medium storing a program for signal processing, which, when run on a computer, causes the computer to perform actions such as... Figure 3 The steps performed by the cloud management platform in the illustrated embodiment.
[0118] This application also relates to a computer program product that stores instructions that, when executed by a computer, cause the computer to perform actions such as... Figure 3 The steps performed by the cloud management platform in the illustrated embodiment.
[0119] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0120] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0121] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0122] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0123] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A request processing method based on a cloud service system, characterized in that, The cloud service system includes infrastructure for providing cloud services to users, the infrastructure includes cloud servers, and the method includes: The cloud server receives multiple requests sent by the user; The cloud server obtains multiple high-precision timestamps from the time synchronization device based on the multiple requests, and processes the multiple high-precision timestamps to obtain multiple mixed timestamps. The multiple high-precision timestamps are used to indicate a first time period, and the multiple mixed timestamps are used to indicate the first time period and the order of the multiple mixed timestamps. The cloud server processes the multiple requests and obtains the processing results of the multiple requests; The cloud server assigns the multiple mixed timestamps to the processing result based on the sorting of the multiple requests and the sorting of the multiple mixed timestamps, thereby obtaining the adjusted processing result of the multiple requests; The cloud server sends the adjusted processing result to the user, wherein the end time of the first time period is later than the time when the cloud server receives the multiple requests, and the end time of the first time period is earlier than the time when the cloud server sends the adjusted processing result.
2. The method according to claim 1, characterized in that, Based on the multiple requests, the cloud server obtains multiple high-precision timestamps from the time synchronization device, and processes the multiple high-precision timestamps to obtain multiple mixed timestamps, including: The cloud server constructs a second time period based on the multiple requests, wherein the end time of the second time period is earlier than or equal to the end time of the first time period, and the end time of the second time period is later than the time when the cloud server receives the multiple requests. During the second time period, the cloud server obtains multiple high-precision timestamps from the time synchronization device and processes the multiple high-precision timestamps to obtain multiple mixed timestamps.
3. The method according to claim 2, characterized in that, The method further includes: After the second time period, the cloud server deletes the multiple mixed timestamps.
4. The method according to claim 2 or 3, characterized in that, The length of the second time period is determined based on at least one of the following: the number of the plurality of high-precision timestamps and the clock drift of the cloud server, wherein the clock drift is used to indicate the difference between the start time of the second time period obtained by the cloud server and the actual start time of the second time period, and the difference between the end time of the second time period obtained by the cloud server and the actual end time of the second time period.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The cloud server constructs a third time period based on the multiple requests, wherein the end time of the third time period is later than the end time of the first time period. The cloud server sends the adjusted processing result to the user, including: After the third time period, the cloud server sends the adjusted processing result to the user, wherein the end time of the third time period is earlier than or equal to the time when the cloud server sends the adjusted processing result.
6. The method according to claim 5, characterized in that, The length of the third time period is determined based on at least one of the following: the number of the plurality of high-precision timestamps, the length of the first time period, and the clock drift of the cloud server, wherein the clock drift is further used to indicate the difference between the start time of the third time period obtained by the cloud server and the actual start time of the third time period, and the difference between the end time of the third time period obtained by the cloud server and the actual end time of the third time period.
7. A cloud server, characterized in that, The cloud server is located within the infrastructure of the cloud service system that provides cloud services to users, and the cloud server includes: The receiving module is used to receive multiple requests sent by the user; The acquisition module is used to acquire multiple high-precision timestamps from the time synchronization device based on the multiple requests, and process the multiple high-precision timestamps to obtain multiple mixed timestamps, wherein the multiple high-precision timestamps are used to indicate a first time period, and the multiple mixed timestamps are used to indicate the first time period and the sorting of the multiple mixed timestamps; A processing module is used to process the multiple requests and obtain the processing results of the multiple requests; The allocation module is used to allocate the multiple mixed timestamps to the processing result based on the sorting of the multiple requests and the sorting of the multiple mixed timestamps, so as to obtain the adjusted processing result of the multiple requests; A sending module is used to send the adjusted processing result to the user, wherein the end time of the first time period is later than the time when the cloud server receives the multiple requests, and the end time of the first time period is earlier than the time when the cloud server sends the adjusted processing result.
8. The cloud server according to claim 7, characterized in that, The acquisition module is used for: A second time period is constructed based on the multiple requests, wherein the end time of the second time period is earlier than or equal to the end time of the first time period, and the end time of the second time period is later than the time when the cloud server receives the multiple requests. During the second time period, multiple high-precision timestamps are obtained from the time synchronization device, and the multiple high-precision timestamps are processed to obtain multiple mixed timestamps.
9. The cloud server according to claim 8, characterized in that, The cloud server also includes: The deletion module is used to delete the multiple mixed timestamps after the second time period has elapsed.
10. The cloud server according to claim 8 or 9, characterized in that, The length of the second time period is determined based on at least one of the following: the number of the plurality of high-precision timestamps and the clock drift of the cloud server, wherein the clock drift is used to indicate the difference between the start time of the second time period obtained by the cloud server and the actual start time of the second time period, and the difference between the end time of the second time period obtained by the cloud server and the actual end time of the second time period.
11. The cloud server according to any one of claims 7 to 10, characterized in that, The cloud server also includes: A construction module is configured to construct a third time period based on the multiple requests, wherein the end time of the third time period is later than the end time of the first time period; The sending module is used to send the adjusted processing result to the user after the third time period, wherein the end time of the third time period is earlier than or equal to the time when the cloud server sends the adjusted processing result.
12. The cloud server according to claim 11, characterized in that, The length of the third time period is determined based on at least one of the following: the number of the plurality of high-precision timestamps, the length of the first time period, and the clock drift of the cloud server, wherein the clock drift is further used to indicate the difference between the start time of the third time period obtained by the cloud server and the actual start time of the third time period, and the difference between the end time of the third time period obtained by the cloud server and the actual end time of the third time period.
13. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, each computing device including a processor and memory: The memory is used to store instructions; The processor is configured to, according to the instructions, cause the computing device cluster to perform the method of any one of claims 1 to 6.
14. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions that, when executed by one or more computers, cause the one or more computers to perform the method of any one of claims 1 to 6.
15. A computer program product, characterized in that, The computer program product stores instructions that, when executed by a computer, cause the computer to perform the method described in any one of claims 1 to 6.