Data stream processing method and device, equipment and storage medium
By determining the maximum number of deployments allowed based on the heat information of data streams in the service device, the problem of high back-to-origin bandwidth costs in existing technologies is solved, and aggregated deployment and cost optimization of data streams are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2026-03-24
AI Technical Summary
Existing data stream deployment methods fail to effectively consider the relationship between back-to-origin bandwidth costs and data stream requirements, resulting in fragmented deployments and excessively high back-to-origin bandwidth costs.
By receiving service query requests, it determines whether the target data stream exists in the service device, determines the maximum number of deployments allowed based on the popularity information of the deployed data streams, and triggers the target service device to deploy the target data stream to provide related data services.
This enables the aggregation and deployment of data streams, reduces back-to-origin bandwidth costs, ensures that service equipment has sufficient resources to accommodate future user demands, and improves the availability and response speed of data streams.
Smart Images

Figure CN121722802A_ABST
Abstract
Description
Technical Field
[0001] The exemplary embodiments disclosed herein relate generally to the field of computers, and more particularly to methods, apparatus, devices, and computer-readable storage media for data stream processing. Background Technology
[0002] With the development of the Internet of Things (IoT), the widespread use of mobile devices, and the explosive growth of online services, the generation speed and volume of data streams are increasing dramatically. These data streams are typically continuous, high-speed, and require real-time or near-real-time processing to extract value. How to process these data streams is a key concern. Summary of the Invention
[0003] In a first aspect of this disclosure, a data stream processing method is provided. The method includes: receiving a service query request from a terminal device, the service query request being used to query a service device providing a target data stream; determining whether a service device deploying the target data stream exists among a group of service devices; in response to the absence of a service device deploying the target data stream among the group of service devices, determining a first target service device based on a first service device whose number of deployed data streams in the group of service devices is less than the maximum allowed number of deployed data streams, wherein the maximum allowed number of deployed data streams on the first service device is determined based on historical popularity information of the deployed data streams on the first service device, the popularity information being determined based on the number of users acquiring the data streams during the historical period; and triggering the first target service device to deploy the target data stream, so that the first target service device provides a data service associated with the target data stream to the terminal device in response to a service acquisition request from the terminal device, wherein the service acquisition request is generated by the terminal device based on identification information of the first target service device.
[0004] In a second aspect of this disclosure, an apparatus for data stream processing is provided. The apparatus includes: a receiving module configured to receive a service query request from a terminal device, the service query request being used to query a service device providing a target data stream; a first determining module configured to determine whether a service device deploying the target data stream exists among a group of service devices; a second determining module configured to, in response to the absence of a service device deploying the target data stream among the group of service devices, determine a first target service device based on a first service device whose number of deployed data streams in the group of service devices is less than a maximum allowed number of deployed data streams, wherein the maximum allowed number of deployed data streams on the first service device is determined based on historical popularity information of the deployed data streams on the first service device, the popularity information being determined based on the number of users acquiring data streams during the historical period; and a triggering module configured to trigger the first target service device to deploy the target data stream, so that the first target service device provides a data service associated with the target data stream to the terminal device in response to a service acquisition request from the terminal device, wherein the service acquisition request is generated by the terminal device based on identification information of the first target service device.
[0005] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.
[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program that can be executed by a processor to implement the method of the first aspect.
[0007] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0008] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure can be implemented is shown;
[0010] Figure 2 A flowchart illustrating a data stream processing procedure according to some embodiments of the present disclosure is shown;
[0011] Figure 3 Example diagrams of data flow deployment according to some embodiments of this disclosure are shown;
[0012] Figure 4 A system schematic diagram of data flow deployment according to some embodiments of the present disclosure is shown;
[0013] Figure 5 A schematic structural block diagram of an apparatus for data stream processing according to certain embodiments of the present disclosure is shown;
[0014] Figure 6 A block diagram of an electronic device capable of implementing several embodiments of the present disclosure is shown. Detailed Implementation
[0015] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0016] It should be noted that the headings of any section / subsection provided herein are not limiting. Various embodiments are described throughout this document, and embodiments of any type may be included under any section / subsection. Furthermore, embodiments described in any section / subsection may be combined in any way with any other embodiments described in the same section / subsection and / or different sections / subsections.
[0017] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below. The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0018] The embodiments of this disclosure may involve user data, data acquisition, and / or use. All of these aspects comply with applicable laws, regulations, and relevant provisions. In the embodiments of this disclosure, all data collection, acquisition, processing, manipulation, forwarding, and use are conducted with the user's knowledge and confirmation. Accordingly, in implementing the embodiments of this disclosure, the type, scope of use, and usage scenarios of any data or information that may be involved should be communicated to the user and their authorization obtained in accordance with relevant laws and regulations through appropriate means. The specific methods of notification and / or authorization may vary depending on the actual situation and application scenario, and the scope of this disclosure is not limited in this respect.
[0019] In this specification and the embodiments, any processing of personal information will be carried out only under the premise of legality (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be carried out within the scope stipulated or agreed upon. A user's refusal to process personal information other than that necessary for basic functions will not affect the user's use of basic functions.
[0020] As mentioned earlier, with the rapid growth of data flow, the cost of backhaul bandwidth is also rising rapidly. To provide data flow to user terminal devices, it is usually necessary to pre-deploy the data flow to service devices, which incurs backhaul bandwidth costs. One related data flow deployment method is random scheduling, which supports load balancing by randomly distributing service query requests from terminal devices to a service cluster to achieve balanced traffic distribution. Another related method is to rank service devices based on their historical service quality, prioritizing the use of service devices with higher historical service quality when deploying data flow. However, these methods do not consider the relationship between backhaul bandwidth costs and data flow demand, leading to severe deployment dispersion problems and resulting in very high backhaul bandwidth costs.
[0021] For example, assuming there are two data streams, A and B, with 4 users accessing data stream A and 8 users accessing data stream B, both with a bitrate of 2Mbps, and each service device serving 4 users, existing data stream deployment methods can deploy both data streams A and B on 3 service devices (service device 1, service device 2, and service device 3). In this case, service device 1 can provide data stream A to 2 users and data stream B to 2 users; service device 2 can provide data stream A to 1 user and data stream B to 3 users; and service device 3 can provide data stream A to 1 user and data stream B to 3 users. It is evident that due to the highly distributed deployment of data streams, each service device incurs backhaul bandwidth costs. The total backhaul bandwidth cost can be determined using the following formula: 2 (data stream type) * 3 (number of service devices) * 2Mbps (bitrate) = 12Mbps. The backhaul bandwidth cost of existing data stream deployment methods is very high.
[0022] This disclosure provides a data stream processing scheme. According to the scheme, a service query request is received from a terminal device, the service query request being used to query a service device providing a target data stream; it is determined whether a service device deploying the target data stream exists in a group of service devices; in response to the absence of a service device deploying the target data stream in the group of service devices, a first target service device is determined based on a first service device whose number of deployed data streams in the group of service devices is less than the maximum allowed number of deployed data streams, wherein the maximum allowed number of deployed data streams on the first service device is determined based on the historical popularity information of the deployed data streams on the first service device, the popularity information being determined based on the number of users acquiring data streams in the historical period; and the first target service device is triggered to deploy the target data stream, so that the first target service device provides data services associated with the target data stream to the terminal device in response to a service acquisition request from the terminal device, wherein the service acquisition request is generated by the terminal device based on the identification information of the first target service device.
[0023] Based on this approach, embodiments of this disclosure can accurately predict the maximum number of data streams that a service device can deploy, based on the popularity information of data streams already deployed on the service device. This ensures that when the maximum number of data streams deployed on a service device is reached, it will no longer accept the transmission and deployment of new data streams. This guarantees that the data streams already deployed on the service device can reserve sufficient resources to accommodate future users seeking data streams, achieving an aggregation effect. Furthermore, compared to not deploying the target data stream on each service device, embodiments of this disclosure can effectively reduce back-to-origin bandwidth costs.
[0024] Example Environment
[0025] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. For example... Figure 1 As shown, example environment 100 may include electronic device 110 and terminal device 120.
[0026] In some embodiments, terminal device 120 may send a service query request to electronic device 110. This service query request may be a request for the service device that provides the target data stream for the query triggered by user 140. That is, the query may specify which service device (service device 130-1, service device 130-2, service device 130-3, etc.) can provide the target service stream.
[0027] Each of the service devices 130-1, 130-2, and 130-3 can deploy multiple data streams. These service devices can deploy the same data streams or different data streams. For example, service device 130-1 can deploy data streams A and B, service device 130-2 can deploy data streams C and B, and service device 130-3 can deploy data streams A and B.
[0028] Electronic device 110 can determine from service devices 130-1, 130-2, and 130-3 which service device can provide the data service associated with the target data stream. If none of service devices 130-1, 130-2, and 130-3 can provide the data service associated with the target data stream, then electronic device 110 can determine at least one service device to deploy the target data stream, so that terminal device 120 can obtain the data service associated with the target data stream from this service device that has deployed the target data stream. As an example, electronic device 110 can trigger service device 130-1 to deploy the target service stream, so that terminal device 120 can send a service acquisition request to service device 130-1 to obtain the data service associated with the target data stream.
[0029] Terminal device 120 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, handheld computers, portable gaming terminals, VR / AR devices, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 120 may also support any type of interface for the target user (such as "wearable" circuitry).
[0030] Electronic device 110 can be any suitable device, such as a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Electronic device 110 may include, for example, computing systems / servers such as mainframes, edge computing nodes, computing devices in cloud environments, etc. As an example, electronic device 110 can be an origin server in a Content Delivery Network (CDN).
[0031] Service device 130 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Service device 130 may include, for example, computing systems / servers such as mainframes, edge computing nodes, computing devices in a cloud environment, etc. As an example, service device 130 can be an edge server in a CDN.
[0032] A communication connection can be established between server 130 and electronic device 110. A communication connection can also be established between server 130 and terminal device 120. The communication connection can be established via wired or wireless means. The communication connection may include, but is not limited to, Bluetooth, mobile network, Universal Serial Bus (USB), and Wireless Fidelity (WiFi) connections; the embodiments of this disclosure are not limited in this respect. In the embodiments of this disclosure, any two devices with a communication connection can exchange signaling information through that connection.
[0033] It should be understood that the structure and function of the various elements in environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.
[0034] The following description will continue with reference to the accompanying drawings, which will provide some exemplary embodiments of this disclosure.
[0035] Example process
[0036] Figure 2 A flowchart of a data stream processing procedure 200 according to some embodiments of the present disclosure is shown. Procedure 200 can be implemented at electronic device 110. Reference is made below. Figure 1 Describe the process 200.
[0037] In box 210, the electronic device receives a service query request from the terminal device. The service query request is used to query the service device that provides the target data stream.
[0038] In some embodiments, a service query request can be a query request triggered by a terminal device when a user requests to obtain a target data stream. For example, a service query request can be a query request triggered when a user watches live content in live room A on their terminal device.
[0039] In some embodiments, the target data stream can be any suitable data stream. As an example, the target data stream can be a live stream, where a live stream is a data stream generated in real time during a live broadcast. The target data stream can be any suitable type of data stream, such as video, images, web pages, audio, etc., which will not be elaborated further here.
[0040] In some embodiments, the service query request may at least indicate the identification information of the target data stream, which may be any suitable form of information that can characterize the identity of the target data stream, such as a Uniform Resource Locator (URL), filename, or other unique identifier.
[0041] In box 220, the electronic device determines whether a service device is deployed to the target data stream among a group of service devices.
[0042] In some embodiments, this group of service devices can deploy individual data streams, and each service device can deploy the same data stream or different data streams.
[0043] To improve the aggregation effect of data streams and reduce the back-to-origin bandwidth cost of data stream deployment, in some embodiments, each service device may not deploy all types of data streams, but instead aggregate and deploy the data streams. That is, for the same type of data stream, provided that the data services associated with the data stream can be provided, the electronic device can deploy the data stream to a target number of service devices, which is less than a predetermined threshold number.
[0044] Figure 3 Example diagrams of data flow deployment according to some embodiments of this disclosure are shown, now for... Figure 3 Please provide an explanation.
[0045] In this embodiment, the electronic device does not need to deploy all types of data streams on each service device. Instead, it can aggregate and deploy the data streams. Taking the existence of two data streams, A and B, as an example, with 4 users accessing data stream A and 8 users accessing data stream B, and both data streams having a bitrate of 2Mbps, and each service device serving 4 users, this embodiment can deploy data stream A on service device 130-1, data stream B on service device 130-2, and data stream B on service device 130-3. The total backhaul bandwidth required is (number of service devices) * 2Mbps (bitrate) = 6Mbps, which reduces the backhaul bandwidth cost compared to existing data stream deployment methods.
[0046] In some embodiments, the number of service devices deploying the target service flow in this group of service devices can be 0, 1, or multiple.
[0047] Furthermore, the electronic device can obtain service deployment information, which indicates the service devices that have deployed the corresponding data streams. Specifically, for each data stream, the service deployment information indicates the relevant information of the service devices that have deployed that data stream. For example, for data stream A, the deployment service information can indicate that the service devices deploying data stream A include service devices 130-1 and 130-2. For data stream B, the deployment service information can indicate that the service devices deploying data stream B include service device 130-3. Based on the service deployment information, the electronic device can determine whether a group of service devices includes the first service device of the deployed data stream.
[0048] It should be noted that the electronic device can update this service deployment information based on the actual deployment of data streams on each service device. Specifically, the electronic device can update this service deployment information based on the addition or deletion of data streams on each service device. For example, if a new data stream E is added to service device 130-1, the electronic device can update the service deployment information, specifically indicating that data stream E is deployed on service device 130-1.
[0049] In box 230, in response to the absence of a service device deploying the target data stream in a set of service devices, the electronic device determines a first target service device based on a first service device in the set of service devices where the number of deployed data streams is less than the maximum number of data streams allowed to be deployed. The maximum number of data streams allowed to be deployed on the first service device is determined based on the popularity information of the data streams deployed on the first service device in a historical period, and the popularity information is determined based on the number of users who acquired the data streams in the historical period.
[0050] In some embodiments, popularity information is used to reflect the popularity or demand of data streams on the service device, and to adjust the number of data streams deployed on the service device, thereby ensuring the availability of data streams and the response speed of the service device.
[0051] In some embodiments, for each of the group of service devices, the number of deployed data streams and the maximum number of data streams allowed to be deployed by that service device are reported to the electronic device.
[0052] As an example, for each service device in this group of service devices, the number of deployed data streams and the maximum number of data streams allowed to be deployed can be periodically reported to the electronic device. Specifically, the electronic device can periodically obtain reporting messages from the group of service devices. Based on the reporting messages, the electronic device can determine the number of deployed data streams and the maximum number of data streams allowed to be deployed for the group of service devices. The reporting information at least indicates the number of deployed data streams and the maximum number of data streams allowed to be deployed for each service device.
[0053] The following section uses a service device as an example to illustrate the process of determining the maximum number of data streams that the service device is allowed to deploy.
[0054] In some embodiments, the service device can obtain the historical number of users for a set of data streams deployed by the service device within a historical time period. This historical time period can be any appropriate time period. For example, if the service device periodically updates the maximum number of service streams allowed to be deployed by the service device, then this historical time period can be the time period corresponding to a predetermined number of periods prior to the current time. The predetermined number can be set according to needs, for example, it can be set to 10.
[0055] Electronic devices can determine the expected number of users for a set of data streams within a target time period based on historical user counts. The target time period can be any appropriate time period after the current time.
[0056] In some embodiments, the service device may determine the trend of changes in the number of users within a historical period based on the number of historical users.
[0057] For example, service equipment can determine the trend of user numbers over a historical period based on the following formula:
[0058]
[0059] Among them, join_rate i This represents the trend of change in data stream i, which can also be referred to as the rate of change in the number of users; t k -t k-1 This represents the length of the period from time k-1 to time k. This represents the number of user changes in the period corresponding to time k-1 to time k, where n equals a predetermined number of periods - 1.
[0060] The service device can determine the expected number of users for a set of data streams within a target time period based on trends. The service device can determine the product of the target time period duration and the trend. Based on this product and the sum of historical user counts, the service device can determine the expected number of users within the target time period.
[0061] For example, service equipment can determine the expected number of users within a target time period based on the following formula:
[0062] f i =user i +join_rate i *(t i -t i-1 )
[0063] Among them, f i The join_rate represents the expected number of users within the target time period. i This indicates the trend of change in data stream i, user i t represents the number of users acquiring data stream i on the service device at the current time. i -t i-1 Indicates the duration of the target time period.
[0064] In some embodiments, the service device can determine the bandwidth information allocated to a set of deployed data streams based on the expected number of users. Specifically, the service device can determine the bandwidth information allocated to each data stream in this set of data streams based on the transmission bitrate corresponding to that data stream and the expected number of users corresponding to that data stream. The transmission bitrate represents the bandwidth required to serve one user.
[0065] For example, the service device can determine the corresponding bandwidth to allocate to this set of data streams based on the following formula:
[0066] workload i =f i *b i
[0067] workload i f represents the bandwidth allocated to data stream i. i b represents the expected number of users within the target time period. i This represents the transmission bit rate corresponding to data stream i.
[0068] In some embodiments, the serving device may determine its remaining bandwidth based on bandwidth information. The remaining bandwidth represents the bandwidth remaining for the serving device after allocating corresponding bandwidth to these data streams.
[0069] In some embodiments, each data stream in this group of data streams can be allocated a corresponding bandwidth, that is, the service device has sufficient bandwidth to allocate to each data stream, and at this time the remaining bandwidth is greater than 0. In other embodiments, some of the data streams in this group of data streams can be allocated corresponding bandwidths, and some data streams are not allocated corresponding bandwidths, that is, the service device does not have sufficient bandwidth to allocate to each data stream, and at this time the remaining bandwidth is 0.
[0070] In some embodiments, the service device can determine the order of bandwidth allocation for these data streams based on the popularity information corresponding to each data stream in this group of data streams. The popularity information can be characterized by the expected number of users corresponding to the data stream, where the more the expected number of users, the higher the popularity information. In some embodiments, the service device can sort each data stream in this group of data streams in descending order of popularity to obtain a sorting result. The service device can allocate bandwidth to each data stream in sequence based on this sorting result. For example, if the service device deploys data stream A, data stream B, and data stream C, and the sorting result corresponding to the sorting of data stream A, data stream B, and data stream C in descending order of popularity is data stream C, data stream B, and data stream A, then the service device can first allocate bandwidth a to data stream C, and then allocate bandwidth b to data stream B. If the total bandwidth c of the service device at this time is not sufficient to allocate to data stream B anymore, that is, c - a - b < d, where d is the bandwidth required by data stream B, then the remaining bandwidth is 0.
[0071] The service device can determine the maximum number of data streams that the service device allows to deploy based on the remaining bandwidth. The remaining bandwidth is directly proportional to the maximum number of data streams that are allowed to be deployed. Further, the service device can determine the comparison result between the remaining bandwidth and a preset bandwidth. The preset bandwidth can be set according to requirements. For example, it can be set to the total bandwidth of the service device, or it can be set to any other appropriate bandwidth. The service device can determine the maximum number of data streams that the service device allows to deploy based on the comparison result.
[0072] Further, the service device can increase the maximum number of data streams that the service device allows to deploy in response to the remaining bandwidth being greater than the preset bandwidth, that is, the service device has sufficient bandwidth to allocate to more data streams, and at this time the service device can support deploying more data streams. In some embodiments, the service device can determine to increase the maximum number of data streams that are allowed to be deployed in any appropriate increasing manner. For example, the maximum number of data streams that are currently allowed to be deployed can be determined as the increased maximum number of data streams that are allowed to be deployed by multiplying by a predetermined value. The predetermined value can be any appropriate value greater than 1, such as 1.2.
[0073] In other embodiments, the service device may reduce the maximum number of data streams allowed to be deployed in response to the remaining bandwidth being less than a preset bandwidth. That is, the service device may not have enough bandwidth to allocate to more data streams, and therefore cannot support the deployment of more data streams. In some embodiments, the service device may determine to reduce the maximum number of data streams allowed to be deployed in any appropriate manner. As an example, the service device may update the number of successfully allocated data streams to the reduced maximum number of data streams allowed to be deployed during the data stream allocation process based on the sorting results. For example, if data streams A, B, and C are sorted in descending order of popularity, resulting in data streams C, B, and A, and the service device first allocates bandwidth 'a' to data stream C and bandwidth 'b' to data stream B, and then there is insufficient bandwidth to allocate to data stream B, then the maximum number of data streams allowed to be deployed can be reduced to 2.
[0074] To ensure that the first target service device has sufficient capacity to deploy the target data stream, in some embodiments, the electronic device can determine whether the available computing resources of the first service device exceed a threshold after determining that the number of data streams deployed in a group of service devices is less than the maximum allowed number of data streams. That is, the electronic device can determine whether the first service device has sufficient computing resources to support providing data services associated with the target data stream to the terminal device. Available computing resources can be any appropriate resource on the service device that can be used to perform computing tasks. As an example, available computing resources can indicate the remaining available bandwidth of the target service device. Of course, available computing resources can also indicate the target service device's memory freeness, the free value corresponding to the central processing unit, etc., which will not be elaborated here. The threshold can be set according to requirements; it only needs to be set to a value not less than 0 to ensure that the service device has available computing resources for data stream transmission. To improve the quality of data stream transmission, the electronic device can set the threshold higher. As an example, the threshold can be 0.
[0075] In some embodiments, an electronic device may identify a first service device as a first target service device in response to the availability of computing resources of the first service device being greater than a threshold.
[0076] In box 240, the electronic device triggers the first target service device to deploy the target data stream, so that the first target service device responds to the service acquisition request of the terminal device to provide the terminal device with data services associated with the target data stream, wherein the service acquisition request is generated by the terminal device based on the identification information of the first target service device.
[0077] As an example, after identifying a first target service device, an electronic device can deploy a target data stream to the first target service device and send the identification information of the first target service device to a terminal device. The terminal device can then send a service acquisition request to the first target service device based on the identification information to obtain data services associated with the target data stream.
[0078] As another example, an electronic device can send identification information of a first target service device to a terminal device. Based on this identification information, the terminal device can send a service acquisition request to the first target service device. In response to receiving the service acquisition request from the terminal device, the first target service device can send a deployment request for a target data stream to the electronic device. Upon receiving the deployment request, the electronic device can trigger the first target service device to deploy the target data stream. Once the first target service device has deployed the target data stream, it can provide the terminal device with data services associated with that target data stream.
[0079] The following describes how a service device with a deployed target data stream provides data services associated with the target data stream to a terminal device.
[0080] In some embodiments, an electronic device may, in response to the presence of a service device in a group of service devices that deploys the target data stream, determine whether the available computing resources of the service device that deploys the target data stream are greater than a threshold. That is, if there is a service device in this group of service devices that can provide data services associated with the target data stream, it may further determine whether there is a service device with available computing resources among the service devices that can provide data services associated with the target data stream.
[0081] The electronic device can identify the service device that deploys the target data stream as the second target service device in response to the fact that the available computing resources of the service device that deploys the target data stream are greater than a threshold. That is, the electronic device can identify the service device that has sufficient available computing resources and deploys the target data stream as the service device that provides data services associated with the target data stream to the terminal device.
[0082] Electronic devices can send identification information of a second target service device to terminal devices. Terminal devices can send a second service acquisition request to the second target service device based on the identification information. Upon receiving the second service acquisition request, the second target service device can provide data services associated with the target data stream to the terminal device.
[0083] In some embodiments, in response to the availability of computing resources of the service device deploying the target data stream being less than or equal to a threshold, the electronic device performs an operation to determine the first target service device based on the fact that the number of data streams already deployed in a group of service devices is less than the maximum number of data streams allowed to be deployed. That is, the electronic device can select a service device from this group of service devices to deploy the target data stream, so that the terminal device can obtain data services associated with the target data stream based on the service device that has already deployed the target data stream.
[0084] In some embodiments, when there is a service device in a group of service devices that deploys the target data stream, but the available computing resources of the service device that deploys the target data stream are less than or equal to a threshold, the process of determining the final service device from the group of service devices to deploy the target data stream can be the same as the process of determining the first target service device from the group of service devices to deploy the target data stream when there is no service device in this group of service devices that deploys the target data stream, and will not be elaborated here.
[0085] Figure 4 A system schematic diagram of data flow deployment according to some embodiments of the present disclosure is shown, now for... Figure 4 Please provide an explanation.
[0086] In some embodiments, each of a group of service devices (including service device 130-1, service device 130-2, and service device 130-3) may include a data stream popularity prediction module 401 and a maximum number of data streams that can be deployed, estimation module 402. Prediction module 401 determines the popularity information of each data stream based on the number of users who have accessed each deployed data stream on the service device during historical time periods. Estimation module 402 estimates the maximum number of data streams that the service device can deploy based on the popularity information of each data stream on the service device.
[0087] This group of service devices reports the deployment status of their respective data streams to the scheduling service device (electronic device). The deployment status of the data streams may include the number of data streams deployed by the service device, the maximum number of data streams allowed to be deployed, the remaining available bandwidth, etc.
[0088] The scheduling service equipment may include a device status management module 403, a device list module 404 for data flow deployment, and a device selection module 405.
[0089] The device status management module 403 is used to receive and manage the deployment status of the data stream of this group of service devices.
[0090] The device list module 404 for data stream deployment is used to manage information about the service devices that deploy the data stream for each data stream.
[0091] The device selection module 405 is used to perform data flow return based on the deployment status of the data streams of the group of service devices managed by the device status management module 403. When a scheduling service device receives a viewing request (receiving a service query request from a terminal device, the service query request is used to query the service device providing the target data stream), the device selection module 405 can first check whether there are any service devices with remaining service capacity (i.e., check service devices that have deployed the target data stream and whose available computing resources are greater than the threshold) based on the information managed by the device list module 404 and the device status management module 403. In response to determining that there are service devices with remaining service capacity, the device selection module 405 can determine that this service device is the device that will subsequently provide data services associated with the target data stream to the terminal device. When new data enters the system (i.e., there are no service devices in this group of service devices that have deployed the target data stream) or when the deployed devices are full (i.e., there are service devices in this group of service devices that have deployed the target data stream, but the available computing resources of the service devices that have deployed the target data stream are less than or equal to the threshold), the device selection module 405 can find new service devices to deploy the target data stream. Specifically, the device selection module 405 can find new service devices from devices with remaining stream tasks to deploy the target data stream, so that the number of data streams deployed on the device deploying the target data stream will not exceed the maximum number of data streams allowed to be deployed.
[0092] Based on this approach, embodiments of this disclosure can accurately predict the maximum number of data streams that a service device can deploy, based on the popularity information of data streams already deployed on the service device. This ensures that when the maximum number of data streams deployed on a service device is reached, it will no longer accept the transmission and deployment of new data streams. This guarantees that the data streams already deployed on the service device can reserve sufficient resources to accommodate future users seeking data streams, achieving an aggregation effect. Furthermore, compared to not deploying the target data stream on each service device, embodiments of this disclosure can effectively reduce back-to-origin bandwidth costs.
[0093] Example devices and equipment
[0094] Embodiments of this disclosure also provide corresponding apparatus for implementing the above methods or processes. Figure 5 A schematic structural block diagram of a data stream processing apparatus 500 according to certain embodiments of the present disclosure is shown. Apparatus 500 may be implemented as or included in the electronic device 110 discussed above. Various modules / components in apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.
[0095] like Figure 5As shown, the apparatus 500 includes a receiving module 510 configured to receive a service query request from a terminal device, the service query request being used to query a service device providing a target data stream; a first determining module 520 configured to determine whether a service device deploying the target data stream exists in a group of service devices; a second determining module 530 configured to, in response to the absence of a service device deploying the target data stream in a group of service devices, determine a first target service device based on a first service device whose number of deployed data streams in the group of service devices is less than the maximum number of data streams allowed to be deployed, wherein the maximum number of data streams allowed to be deployed by the first service device is determined based on the popularity information of the data streams deployed on the first service device in a historical period, the popularity information being determined based on the number of users who obtained the data stream in the historical period; and a triggering module 540 configured to trigger the first target service device to deploy the target data stream, so that the first target service device provides a data service associated with the target data stream to the terminal device in response to a service acquisition request from the terminal device, wherein the service acquisition request is generated by the terminal device based on the identification information of the first target service device.
[0096] In some embodiments, the maximum number of data streams that a service device is allowed to deploy is determined based on the following process: the service device obtains the historical number of users for which a set of data streams has been deployed in a historical period; the service device determines the expected number of users for a set of data streams in a target period based on the historical number of users; the service device determines the bandwidth information allocated to the deployed set of data streams based on the expected number of users; the service device determines the remaining bandwidth of the service device based on the bandwidth information; and the service device determines the maximum number of data streams that the service device is allowed to deploy based on the remaining bandwidth.
[0097] In some embodiments, determining the expected number of users for a set of data streams within a target time period based on the historical number of users includes: determining the trend of the number of users within a historical time period based on the historical number of users; and determining the expected number of users for a set of data streams within a target time period based on the trend of the trend.
[0098] In some embodiments, determining the maximum number of data streams that the service device is allowed to deploy based on the remaining bandwidth includes: determining the comparison result between the remaining bandwidth and the preset bandwidth; and determining the maximum number of data streams that the service device is allowed to deploy based on the comparison result.
[0099] In some embodiments, determining the maximum number of data streams that the service device is allowed to deploy based on the comparison results includes: increasing the maximum number of data streams that the service device is allowed to deploy in response to the remaining bandwidth being greater than the preset bandwidth; or decreasing the maximum number of data streams that the service device is allowed to deploy in response to the remaining bandwidth being less than the preset bandwidth.
[0100] In some embodiments, the second determining module 530 is further configured to: determine whether the available computing resources of the first service device are greater than a threshold; and in response to the available computing resources of the first service device being greater than the threshold, determine the first service device as the first target service device.
[0101] In some embodiments, the apparatus 500 further includes a third determining module configured to: determine whether the available computing resources of the service device deploying the target data stream are greater than a threshold if there is a service device deploying the target data stream in a group of service devices; a fourth determining module configured to: determine the service device deploying the target data stream as a second target service device in response to the fact that the available computing resources of the service device deploying the target data stream are greater than the threshold; and a sending module configured to: send identification information of the second target service device to the terminal device so that the terminal device can obtain data services associated with the target data stream in the second target service device, wherein the data services associated with the target data stream in the second target service device are sent by the second target service device after the terminal device sends a second service acquisition request to the second target service device based on the identification information of the second target service device.
[0102] In some embodiments, the apparatus 500 further includes an execution module configured to: in response to a service device having available computing resources less than or equal to a threshold, execute an operation to determine a first target service device based on the fact that the number of data streams deployed in a set of service devices is less than the maximum number of data streams allowed to be deployed.
[0103] In some embodiments, the first determining module 520 is further configured to: obtain service deployment information, the service deployment information indicating the service devices that have deployed the corresponding data stream; and determine, based on the service deployment information, whether a group of service devices includes the service devices that have deployed the target data stream.
[0104] In some embodiments, the number of deployed data streams and the maximum number of data streams allowed to be deployed for a set of service devices are determined by periodically obtaining reporting messages from a set of service devices and determining the number of deployed data streams and the maximum number of data streams allowed to be deployed for a set of service devices based on the reporting messages.
[0105] In some embodiments, available computing resources indicate the remaining available bandwidth.
[0106] In some embodiments, the target data stream includes a live stream.
[0107] The units included in device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units may be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units in device 500 may be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that may be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.
[0108] Figure 6 A block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 6 The electronic device 600 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to achieve Figure 1 The electronic device 110 shown.
[0109] like Figure 6 As shown, electronic device 600 is in the form of a general-purpose electronic device. Components of electronic device 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. Processing unit 610 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 600.
[0110] Electronic device 600 typically includes multiple computer storage media. Such media can be any accessible media that is accessible to electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 620 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 630 can be a removable or non-removable medium and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within electronic device 600.
[0111] Electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 6 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 620 may include computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0112] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 600 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 600 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0113] Input device 650 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 660 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 600 can also communicate with one or more external devices (not shown) via communication unit 640 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 600, or with any device that enables electronic device 600 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).
[0114] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.
[0115] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0116] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0117] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0119] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A data stream processing method, comprising: Receive a service query request from the terminal device, the service query request being used to query the service device that provides the target data stream; Determine whether a service device deploying the target data stream exists within a group of service devices; In response to the absence of a service device deploying the target data stream in the group of service devices, a first target service device is determined based on a first service device whose number of deployed data streams in the group of service devices is less than the maximum number of data streams allowed to be deployed. The maximum number of data streams allowed to be deployed on the first service device is determined based on the popularity information of the data streams deployed on the first service device in a historical period. The popularity information is determined based on the number of users who obtained the data streams in the historical period. as well as The first target service device is triggered to deploy the target data stream, so that the first target service device provides data services associated with the target data stream to the terminal device in response to the service acquisition request of the terminal device, wherein the service acquisition request is generated by the terminal device based on the identification information of the first target service device.
2. The method of claim 1, wherein the maximum number of data streams allowed to be deployed by the service device is determined based on the following process: The service device obtains the historical number of users for which a set of data streams has been deployed during the historical period. The service device determines the expected number of users for the set of data streams within the target time period based on the historical user count; as well as The bandwidth information allocated to a set of deployed data streams is determined by the service device based on the expected number of users; The remaining bandwidth of the service device is determined based on the bandwidth information; as well as The service device determines the maximum number of data streams that it is allowed to deploy based on the remaining bandwidth.
3. The method according to claim 2, wherein determining the expected number of users for the set of data streams within the target time period based on the historical user count comprises: Based on the historical user count, determine the trend of user number changes within the historical period. as well as Based on the aforementioned trend, the expected number of users for the set of data streams within the target time period is determined.
4. The method of claim 2, wherein determining the maximum number of data streams that the service device is allowed to deploy based on the remaining bandwidth comprises: Determine the comparison result between the remaining bandwidth and the preset bandwidth; as well as Based on the comparison results, the maximum number of data streams that the service device is allowed to deploy is determined.
5. The method of claim 4, wherein determining the maximum number of data streams that the service device is allowed to deploy based on the comparison result comprises: In response to the remaining bandwidth being greater than the preset bandwidth, the maximum number of data streams that the service device is allowed to deploy is increased; or In response to the remaining bandwidth being less than the preset bandwidth, the maximum number of data streams that the service device is allowed to deploy is reduced.
6. The method of claim 1, wherein determining the first target service device based on a first service device whose number of deployed data streams in the group of service devices is less than the maximum number of data streams allowed to be deployed comprises: Determine whether the available computing resources of the first service device are greater than the threshold. as well as In response to the fact that the available computing resources of the first service device are greater than the threshold, the first service device is identified as the first target service device.
7. The method according to claim 1, wherein, After determining whether a service device deploying the target data stream exists among a group of service devices, the method further includes: In response to the presence of a service device deploying the target data stream in the group of service devices, it is determined whether the available computing resources of the service device deploying the target data stream are greater than a threshold. In response to the fact that the available computing resources of the service device deploying the target data stream exceed a threshold, the service device deploying the target data stream is identified as the second target service device; and The terminal device sends the identification information of the second target service device to the terminal device so that the terminal device can obtain the data service associated with the target data stream in the second target service device. The data service associated with the target data stream in the second target service device is sent by the second target service device after the terminal device sends a second service acquisition request to the second target service device based on the identification information of the second target service device.
8. The method according to claim 7, wherein, After determining whether the available computing resources of the service device deploying the target data stream exceed a threshold, the method further includes: In response to the fact that the available computing resources of the service device deploying the target data stream are less than or equal to the threshold, the operation of determining the first target service device is performed based on the fact that the number of data streams deployed in the group of service devices is less than the maximum number of data streams allowed to be deployed.
9. The method of claim 1, wherein determining whether a service device deploying the target data stream exists among a group of service devices comprises: Obtain service deployment information, which indicates the service devices that have deployed the corresponding data streams; as well as Based on the service deployment information, determine whether the group of service devices includes the service devices for the target data stream that have been deployed.
10. The method of claim 1, wherein the number of deployed data streams of the set of service devices and the maximum number of data streams allowed to be deployed are determined based on the following: Periodically retrieve reported messages from the set of service devices; and Based on the reported message, the number of deployed data streams of the group of service devices and the maximum number of data streams allowed to be deployed are determined.
11. The method of claim 6 or 7, wherein the available computing resources indicate the remaining available bandwidth.
12. The method of claim 1, wherein the target data stream includes a live stream.
13. An apparatus for data stream processing, comprising: The receiving module is configured to receive a service query request from a terminal device, the service query request being used to query a service device that provides a target data stream; The first determining module is configured to determine whether a group of service devices has a service device that deploys the target data stream. The second determining module is configured to, in response to the absence of a service device deploying the target data stream in the group of service devices, determine a first target service device based on a first service device whose number of deployed data streams in the group of service devices is less than the maximum number of data streams allowed to be deployed, wherein the maximum number of data streams allowed to be deployed in the first service device is determined based on the popularity information of the data streams deployed on the first service device in a historical period, and the popularity information is determined based on the number of users who obtained the data streams in the historical period; as well as The triggering module is configured to trigger the first target service device to deploy the target data stream, so that the first target service device provides the terminal device with data services associated with the target data stream in response to the service acquisition request of the terminal device, wherein the service acquisition request is generated by the terminal device based on the identification information of the first target service device.
14. An electronic device comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 12 when executed by the at least one processing unit.
15. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of claims 1 to 12.