Address allocation method, device, equipment and storage medium based on cloud mobile phone streaming
By obtaining the IP address and subnet information of the cloud phone and combining it with the preset IP network segment, an IP address is automatically allocated for the cloud phone's streaming service, solving the problem that the physical machine streaming method cannot be applied in the virtual network and achieving efficient IP address allocation.
Patent Information
- Application Number
- CN202410281823.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-03-12
AI Technical Summary
In a virtual network, the physical machine streaming method cannot be directly applied because the streaming program running on the physical machine lacks a separate IP address, making it impossible to allocate an IP address for the streaming program.
By obtaining the cloud phone's Internet Protocol (IP) address and IP subnet information, and combining it with a preset IP network segment, the cloud phone's streaming address is automatically determined. This method includes obtaining the cloud phone's IP address and IP subnet information, determining the streaming address based on the preset IP network segment, and ensuring that the streaming address is associated with the cloud phone's IP address.
It realizes the automatic allocation of IP addresses for the streaming service of cloud phones, reduces the user's operation of allocating IP addresses, supports physical machine streaming in virtual networks, and improves the efficiency and accuracy of streaming address allocation.
Smart Images

Figure CN118175139B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud computing in the computer field, and in particular to an address allocation method, device, equipment and storage medium based on cloud mobile phone streaming. Background Art
[0002] Cloud phone streaming refers to a data streaming service based on a cloud phone. This can be performed on a physical machine. When using a physical machine for cloud phone streaming, the streaming program running on the physical machine does not have a separate IP (Internet Protocol) address; instead, it uses the cloud phone's IP address directly.
[0003] The physical machine streaming method cannot be applied in a virtual network. To support the physical machine streaming method in a virtual network, the streaming program needs to be assigned its own IP address. How to assign an IP address to the streaming program becomes an urgent problem. Summary of the Invention
[0004] The present disclosure provides an address allocation method, apparatus, device and storage medium based on cloud mobile phone streaming.
[0005] According to a first aspect of the present disclosure, a method for allocating addresses based on cloud phone streaming is provided, comprising:
[0006] Obtaining the Internet Protocol IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the IP address of the cloud phone represents the location information of the cloud phone, and the IP subnet information represents the network range where the IP address is located;
[0007] According to the IP address of the cloud phone and the IP subnet information of the cloud phone, based on the preset IP network segment, the streaming address of the cloud phone is determined; wherein, the preset IP network segment is a preset network range, the streaming address represents the IP address of the streaming program of the cloud phone, and the streaming program represents the program that supports streaming on the cloud phone.
[0008] According to a second aspect of the present disclosure, there is provided an address allocation device based on cloud phone streaming, comprising:
[0009] An IP acquisition unit, configured to acquire the Internet Protocol IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the IP address of the cloud phone represents the location information of the cloud phone, and the IP subnet information represents the network range where the IP address is located;
[0010] The address determination unit is used to determine the streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the cloud phone and based on a preset IP network segment; wherein the preset IP network segment is a preset network range, the streaming address represents the IP address of the streaming program of the cloud phone, and the streaming program represents the program that supports streaming on the cloud phone.
[0011] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0012] at least one processor; and
[0013] a memory communicatively coupled to the at least one processor;
[0014] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect.
[0015] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the first aspect.
[0016] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising: a computer program, which implements the method described in the first aspect when executed by a processor.
[0017] According to the technology disclosed in the present invention, automatic allocation of IP addresses for streaming services of cloud phones is achieved.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.
[0020] Figure 1 This is a flow chart of an address allocation method based on cloud phone streaming provided in accordance with an embodiment of the present disclosure;
[0021] Figure 2 This is a flow chart of an address allocation method based on cloud phone streaming provided in accordance with an embodiment of the present disclosure;
[0022] Figure 3 This is a schematic diagram of the process of generating a streaming address according to an embodiment of the present disclosure;
[0023] Figure 4 This is a flow chart of an address allocation method based on cloud phone streaming provided in accordance with an embodiment of the present disclosure;
[0024] Figure 5 This is a structural block diagram of an address allocation device based on cloud mobile phone streaming provided in accordance with an embodiment of the present disclosure;
[0025] Figure 6 This is a structural block diagram of an address allocation device based on cloud mobile phone streaming provided in accordance with an embodiment of the present disclosure;
[0026] Figure 7 This is a block diagram of an electronic device used to implement the address allocation method based on cloud mobile phone streaming according to an embodiment of the present disclosure;
[0027] Figure 8 This is a block diagram of an electronic device used to implement the address allocation method based on cloud phone streaming in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0029] Cloud phone streaming can be done either on a physical machine or within a virtual machine. For physical machine streaming, the streaming program running on the physical machine doesn't have a dedicated IP address. The cloud phone's PaaS (Platform as a Service) only manages the cloud phone's IP address, meaning the streaming program directly uses the cloud phone's IP address.
[0030] To support streaming from physical machines within virtual networks, the network traffic of the streaming program originally running on the physical machine needs to be integrated into the VPC (Virtual Private Cloud), and the streaming program needs to be assigned a corresponding IP address. Adding a separate IP address for the streaming program on the cloud phone PaaS platform would double the IP requirements, potentially leading to duplicate IP addresses for each streaming program, affecting streaming performance. Therefore, a better IP allocation method is needed.
[0031] The present disclosure provides an address allocation method, device, equipment and storage medium based on cloud phone streaming, which are applied to the cloud computing field in the computer field to realize the allocation of IP addresses for the streaming service of cloud phones.
[0032] It should be noted that the data in this embodiment is not targeted at a specific user and does not reflect the personal information of a specific user. It should be noted that the data in this embodiment comes from a public data set.
[0033] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0034] In order to enable readers to have a deeper understanding of the implementation principle of this disclosure, the following Figures 1-8 The embodiment is further refined.
[0035] Figure 1 This is a flow chart of an address allocation method based on cloud mobile phone streaming provided in accordance with an embodiment of the present disclosure. This method can be performed by an address allocation device based on cloud mobile phone streaming. Figure 1 As shown, the method includes the following steps:
[0036] S101. Obtain the IP address and IP subnet information of the cloud phone; wherein the IP address of the cloud phone represents the location information of the cloud phone, and the IP subnet information represents the network range where the IP address is located.
[0037] For example, the IP address of the streaming program in the VPC can be allocated by the NFV (Network Function Virtualization) controller, and the allocated IP address is transparent to the NFV management platform and the cloud phone PaaS platform. In other words, the NFV management platform and the cloud phone PaaS platform can transparently obtain the allocated IP address of the streaming program.
[0038] Each cloud phone has its own IP address and IP subnet information. The NFV controller can directly obtain the cloud phone's IP address and IP subnet information. The cloud phone's IP address represents its location and uniquely identifies it. Each cloud phone has a different IP address. The IP subnet information represents an IP subnet and is the network range within which the IP address resides. For example, the cloud phone's IP address can be represented as 10.1.3.19 / 24, and its IP subnet information can be represented as 10.1.3.0 / 24.
[0039] An IP address is a 32-bit binary number, typically divided into four 8-bit binary numbers, or four bytes. These four bytes include the network number and the host number. An IP address consists of these two numbers. An IP subnet also consists of these two numbers. The number after the " / " indicates the number of bits in the network number. In this embodiment, the number of bits in the network number in the cloud phone's IP address and the number of bits in the IP subnet information can be the same.
[0040] S102. Determine the streaming address of the cloud phone based on the IP address and IP subnet information of the cloud phone and the preset IP network segment; wherein the preset IP network segment is a preset network range, the streaming address represents the IP address of the streaming program of the cloud phone, and the streaming program represents the program that supports streaming on the cloud phone.
[0041] For example, after obtaining the cloud phone's IP address and IP subnet information, the cloud phone's streaming address can be determined based on the cloud phone's IP address and IP subnet information. The streaming address represents the IP address of the cloud phone's streaming program, which is the program that supports streaming on the cloud phone. In other words, an IP address different from the cloud phone's IP address can be automatically assigned as the streaming program's IP address.
[0042] For each cloud phone, a fixed IP network segment is pre-set, and the IP network segment represents a network range. For example, the preset IP network segment is 100.64.0.0 / 10. Based on the IP address and IP subnet information of the cloud phone, an IP address can be determined from the range of the preset IP network segment as the streaming address. For example, based on the number of bits of the network number in the IP address or IP subnet information of the cloud phone, an IP address can be randomly determined from the IP network segment, so that the number of bits of the network number of the determined IP address is the same as the number of bits of the network number in the IP address or IP subnet information of the cloud phone, and ensure that there is no duplication between the determined IP address and the previously determined streaming address.
[0043] That is, each time an IP address is determined, the currently determined IP address can be compared with the previously determined streaming address. If the currently determined IP address is not the previously determined streaming address, the currently determined IP address can be used as the streaming address of the cloud phone; if the currently determined IP address is the previously determined streaming address, another IP address can be randomly determined from the preset IP network segment and judged again until the determined IP address is not the previously determined streaming address, and the determined IP address can be used as the streaming address of the cloud phone.
[0044] Alternatively, you can first randomly select an IP address from a preset IP network segment based on the number of network digits in the cloud phone's IP subnet information, and use it as a new IP subnet. This ensures that the number of network digits in the new IP subnet matches the number of network digits in the cloud phone's IP subnet information. Then, based on the cloud phone's IP address, you can allocate an IP address from the new IP subnet to serve as the streaming address. For example, you can allocate an IP address from the new IP subnet based on the host number in the cloud phone's IP address, ensuring that the host number of the allocated IP address matches the host number in the cloud phone's IP address.
[0045] In the disclosed embodiments, each cloud phone is assigned an IP address and IP subnet information. Within a preset IP network segment, the IP address of the streaming service is automatically generated based on the cloud phone's IP address and IP subnet information. This reduces the need for users to allocate IP addresses, thereby supporting the physical machine streaming method within virtual network technology. Furthermore, there is no need to add an IP address for the streaming program to the cloud phone PaaS and related platforms; the NFV controller automatically allocates the IP address for the streaming program, improving the efficiency and accuracy of streaming address allocation.
[0046] Figure 2 A flowchart of an address allocation method based on cloud phone streaming provided in an embodiment of the present disclosure.
[0047] In this embodiment, the streaming address of the cloud phone is determined based on the IP address of the cloud phone and the IP subnet information of the cloud phone, based on the preset IP network segment, which can be further refined as follows: according to the IP subnet information of the cloud phone and the preset IP network segment, the IP subnet information of the streaming program of the cloud phone is determined; according to the IP address of the cloud phone and the IP subnet information of the streaming program of the cloud phone, the streaming address of the cloud phone is determined.
[0048] like Figure 2 As shown, the method includes the following steps:
[0049] S201. Obtain the Internet Protocol IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the IP address of the cloud phone represents the location information of the cloud phone, and the IP subnet information represents the network range where the IP address is located.
[0050] For example, this step may refer to the above-mentioned step S101 and will not be described in detail.
[0051] S202. Determine the IP subnet information of the cloud phone's streaming program based on the cloud phone's IP subnet information and a preset IP network segment.
[0052] Exemplarily, an IP network segment is pre-set, and based on the IP subnet information of the cloud phone, a network range of an IP address is determined from the preset IP network segment as the IP subnet information of the cloud phone's streaming program. The number of bits of the network number can be obtained from the IP subnet information of the cloud phone, so that the network number in the IP subnet information of the streaming program is consistent with the number of bits of the network number in the IP subnet information of the cloud phone. The number of bits of the network number can be expressed after the " / " in the IP address. For example, for 10.1.3.19 / 24, the number of bits of the network number is 24, that is, the network number part is the first three bytes 10.1.3.0, and the host number part is the fourth byte 0.0.0.19.
[0053] Determine an IP range from the preset IP network segment. Based on the number of network digits in the cloud phone's IP subnet information, divide this IP range into host and network digits. This division yields the IP subnet information for the streaming program. For example, if the IP range determined from the preset IP network segment is 100.64.1.0 and the number of network digits in the cloud phone's IP subnet information is 24, then the IP subnet information for the streaming program can be determined to be 100.64.1.0 / 24.
[0054] In this embodiment, the IP subnet information of the cloud phone's streaming program is determined based on the cloud phone's IP subnet information and a preset IP network segment, including: determining the number of bits of the network number in the cloud phone's IP subnet information; determining the IP subnet information of the cloud phone's streaming program based on the number of bits of the network number in the cloud phone's IP subnet information and a preset IP network segment.
[0055] Specifically, the number of bits in the network number is obtained from the cloud phone's IP subnet information. For example, if the cloud phone's IP subnet information is 10.1.3.0 / 24, then it can be determined that the number of bits in the network number is 24. Based on the number of bits in the network number in the cloud phone's IP subnet information, the IP subnet information of the cloud phone's streaming program is determined from the preset IP network segment.
[0056] The IP subnet information of the streaming program can include 4 8-bit binary numbers, that is, 4 bytes. Determine 4 bytes from the preset IP network segment, and then combine them with the number of bits of the network number in the IP subnet information of the cloud phone to obtain complete IP subnet information. For example, if the 4 bytes are determined to be 100.64.1.0 and the number of bits of the network number is 24, then the IP subnet information of the streaming program is 100.64.1.0 / 24. In this embodiment, there is no specific limitation on the method of determining these 4 bytes, as long as it is within the range of the preset IP network segment. For example, 4 bytes can be randomly determined from the preset IP network segment.
[0057] The beneficial effect of this setting is that the number of bits in the network number can be used to divide the network number and host number in the IP, thereby determining the precise IP subnet information and ensuring that the IP subnet information is within the preset IP network segment, thereby realizing the management of IP subnet information and improving the efficiency and accuracy of determining the streaming address.
[0058] In this embodiment, the IP subnet information of the cloud phone's streaming program is determined based on the number of bits of the network number in the cloud phone's IP subnet information and the preset IP network segment, including: based on the preset IP allocation rules and the number of bits of the network number in the cloud phone's IP subnet information, the IP subnet information of the cloud phone's streaming program is determined from the preset IP network segment.
[0059] Specifically, an IP allocation rule is pre-set, and the IP allocation rule is used to determine the IP subnet information of the streaming program. For example, the IP allocation rule may be to obtain the IP subnet information from a preset IP network segment according to a preset IP arrangement order to avoid duplication of IP subnet information. Exemplarily, the preset IP network segment is 100.64.0.0 / 10, and the preset IP arrangement order may be that the first three bytes remain unchanged, and the fourth byte is arranged in ascending order. That is, when the IP subnet information is determined for the first time, the four bytes 100.64.0.0 can be obtained; when the IP subnet information is determined for the second time, the four bytes 100.64.0.1 can be obtained; when the IP subnet information is determined for the third time, the four bytes 100.64.0.2 can be obtained.
[0060] The IP allocation rules do not affect the number of network digits in the IP subnet information. After the four bytes are allocated, the number of network digits in the IP subnet information of the cloud phone's streaming program is still determined based on the number of network digits in the cloud phone's IP subnet information, thus obtaining the complete IP subnet information of the streaming program. For example, if the preset IP network segment is 100.64.0.0 / 10 and the cloud phone's IP subnet information is 10.1.3.0 / 24, the IP subnet information of the streaming program can be 100.64.1.0 / 24.
[0061] The beneficial effect of this setting is that the IP allocation rules can be set according to actual needs. According to the number of bits of the network number in the IP subnet information of the cloud phone, the IP subnet information of the streaming service can be automatically determined from the preset IP network segment, thereby improving the efficiency and flexibility of determining the IP subnet information of the streaming service.
[0062] In this embodiment, according to the number of bits of the network number in the IP subnet information of the cloud phone and based on the preset IP allocation rules, the IP subnet information of the cloud phone's streaming program is determined from the preset IP network segment, including: determining the historical IP subnet information generated from the preset IP network segment; wherein the historical IP subnet information represents the IP subnet information generated within a preset historical time period; according to the number of bits of the network number in the IP subnet information of the cloud phone, determining the candidate IP subnet information from the preset IP network segment; if the candidate IP subnet information is not in the historical IP subnet information, determining the candidate IP subnet information as the IP subnet information of the cloud phone's streaming program.
[0063] Specifically, each time the IP subnet information of a streaming program is determined, the determined IP subnet information is stored as historical IP subnet information. When the IP subnet information of a new streaming program for a cloud phone needs to be determined, the historical IP subnet information within a preset historical time period can be searched. In other words, the historical IP subnet information can represent the IP subnet information of streaming programs generated within the preset historical time period.
[0064] Based on the number of network digits in the cloud phone's IP subnet information, candidate IP subnet information is determined from a preset IP network segment. For example, four bytes can be randomly determined from the preset IP network segment and then combined with the number of network digits. The resulting IP subnet information is then determined as the candidate IP subnet information. Alternatively, a four-byte IP address can be obtained based on the order of IP addresses in the preset IP network segment and then combined with the number of network digits to obtain the candidate IP subnet information.
[0065] After obtaining the candidate IP subnet information, the candidate IP subnet information is compared with the historical IP subnet information. If the candidate IP subnet information is not in the historical IP subnet information, it is determined that the candidate IP subnet information is a new IP subnet and can be determined as the IP subnet information of the cloud phone's streaming program. If the candidate IP subnet information is in the historical IP subnet information, it is determined that the candidate IP subnet information is duplicated and a new candidate IP subnet information needs to be determined.
[0066] The beneficial effect of this setting is that by comparing the candidate IP subnet information with the historical IP subnet information, IP duplication can be effectively avoided and the accuracy of determining the streaming address can be improved.
[0067] In this embodiment, the method further includes: if the candidate IP subnet information is located in the historical IP subnet information, determining the network number and host number in the candidate IP subnet information; adding one to the network number in the candidate IP subnet information to obtain a new network number; and obtaining new candidate IP subnet information based on the host number and the new network number in the candidate IP subnet information, until the obtained candidate IP subnet information is no longer in the historical IP subnet information.
[0068] Specifically, if the candidate IP subnet information is located in the historical IP subnet information, it is determined that the candidate IP subnet information has been generated within a preset historical time period, and a new candidate IP subnet information needs to be generated.
[0069] The network number and host number in the candidate IP subnet information can be determined based on the number of digits in the network number in the candidate IP subnet information. For example, if the candidate IP subnet information is 100.64.0.0 / 24 and the number of digits in the network number is 24, then it can be determined that the network number is the first three bytes and the host number is the fourth byte. Add one to the number represented by the network number to obtain a new network number. For example, if the network number represents the number 100.64.0, the new network number can be expressed as 100.64.1. The host number remains unchanged, and the new candidate IP subnet information is obtained based on the host number and the new network number in the candidate IP subnet information. Determine again whether the new candidate IP subnet information is in the historical IP subnet information until the obtained candidate IP subnet information is not in the historical IP subnet information.
[0070] The beneficial effect of such a setting is that if duplicate candidate IP subnet information is generated, the candidate IP subnet information can be automatically updated, thereby improving the accuracy and efficiency of determining the streaming address.
[0071] S203: Determine the streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the streaming program of the cloud phone.
[0072] For example, after obtaining the IP subnet information of the cloud phone's streaming program, the cloud phone's streaming address is obtained by combining the cloud phone's IP address and the streaming program's IP subnet information. Based on the cloud phone's IP address, an IP address can be determined from the streaming program's IP subnet information to serve as the cloud phone's streaming address. For example, the number of network digits in the cloud phone's IP address can be determined, and a four-byte IP address can be randomly obtained from the range of the streaming program's IP subnet information. This IP address is then combined with the number of network digits in the cloud phone's IP address to obtain the complete streaming address.
[0073] In this embodiment, the IP subnet information of the streaming program is first determined within a preset IP network segment. Then, the IP address of the streaming program is obtained by combining the IP address of the cloud phone and the IP subnet information of the streaming program. This allows the streaming address to be automatically generated within a preset network range, reducing the manual IP allocation process. Furthermore, the generated streaming address can be associated with the IP address of the cloud phone, improving the efficiency and accuracy of streaming address allocation.
[0074] In this embodiment, the streaming address of the cloud phone is determined based on the IP address of the cloud phone and the IP subnet information of the streaming program of the cloud phone, including: determining the host number in the IP address of the cloud phone, and determining the network number in the IP subnet information of the streaming program of the cloud phone; determining the streaming address of the cloud phone based on the host number in the IP address of the cloud phone and the network number in the IP subnet information of the streaming program of the cloud phone.
[0075] Specifically, the host number of the cloud phone's IP address is obtained from the cloud phone's IP address based on the number of bits in the network number. Furthermore, the network number in the IP subnet information of the cloud phone's streaming program is determined based on the number of bits in the network number. For example, if the cloud phone's IP address is 10.1.3.19 / 24 and the IP subnet information of the cloud phone's streaming program is 100.64.1.0 / 24, then the host number in the cloud phone's IP address is 0.0.0.19, and the network number in the IP subnet information of the cloud phone's streaming program is 100.64.1.0.
[0076] The host number in the cloud phone's IP address and the network number in the IP subnet information of the cloud phone's streaming program are concatenated to obtain the cloud phone's streaming address. The concatenation process can be to use the host number in the cloud phone's IP address as the host number of the streaming address, and the network number in the IP subnet information of the cloud phone's streaming program as the network number of the streaming address. That is, the number of digits in the network number in the streaming address is the same as the number of digits in the network number in the cloud phone's IP address, and also the same as the number of digits in the network number in the IP subnet information of the cloud phone's streaming program.
[0077] The beneficial effect of this setting is that the host number in the IP address of the cloud phone and the network number in the IP subnet information of the cloud phone's streaming program are combined to obtain the complete streaming address of the cloud phone, thereby realizing automatic allocation of streaming addresses within a certain network range and improving the allocation efficiency and accuracy of streaming addresses.
[0078] Figure 3 This is a schematic diagram of the generation process of the streaming address. Figure 3In the cloud phone's IP address, the network number is network number 1, and the host number is host number 1. The network number in the streaming program's IP subnet information is network number 2, and the host number is host number 2. Obtain host number 1 and network number 2, and concatenate them to obtain the streaming address.
[0079] In the disclosed embodiments, each cloud phone is assigned an IP address and IP subnet information. Within a preset IP network segment, the IP address of the streaming service is automatically generated based on the cloud phone's IP address and IP subnet information. This reduces the need for users to allocate IP addresses, thereby supporting the physical machine streaming method within virtual network technology. Furthermore, there is no need to add an IP address for the streaming program to the cloud phone PaaS and related platforms; the NFV controller automatically allocates the IP address for the streaming program, improving the efficiency and accuracy of streaming address allocation.
[0080] Figure 4 A flowchart of an address allocation method based on cloud phone streaming provided in an embodiment of the present disclosure.
[0081] In this embodiment, the method also includes: obtaining the streaming address generated within a preset historical time period as the historical streaming address; if the streaming address of the cloud phone is located in the historical streaming address, then again according to the IP address of the cloud phone and the IP subnet information of the cloud phone, based on the preset IP network segment, determine the new streaming address of the cloud phone, until the determined streaming address is not in the historical streaming address.
[0082] like Figure 4 As shown, the method includes the following steps:
[0083] S401. Obtain the Internet Protocol IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the IP address of the cloud phone represents the location information of the cloud phone, and the IP subnet information represents the network range where the IP address is located.
[0084] For example, this step may refer to the above-mentioned step S101 and will not be described in detail.
[0085] S402. Determine the streaming address of the cloud phone based on the IP address and IP subnet information of the cloud phone and the preset IP network segment; wherein the preset IP network segment is a preset network range, the streaming address represents the IP address of the streaming program of the cloud phone, and the streaming program represents the program that supports streaming on the cloud phone.
[0086] For example, this step may refer to the above-mentioned step S102 and will not be described in detail.
[0087] S403: Obtain a streaming address generated within a preset historical time period, which is a historical streaming address.
[0088] For example, after obtaining a streaming address, the historical streaming addresses allocated in a preset historical time period can be obtained. The historical streaming addresses refer to the IP addresses allocated to the streaming program in the historical time period.
[0089] S404. If the streaming address of the cloud phone is in the historical streaming address, the new streaming address of the cloud phone is determined again based on the IP address of the cloud phone and the IP subnet information of the cloud phone and the preset IP network segment until the determined streaming address is not in the historical streaming address.
[0090] For example, determine whether the streaming address of the cloud phone is located in the historical streaming address. If not, determine that the streaming address is a unique IP address and assign the streaming address to the streaming program. If so, determine that the streaming address has been assigned and cannot be assigned to the streaming program again, and a new streaming address needs to be generated.
[0091] The cloud phone's new streaming address can be determined again based on the cloud phone's IP address and IP subnet information, based on the preset IP network segment, until the determined streaming address is no longer in the historical streaming addresses. That is, the cloud phone's new IP subnet information is determined based on the cloud phone's IP subnet information and the preset IP network segment; and then the new streaming address is determined based on the cloud phone's IP address and the new IP subnet information.
[0092] In this embodiment, by comparing the current streaming push address with the historical streaming push address, allocation of duplicate streaming push addresses can be avoided, the uniqueness of the streaming push address can be ensured, and the allocation accuracy of the streaming push address can be improved.
[0093] In this embodiment, the method also includes: if the streaming address of the cloud phone is located in the historical streaming address, then the number of times the streaming address of the cloud phone is generated is recorded; if the number of generations is equal to or greater than the preset number threshold, then a new IP network segment is determined from the preset network segment set, and based on the IP address of the cloud phone and the IP subnet information of the cloud phone, the streaming address of the cloud phone is determined based on the new IP network segment; wherein, the preset network segment set includes multiple IP network segments.
[0094] Specifically, if it is determined that the cloud phone's streaming address is in the historical streaming address, it is determined that a new streaming address needs to be generated, and the number of times the cloud phone's streaming address has been generated is recorded. A number threshold is pre-set, and each time the number of generation times is updated, the number of generation times is compared with the preset number threshold.
[0095] If the number of generation times is equal to or greater than the preset threshold, a new IP segment will need to be determined. Based on the cloud phone's IP address and IP subnet information, the cloud phone's streaming address will be re-determined based on the new IP segment. A segment set can be pre-set, which can include multiple IP segments. An unused IP segment can be randomly selected from the segment set as the new IP segment. Alternatively, staff can determine the new IP segment based on actual business needs.
[0096] The beneficial effect of this setting is that if repeated streaming addresses are always generated, the preset IP network segment can be replaced to ensure that a unique streaming address can be generated, thereby improving the accuracy of determining the streaming address.
[0097] In the disclosed embodiments, each cloud phone is assigned an IP address and IP subnet information. Within a preset IP network segment, the IP address of the streaming service is automatically generated based on the cloud phone's IP address and IP subnet information. This reduces the need for users to allocate IP addresses, thereby supporting the physical machine streaming method within virtual network technology. Furthermore, there is no need to add an IP address for the streaming program to the cloud phone PaaS and related platforms; the NFV controller automatically allocates the IP address for the streaming program, improving the efficiency and accuracy of streaming address allocation.
[0098] Figure 5 This is a structural block diagram of an address allocation device based on cloud mobile phone streaming provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 5 The address allocation device 500 based on cloud mobile phone streaming includes: an IP acquisition unit 501 and an address determination unit 502.
[0099] The IP acquisition unit 501 is used to obtain the Internet Protocol IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the IP address of the cloud phone represents the location information of the cloud phone, and the IP subnet information represents the network range where the IP address is located;
[0100] The address determination unit 502 is used to determine the streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the cloud phone and based on a preset IP network segment; wherein the preset IP network segment is a preset network range, the streaming address represents the IP address of the streaming program of the cloud phone, and the streaming program represents the program that supports streaming on the cloud phone.
[0101] Figure 6 This is a structural block diagram of an address allocation device based on cloud mobile phone streaming provided by an embodiment of the present disclosure, such as Figure 6As shown, the address allocation device 600 based on cloud mobile phone streaming includes an IP acquisition unit 601 and an address determination unit 602, wherein the address determination unit 602 includes a subnet determination module 6021 and an address determination module 6022.
[0102] The subnet determination module 6021 is used to determine the IP subnet information of the streaming program of the cloud phone based on the IP subnet information of the cloud phone and a preset IP network segment;
[0103] The address determination module 6022 is used to determine the streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the streaming program of the cloud phone.
[0104] In one example, the subnet determination module 6021 includes:
[0105] A bit determination submodule, used to determine the number of bits of the network number in the IP subnet information of the cloud phone;
[0106] The information determination submodule is used to determine the IP subnet information of the streaming program of the cloud phone based on the number of bits of the network number in the IP subnet information of the cloud phone and the preset IP network segment.
[0107] In one example, the information determination submodule is specifically used to:
[0108] According to the number of bits of the network number in the IP subnet information of the cloud phone and based on the preset IP allocation rules, the IP subnet information of the streaming program of the cloud phone is determined from the preset IP network segment.
[0109] In one example, the information determination submodule is specifically used to:
[0110] Determining historical IP subnet information generated from the preset IP network segment; wherein the historical IP subnet information represents IP subnet information generated within a preset historical time period;
[0111] Determine candidate IP subnet information from the preset IP network segment based on the number of digits of the network number in the IP subnet information of the cloud phone;
[0112] If the candidate IP subnet information is not in the historical IP subnet information, the candidate IP subnet information is determined to be the IP subnet information of the streaming program of the cloud phone.
[0113] In one example, it also includes:
[0114] a subnet determination unit, configured to determine the network number and host number in the candidate IP subnet information if the candidate IP subnet information is in the historical IP subnet information;
[0115] A network number updating unit, configured to add one to the network number in the candidate IP subnet information to obtain a new network number;
[0116] The subnet updating unit is used to obtain new candidate IP subnet information according to the host number and the new network number in the candidate IP subnet information, until the obtained candidate IP subnet information is not in the historical IP subnet information.
[0117] In one example, the address determination module 6022 includes:
[0118] The first determination submodule is used to determine the host number in the IP address of the cloud phone and the network number in the IP subnet information of the streaming program of the cloud phone;
[0119] The second determination submodule is used to determine the streaming address of the cloud phone according to the host number in the IP address of the cloud phone and the network number in the IP subnet information of the streaming program of the cloud phone.
[0120] In one example, it also includes:
[0121] An address acquisition unit is used to acquire a streaming address generated within a preset historical time period, which is a historical streaming address;
[0122] The address judgment unit is used to determine the new streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the cloud phone, based on the preset IP network segment, if the streaming address of the cloud phone is located in the historical streaming address, until the determined streaming address is not in the historical streaming address.
[0123] In one example, it also includes:
[0124] A number recording unit, configured to record the number of times the push stream address of the cloud phone is generated if the push stream address of the cloud phone is located in the historical push stream addresses;
[0125] The number judgment unit is used to determine a new IP network segment from a preset network segment set if the number of generation times is equal to or greater than a preset number threshold, and determine the streaming address of the cloud phone based on the new IP network segment according to the IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the preset network segment set includes multiple IP network segments.
[0126] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device.
[0127] Figure 7 This is a structural block diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device may be a terminal device or a server. Figure 7As shown, the electronic device 700 includes: at least one processor 702; and a memory 701 communicatively connected to the at least one processor 702; wherein the memory stores instructions that can be executed by the at least one processor 702, and the instructions are executed by the at least one processor 702 to enable the at least one processor 702 to execute the address allocation method based on cloud phone streaming disclosed in the present invention.
[0128] The electronic device 700 further includes a receiver 703 and a transmitter 704. The receiver 703 is used to receive instructions and data sent by other devices, and the transmitter 704 is used to send instructions and data to external devices.
[0129] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0130] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0131] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0132] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0133] Various components in device 800 are connected to I / O interface 805, including an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0134] The computing unit 801 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the address allocation method based on cloud phone streaming. For example, in some embodiments, the address allocation method based on cloud phone streaming can be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the address allocation method based on cloud phone streaming described above can be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the address allocation method based on cloud phone streaming in any other appropriate manner (for example, by means of firmware).
[0135] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0136] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0137] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0138] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0139] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0140] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.
[0141] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0142] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for allocating addresses based on cloud mobile streaming, comprising: Obtaining the Internet Protocol IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the IP address of the cloud phone represents the location information of the cloud phone, and the IP subnet information represents the network range where the IP address is located; According to the IP address of the cloud phone and the IP subnet information of the cloud phone, based on a preset IP network segment, the push stream address of the cloud phone is determined; wherein the preset IP network segment is a preset network range, the push stream address represents the IP address of the push stream program of the cloud phone, and the push stream program represents the program that supports the push stream of the cloud phone; Also includes: Get the push stream address generated within the preset historical time period, which is the historical push stream address; If the streaming address of the cloud phone is in the historical streaming address, the new streaming address of the cloud phone is determined again based on the IP address of the cloud phone and the IP subnet information of the cloud phone and the preset IP network segment until the determined streaming address is no longer in the historical streaming address.
2. The method according to claim 1, wherein The step of determining the streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the cloud phone and based on a preset IP network segment includes: Determine the IP subnet information of the streaming program of the cloud phone based on the IP subnet information of the cloud phone and the preset IP network segment; The streaming address of the cloud phone is determined according to the IP address of the cloud phone and the IP subnet information of the streaming program of the cloud phone.
3. The method according to claim 2, wherein: Determining the IP subnet information of the streaming program of the cloud phone based on the IP subnet information of the cloud phone and a preset IP network segment includes: Determine the number of digits of the network number in the IP subnet information of the cloud phone; The IP subnet information of the streaming program of the cloud phone is determined based on the number of digits of the network number in the IP subnet information of the cloud phone and the preset IP network segment.
4. The method according to claim 3, wherein: The determining of the IP subnet information of the streaming program of the cloud phone according to the number of bits of the network number in the IP subnet information of the cloud phone and the preset IP network segment includes: According to the number of bits of the network number in the IP subnet information of the cloud phone and based on the preset IP allocation rules, the IP subnet information of the streaming program of the cloud phone is determined from the preset IP network segment.
5. The method according to claim 4, wherein The method of determining the IP subnet information of the streaming program of the cloud phone from the preset IP network segment based on the number of digits of the network number in the IP subnet information of the cloud phone and a preset IP allocation rule includes: Determining historical IP subnet information generated from the preset IP network segment; wherein the historical IP subnet information represents IP subnet information generated within a preset historical time period; Determine candidate IP subnet information from the preset IP network segment based on the number of digits of the network number in the IP subnet information of the cloud phone; If the candidate IP subnet information is not in the historical IP subnet information, the candidate IP subnet information is determined to be the IP subnet information of the streaming program of the cloud phone.
6. The method according to claim 5, further comprising: If the candidate IP subnet information is in the historical IP subnet information, determining the network number and host number in the candidate IP subnet information; Add one to the network number in the candidate IP subnet information to obtain a new network number; New candidate IP subnet information is obtained according to the host number and the new network number in the candidate IP subnet information, until the obtained candidate IP subnet information is no longer in the historical IP subnet information.
7. The method according to any one of claims 2 to 6, wherein The determining the streaming address of the cloud phone according to the IP address of the cloud phone and the IP subnet information of the streaming program of the cloud phone includes: Determine the host number in the IP address of the cloud phone, and determine the network number in the IP subnet information of the streaming program of the cloud phone; The streaming address of the cloud phone is determined according to the host number in the IP address of the cloud phone and the network number in the IP subnet information of the streaming program of the cloud phone.
8. The method according to claim 1, further comprising: If the streaming address of the cloud phone is located in the historical streaming addresses, the number of times the streaming address of the cloud phone is generated is recorded; If the number of generation times is equal to or greater than the preset threshold number, a new IP network segment is determined from the preset network segment set, and based on the IP address of the cloud phone and the IP subnet information of the cloud phone, the streaming address of the cloud phone is determined based on the new IP network segment; wherein, the preset network segment set includes multiple IP network segments.
9. An address allocation device based on cloud mobile phone streaming, comprising: An IP acquisition unit, configured to acquire the Internet Protocol IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the IP address of the cloud phone represents the location information of the cloud phone, and the IP subnet information represents the network range where the IP address is located; An address determination unit is configured to determine the streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the cloud phone and a preset IP network segment; wherein the preset IP network segment is a preset network range, the streaming address represents the IP address of the streaming program of the cloud phone, and the streaming program represents a program that supports streaming on the cloud phone; An address acquisition unit is used to acquire a streaming address generated within a preset historical time period, which is a historical streaming address; The address judgment unit is used to determine the new streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the cloud phone, based on the preset IP network segment, if the streaming address of the cloud phone is located in the historical streaming address, until the determined streaming address is not in the historical streaming address.
10. The device according to claim 9, wherein The address determining unit includes: A subnet determination module is used to determine the IP subnet information of the streaming program of the cloud phone based on the IP subnet information of the cloud phone and a preset IP network segment; The address determination module is used to determine the streaming address of the cloud phone based on the IP address of the cloud phone and the IP subnet information of the streaming program of the cloud phone.
11. The device according to claim 10, wherein The subnet determination module includes: A bit determination submodule, used to determine the number of bits of the network number in the IP subnet information of the cloud phone; The information determination submodule is used to determine the IP subnet information of the streaming program of the cloud phone based on the number of bits of the network number in the IP subnet information of the cloud phone and the preset IP network segment.
12. The device according to claim 11, wherein The information determination submodule is specifically used to: According to the number of bits of the network number in the IP subnet information of the cloud phone and based on the preset IP allocation rules, the IP subnet information of the streaming program of the cloud phone is determined from the preset IP network segment.
13. The device according to claim 12, wherein The information determination submodule is specifically used to: Determining historical IP subnet information generated from the preset IP network segment; wherein the historical IP subnet information represents IP subnet information generated within a preset historical time period; Determine candidate IP subnet information from the preset IP network segment based on the number of digits of the network number in the IP subnet information of the cloud phone; If the candidate IP subnet information is not in the historical IP subnet information, the candidate IP subnet information is determined to be the IP subnet information of the streaming program of the cloud phone.
14. The apparatus according to claim 13, further comprising: a subnet determination unit, configured to determine the network number and host number in the candidate IP subnet information if the candidate IP subnet information is in the historical IP subnet information; A network number updating unit, configured to add one to the network number in the candidate IP subnet information to obtain a new network number; The subnet updating unit is used to obtain new candidate IP subnet information according to the host number and the new network number in the candidate IP subnet information, until the obtained candidate IP subnet information is not in the historical IP subnet information.
15. The device according to any one of claims 10 to 14, wherein: The address determination module includes: The first determination submodule is used to determine the host number in the IP address of the cloud phone and the network number in the IP subnet information of the streaming program of the cloud phone; The second determination submodule is used to determine the streaming address of the cloud phone according to the host number in the IP address of the cloud phone and the network number in the IP subnet information of the streaming program of the cloud phone.
16. The apparatus according to claim 9, further comprising: A number recording unit, configured to record the number of times the push stream address of the cloud phone is generated if the push stream address of the cloud phone is located in the historical push stream addresses; The number judgment unit is used to determine a new IP network segment from a preset network segment set if the number of generation times is equal to or greater than a preset number threshold, and determine the streaming address of the cloud phone based on the new IP network segment according to the IP address of the cloud phone and the IP subnet information of the cloud phone; wherein the preset network segment set includes multiple IP network segments.
17. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
19. A computer program product, wherein The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 8 when the computer program is executed by a processor.
Citation Information
Patent Citations
Cloud game service system, data processing method and electronic equipment
CN115253283A