A data processing method, device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202511288126.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2045-09-10
AI Technical Summary
[0004]有鉴于此,本申请提供了一种数据处理方法、装置、存储介质及电子设备,主要目的在于改善目前云手机在数据传输过程中难以根据不同应用场景灵活选择最优的压缩方案,导致压缩效率受限、算力资源浪费、影响用户体验的技术问题
[0020]借由上述技术方案,本申请提供的一种数据处理方法、装置、存储介质及电子设备,首先基于云手机的数据传输指令,获取云手机的平台端的平台配置参数和客户端的网络环境配置参数;根据平台配置参数和网络环境配置参数,确定云手机对应的综合压缩参数,综合压缩参数包括综合压缩算力和综合推荐压缩空间大小;基于云手机对应的启动操作,获取云手机的环境基础元数据和应用元数据;根据环境基础元数据和应用元数据,将云手机中待压缩的数据交互文件拆分为多个子数据包;基于综合压缩参数,选择数据交互文件的数据类型对应的压缩算法对子数据包进行压缩处理。与目前现有技术相比,本申请通过综合分析平台端与客户端的配置参数及网络环境,动态确定最优的压缩算力与压缩空间大小,结合应用元数据与环境信息对数据进行智能拆分与压缩处理,可以根据不同应用场景灵活选择最优的压缩方法,提升了数据传输效率和压缩效率,降低了网络负载和资源消耗,从而显著增强了云手机在复杂网络环境下的适应能力与运行流畅性,提升了用户体验。
Smart Images

Figure CN121284639B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a data processing method, apparatus, storage medium, and electronic device. Background Technology
[0002] With the rapid development of cloud computing technology, cloud phones, as a technical solution that runs mobile operating systems and applications on cloud servers and allows remote access via client, have been widely used in various scenarios such as mobile office, cloud gaming, mobile testing, and enterprise security management. Cloud phone platforms centrally deploy computing, storage, and rendering resources in cloud data centers, allowing users to enjoy a complete mobile experience on multiple devices through lightweight clients.
[0003] However, current cloud phones mainly rely on fixed compression algorithms supported by the transmission protocol itself during data transmission, making it difficult to flexibly select the optimal compression scheme according to different application scenarios. This results in limited compression efficiency. This single compression strategy not only wastes computing resources in some scenarios, but may also increase data transmission latency and affect user experience. Summary of the Invention
[0004] In view of this, this application provides a data processing method, apparatus, storage medium and electronic device, the main purpose of which is to improve the technical problem that current cloud phones are unable to flexibly select the optimal compression scheme according to different application scenarios during data transmission, resulting in limited compression efficiency, waste of computing resources and impact on user experience.
[0005] Firstly, this application provides a data processing method, including:
[0006] Based on the data transmission instructions of the cloud phone, the platform configuration parameters of the cloud phone platform and the network environment configuration parameters of the client are obtained.
[0007] Based on the platform configuration parameters and the network environment configuration parameters, the comprehensive compression parameters corresponding to the cloud phone are determined. The comprehensive compression parameters include comprehensive compression computing power and comprehensive recommended compression space size.
[0008] Based on the startup operation corresponding to the cloud phone, obtain the cloud phone's basic environmental metadata and application metadata;
[0009] Based on the environmental metadata and the application metadata, the data interaction file to be compressed in the cloud phone is split into multiple sub-data packets;
[0010] Based on the comprehensive compression parameters, the compression algorithm corresponding to the data type of the data interaction file is selected to compress the sub-data packet.
[0011] Secondly, this application provides a data processing apparatus, comprising:
[0012] The acquisition module is configured to acquire platform configuration parameters on the cloud phone's platform side and network environment configuration parameters on the client side based on the cloud phone's data transmission instructions.
[0013] The determination module is configured to determine the comprehensive compression parameters corresponding to the cloud phone based on the platform configuration parameters and the network environment configuration parameters. The comprehensive compression parameters include comprehensive compression computing power and comprehensive recommended compression space size.
[0014] The startup module is configured to obtain the cloud phone's environmental metadata and application metadata based on the startup operation corresponding to the cloud phone.
[0015] The splitting module is configured to split the data interaction file to be compressed in the cloud phone into multiple sub-data packets based on the environmental basic metadata and the application metadata;
[0016] The selection module is configured to select a compression algorithm corresponding to the data type of the data interaction file to compress the sub-data packet based on the comprehensive compression parameters.
[0017] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0018] Fourthly, this application provides an electronic device including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.
[0019] Fifthly, this application provides a computer program product having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0020] By employing the above technical solution, this application provides a data processing method, apparatus, storage medium, and electronic device. First, based on the data transmission instructions of the cloud phone, the platform configuration parameters of the cloud phone's platform and the network environment configuration parameters of the client are obtained. Based on the platform configuration parameters and network environment configuration parameters, the comprehensive compression parameters corresponding to the cloud phone are determined, including comprehensive compression computing power and a comprehensive recommended compression space size. Based on the startup operation of the cloud phone, the basic environmental metadata and application metadata of the cloud phone are obtained. Based on the basic environmental metadata and application metadata, the data interaction file to be compressed in the cloud phone is split into multiple sub-data packets. Based on the comprehensive compression parameters, a compression algorithm corresponding to the data type of the data interaction file is selected to compress the sub-data packets. Compared with existing technologies, this application, by comprehensively analyzing the configuration parameters of the platform and client and the network environment, dynamically determines the optimal compression computing power and compression space size. Combined with application metadata and environmental information, it intelligently splits and compresses data. It can flexibly select the optimal compression method according to different application scenarios, improving data transmission efficiency and compression efficiency, reducing network load and resource consumption, thereby significantly enhancing the adaptability and smoothness of the cloud phone in complex network environments and improving the user experience.
[0021] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application is shown;
[0025] Figure 2 A flowchart illustrating another data processing method provided in an embodiment of this application is shown;
[0026] Figure 3 A schematic diagram illustrating an example provided in an embodiment of this application is shown;
[0027] Figure 4 A schematic diagram illustrating an example provided in an embodiment of this application is shown;
[0028] Figure 5 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application is shown. Detailed Implementation
[0029] The embodiments of this application will now be described in more detail with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0030] Currently, cloud mobile clients use various protocols to interact with servers. Generally, they use the compression algorithms supported by the transmission protocol itself to compress the data. This type of compression technology is mainly based on using a fixed compression algorithm. After the data is generated and before it is transmitted, it is determined whether the returned data is a compressed file type. For files that meet the compression conditions, a fixed compression method is used to compress them before they are transmitted over the network. After the data receiver receives the data, it decompresses the data according to the protocol rules based on the parsed protocol information before handing it over to the upper-layer application.
[0031] Related technologies compress data using compression schemes supported by the underlying protocols themselves. However, data compression consumes computing power and introduces more latency. Schemes that use transmission protocols for compression cannot balance data transmission efficiency and computing power in terms of compression strategy adjustments. Furthermore, because transmission protocols cannot select a matching compression algorithm based on the application scenario of the transmitted data, the choice of compression scheme is significantly limited.
[0032] To address the technical problem of current cloud phones struggling to flexibly select the optimal compression scheme based on different application scenarios during data transmission, resulting in limited compression efficiency, wasted computing resources, and negatively impacted user experience, this embodiment provides a data processing method applicable to the server side, such as... Figure 1 As shown, the method includes:
[0033] Step 101: Based on the data transmission instructions of the cloud phone, obtain the platform configuration parameters of the cloud phone platform and the network environment configuration parameters of the client.
[0034] For example, the server side includes servers, storage, networks, operating systems, databases, applications, etc., and can provide a variety of services to clients and platforms.
[0035] In some examples, platform configuration parameters may include the number of cores on the platform, the maximum frequency of each core, the utilization of the central processing unit (CPU), the remaining memory space, the total bandwidth configuration, the current bandwidth usage, and the number of currently running cloud virtual machines. These platform configuration parameters can be used to assess the platform's computing power and resource availability.
[0036] In some examples, client network environment configuration parameters may include the number of client cores, core frequencies, CPU utilization, processor type adjustment factors, processor manufacturing process information, terminal allocated computing power, and remaining memory space. These network environment configuration parameters can be used to assess the client's processing capabilities and network status. These parameters collectively form the basis for compression strategy decisions, ensuring that data transmission achieves an optimal balance between performance, efficiency, and security.
[0037] Step 102: Determine the comprehensive compression parameters corresponding to the cloud phone based on the platform configuration parameters and network environment configuration parameters.
[0038] The comprehensive compression parameters include comprehensive compression computing power and comprehensive recommended compression space size, which are used to reflect the overall computing power, network status and resource availability of the current platform and client.
[0039] In some examples, the configuration parameters of the cloud phone platform can be obtained first through a compression evaluation system to calculate the platform's compression computing power and recommended compression space size; at the same time, the client periodically starts tasks to calculate its own compression computing power and recommended compression space size.
[0040] For example, platform configuration parameters may include parameters such as the number of cores, frequency, and CPU utilization, while the recommended compressed space size is further determined based on the remaining memory space and compression computing power. Similarly, network environment configuration parameters may include factors such as terminal allocated computing power and processor type adjustment factors, and the recommended compressed space size is also calculated based on the remaining memory space and compression computing power.
[0041] Step 103: Based on the startup operation of the cloud phone, obtain the cloud phone's basic environmental metadata and application metadata.
[0042] In some examples, basic environment metadata refers to a series of parameters acquired when the cloud phone's virtual machine starts and the application starts. These parameters include stability requirements, maximum packet chunk size, checksum switch (1 for on, 0 for off), parallel transmission switch (1 for on, 0 for off), and privacy data protection level (e.g., from level 1 to level 5). These are primarily used to set the basic environment configuration and security requirements for data transmission. Application metadata, on the other hand, is information dynamically acquired before each data transmission based on the currently interacting application. This includes the application's classification, data transmission type, and the privacy data protection level and instruction quality requirement level in the interface description. It describes the specific needs of a particular application and its interaction process, ensuring that data processing and transmission strategies can be optimized for different application scenarios.
[0043] Step 104: Based on the environmental metadata and application metadata, split the data interaction file to be compressed in the cloud phone into multiple sub-data packets.
[0044] In some examples, the system can dynamically adjust the size and configuration of each sub-data packet to ensure that transmission efficiency and security are maximized while meeting the needs of specific application scenarios.
[0045] Step 105: Based on the comprehensive compression parameters, select the compression algorithm corresponding to the data type of the data exchange file to compress the sub-data packets.
[0046] In some examples, based on comprehensive compression parameters, the system can intelligently select the appropriate compression algorithm to compress the split sub-data packets according to the data type of different data exchange files, thereby achieving an optimal balance between transmission efficiency and resource consumption. The system combines these parameters with data type characteristics (such as text, images, video, control commands, etc.) to dynamically adapt the most suitable compression algorithm, such as spatially adaptive dictionary compression, variable compression ratio H.265 compression, and double sampling compression, ensuring that compression efficiency is maximized and bandwidth usage is reduced while maintaining data integrity and transmission quality.
[0047] Compared with existing technologies, the technical solution of this embodiment first obtains the platform configuration parameters of the cloud phone and the network environment configuration parameters of the client based on the data transmission instructions of the cloud phone; according to the platform configuration parameters and network environment configuration parameters, the comprehensive compression parameters corresponding to the cloud phone are determined, including comprehensive compression computing power and comprehensive recommended compression space size; based on the startup operation of the cloud phone, the basic environmental metadata and application metadata of the cloud phone are obtained; according to the basic environmental metadata and application metadata, the data interaction file to be compressed in the cloud phone is split into multiple sub-data packets; based on the comprehensive compression parameters, the compression algorithm corresponding to the data type of the data interaction file is selected to compress the sub-data packets. Compared with existing technologies, this embodiment dynamically determines the optimal compression computing power and compression space size by comprehensively analyzing the configuration parameters of the platform and client and the network environment, and intelligently splits and compresses the data by combining application metadata and environmental information. It can flexibly select the optimal compression method according to different application scenarios, improve data transmission efficiency and compression efficiency, reduce network load and resource consumption, thereby significantly enhancing the adaptability and smooth operation of the cloud phone in complex network environments and improving the user experience.
[0048] To further illustrate the specific implementation process of the method in this embodiment, this embodiment provides the following: Figure 2 The specific method shown includes:
[0049] Step 201: Based on the data transmission instructions of the cloud phone, obtain the platform configuration parameters of the cloud phone platform and the network environment configuration parameters of the client.
[0050] In some examples, such as Figure 3 As shown, the system can dynamically adjust the compression strategy by obtaining configuration parameters from both the client and the platform. First, it obtains configuration parameters for network monitoring, resource monitoring, data compression, and data decompression from the client and sends comprehensive compression parameters to the client. Simultaneously, the system also obtains configuration parameters for frequency tables, resource monitoring, data compression, and data decompression from the platform and sends comprehensive compression parameters to the platform. After parameter configuration is complete, the client and platform exchange keys to ensure data security, followed by data interaction. Throughout the process, the compression control system, based on factors such as comprehensive compression computing power, recommended compression space size, system resource monitoring, and dynamic adjustment of the compression strategy, achieves efficient compression and decompression management during data transmission, ensuring data transmission security, efficiency, and optimized resource utilization.
[0051] Step 202: Determine the comprehensive compression parameters corresponding to the cloud phone based on the platform configuration parameters and network environment configuration parameters.
[0052] The comprehensive compression parameters include comprehensive compression computing power and comprehensive recommended compression space size.
[0053] Optionally, step 202 may specifically include: calculating the compression computing power of the platform and the recommended compression space size of the platform based on platform configuration parameters; calculating the compression computing power of the client and the recommended compression space size of the client based on network environment configuration parameters; determining the comprehensive compression computing power based on the compression computing power of the platform and the compression computing power of the client, and determining the comprehensive recommended compression space size based on the recommended compression space size of the platform and the recommended compression space size of the client.
[0054] For example, the system can obtain the platform configuration parameters of the cloud mobile phone platform and calculate the compressed computing power P of the cloud mobile phone platform. zs And recommended compressed space size D s ;
[0055] For example, the system calculates the platform compression performance index of the cloud mobile phone platform based on the obtained platform parameters, and obtains the platform's compression computing power P. zs And the platform's recommended compressed space size D s ,
[0056] The platform-side compression computing power is shown in Formula 1:
[0057]
[0058] The recommended compressed space size on the platform is shown in Formula 2:
[0059]
[0060] Among them, C sc For the number of cores on the platform, F si For the maximum frequency of the core i on the platform, U sci For the CPU utilization of the core i on the platform, U sm For remaining memory space, N sn The remaining bandwidth on the platform (N) sn =P sna -N use P sna The total bandwidth and N configured for the system parameters use (Current bandwidth usage), C a This refers to the number of cloud virtual machines currently running on the platform. The "system" refers to the compression evaluation system used to assess compression parameters.
[0061] For example, the system can obtain the network environment configuration parameters of the cloud mobile client and calculate the compression computing power P of the cloud mobile client. zc And recommended compressed space size D c .
[0062] For example, the client periodically starts a compression performance metric detection task, and calculates the compression computing power and recommended compression space size based on the obtained performance metrics.
[0063] The terminal's computing power for compression is shown in Formula 3:
[0064]
[0065] The recommended compressed space size for the terminal is shown in Formula 4:
[0066]
[0067] Among them, C t Allocate computing power to terminals, U cm For remaining memory space, C cpu Processor type adjustment factor, which is obtained based on the client processor instruction set (x86 architecture adjustment factor is 1, ARM adjustment factor is 0.3), P c For processor process information, C cc For the number of client cores, F ci For the maximum frequency of the client core i, U sci The CPU utilization of the client core i is obtained directly through the system application programming interface (API).
[0068] In some examples, the system can then proceed based on the compression computing power (P). zs P zc Recommended compressed space size (D) s D c To determine the overall compression parameters during the compression process;
[0069] For example, the system calculates the compressed computing power P on the cloud phone platform and the cloud phone client respectively using the above method. zs And recommended compressed dictionary size D s Cloud mobile client compression computing power P zc And recommended compressed dictionary size D c Using the above parameters, the final comprehensive compression parameters are calculated, i.e., the comprehensive compression computing power P is calculated. z And the comprehensive recommended compressed dictionary size U m .
[0070] The overall compression computing power is shown in Formula 5:
[0071] P z =min(d·P) zc +(1-d)·P zs ,d·Pzs +(1-d)·P cs (Formula 5)
[0072] The recommended compressed space size is shown in Formula Six:
[0073] U m =min(d·U cm +(1-d)·U sm ,d·U sm +(1-d)·U cm ),min(x,y)) (Formula 6)
[0074] Here, min(x, y) represents taking the smaller value between x and y, and d represents the weight of the transmission direction relative to the client data. For example, when the data stream transmission target is the client, this value is 0.2, and when the data stream transmission target is the platform, this value is 0.8.
[0075] In some examples, once the system calculates the total compression computing power and the recommended compression dictionary size, it can synchronously send these parameters to both the client and the platform.
[0076] Step 203: Based on the startup operation corresponding to the cloud phone, obtain the cloud phone's basic environmental metadata and application metadata.
[0077] For example, the cloud phone platform splits and encapsulates the raw data to be transmitted to optimize data transmission efficiency and security. First, when the virtual machine and cloud phone application start, the platform obtains basic environmental metadata and application metadata. This metadata includes key parameters such as stability requirements, data packet chunking limits, checksum switches, instruction quality levels, and privacy protection levels.
[0078] Step 204: Based on the environmental metadata and application metadata, split the data interaction file to be compressed in the cloud phone into multiple sub-data packets.
[0079] In some examples, the system intelligently splits the original data packet P based on these environment-level metadata and application metadata, according to the maximum data packet chunk size P. pmax , Verification bit switch P w and instruction quality level L q The data P is divided into multiple sub-data packets P′, as shown in Formula 7:
[0080]
[0081] Where size(P) represents the size of the data packet P, and the maximum upper limit of the data packet chunk P. pmaxThe size of each sub-data packet is affected by a dynamic adjustment factor to ensure improved efficiency while maintaining transmission quality.
[0082] In some examples, before transmission, the client or platform performs secondary encapsulation on these sub-data packets. This encapsulation process includes compression and encryption: each sub-data packet is compressed using a defined compression algorithm, and encryption is performed based on the difference between the interface's privacy protection level and the platform's privacy protection level (encryption occurs if the difference is greater than 0, using the Chinese national cryptographic standard SM4 algorithm); otherwise, plaintext transmission is retained. Specifically, the client or platform performs secondary encapsulation on the sub-data packets before finally sending the data packets, resulting in the encapsulated sub-data packets as shown in the following formula:
[0083] P″={P″1=E(zip(P′1),key,L p -P1) (Formula 8)
[0084] P″2=E(zip(P'2),key,L p -P1), ..., (Formula Nine)
[0085]
[0086] Where zip(x) means to compress x, and E(x,y,z) means that when z is greater than 0, x is encrypted with key y (using the national standard SM4 encryption), otherwise the original text is returned.
[0087] Step 205: Based on the comprehensive compression parameters, select the compression algorithm corresponding to the data type of the data exchange file to compress the sub-data packets.
[0088] For example, the interaction between the cloud mobile client and the platform involves various types of data and application scenarios, and different data transmission types T are required. d The system will automatically select a matching compression algorithm based on preset classification rules to achieve efficient compression processing of interactive data. As shown in Table 1, by identifying the type characteristics of the currently transmitted data, the system can dynamically switch to the optimal compression strategy suitable for the scenario, thereby improving compression efficiency, reducing bandwidth usage, and further optimizing overall transmission performance while ensuring data integrity and transmission quality.
[0089] Table 1
[0090] Control commands Dynamic control command compression <![CDATA[P z ,IN m ]]> Text data Space-adaptive dictionary compression <![CDATA[P z ,IN m ]]> Audio and video file compression Secondary encoding transcoding compression <![CDATA[U m ]]> Static resources CDN none Uncompressed
[0091] Optionally, step 205 may specifically include: if the data type of the data interaction file is control instructions, then based on the comprehensive compression parameters and the control instruction conversion table, a dynamic control instruction compression algorithm is used to compress the sub-data packets, wherein the control instruction conversion table is used to indicate the dynamic mapping relationship between the key-value pairs of control instructions and compression conversion codes; if the data type of the data interaction file is text data, then based on the comprehensive compression computing power and the comprehensive recommended compression space size, the dictionary area and encoding area sizes are dynamically set, and a dictionary-based compression algorithm is used to compress the text data to generate encoded triples; if the data type of the data interaction file is an audio / video file, then based on the comprehensive compression parameters, a secondary encoding transcoding compression algorithm is used to transcode and compress the image data and audio data in the audio / video file respectively.
[0092] For example, if the data type of the data exchange file is a control command, it can be obtained from the control command constant. A constant command conversion table is maintained in the system cache. An initial key-value pair conversion table is used for conversion. The key-value pair conversion table structure is <constant, conversion code>. Initially, a sequential structure is used to generate the conversion table.
[0093] T = [<C1,T1> ,<C2,T2> ,..., <C n T n >]
[0094] =[<C1,1> ,<C2,2> ,..., <C n [,n>]
[0095] Where n is the number of constants.
[0096] Simultaneously generate a constant call frequency table:
[0097] R c =[<C1,R1> ,<C2,R2> ,..., <C n R n >]
[0098] =[<C1,0> ,<C2,0> ,..., <C n ,0>]
[0099] Where, instruction set C = {C1, C2, ..., C} n}, where n is the total number of instructions.
[0100] For example, the application marks control-type interaction interfaces and corresponding control-type instructions. When the interface is a control-type interface, the usage frequency of the marked control instructions in the interface is counted. Each time such an interface is called, the control instructions in its request and return interfaces are extracted. After each control instruction is obtained, the call frequency corresponding to the instruction is found in the call frequency table, its value is incremented by one and updated and saved.
[0101] In some examples, control instructions are updated periodically to retrieve the call frequency table R. c Generate a Huffman tree, and based on the generated Huffman tree, generate a new Huffman coding transformation table T. Replace the original transformation table with the new transformation table T, and reset the call frequency table R. c The number of calls in the function is 0.
[0102] Optionally, the method in this embodiment may further include: adding a check bit to the control command based on network configuration data, wherein the network configuration data includes network latency data, network stability data, and network bandwidth data.
[0103] For example, a checksum can also be added to the instruction data based on network data and system configuration. Its conversion logic is as follows:
[0104]
[0105] Here, val(x,y,z) represents retrieving the checksum (using CRC checksum) of length y corresponding to x when z is 1, otherwise returning an empty value, where P w The check bit is a switch (1 for on, 0 for off). len(x) represents the binary length of x. p(x) represents the application's preference for transmission efficiency and stability based on the application classification. The possible values are 1-5. When efficiency is prioritized, it is more biased towards 1. When stability is prioritized, it is more biased towards 5.
[0106] In some examples, network latency is obtained as follows: the client sends an empty request to a specific address; after receiving the request, the platform returns an empty result; and the client calculates the time difference S between sending and receiving the request. l ,according to Get network latency N l ;
[0107] In some examples, network stability is determined as follows: the client sends ten blank requests to a specific address at regular intervals. Upon receiving these requests, the platform returns empty data. The client then calculates the time difference (S1, S2, ..., S) between the sending time of each of the ten requests and the arrival time of the received responses. 10 According to Formula 13, the network stability Ns is obtained.
[0108]
[0109] in,
[0110] In some examples, network bandwidth is obtained by the client sending a specific size s to a specific address. req The platform, upon receiving the request, returns data of a specific size s. req The response result, in its returned parameters, includes the reception time s for receiving the response. req The client calculates the time t taken to receive the response. req ,according to The network downlink bandwidth N was obtained respectively. dw With uplink bandwidth N uw .
[0111] For example, after updating the control commands, the platform generates the latest control command translation table and actively iterates through all currently active clients, sending control command cache update tasks to them and distributing the updated translation table T to each client. Upon receiving the translation table, the client replaces the old version in its local cache with the new translation table, thereby ensuring consistency between the client and the platform in the parsing and execution of control commands, improving the accuracy of system response and collaborative efficiency.
[0112] In some examples, when the client uses a control class interface, before sending a request, it uses a transformation table T to look up and transform the control constant c in the request, obtaining the transformed control constant c', and then uses c' to send the control command. After receiving the control command c', the platform parses it to obtain the command c” and the checksum v, and uses the checksum v to verify the command c”. If the verification passes, it looks up c” in the transformation table T to obtain its corresponding original control constant c, and then sends it to the actual business logic processing interface for processing. After the business logic processing is complete and the returned data is received, the platform checks the control constant c in the returned data. r Perform a lookup and conversion to obtain the converted control command c′. r and using c′ r As a response to control commands.
[0113] For example, when the platform receives the control command c′ r First, the instruction is parsed to obtain the instruction content c”' and the corresponding checksum v'. Then, the checksum v' is used to perform an integrity check on the instruction c”'. After the checksum passes, the platform looks up the instruction in reverse from the locally cached translation table T to obtain its corresponding original control constant c. r The constant is then sent to the actual business logic processing module for further processing, thereby ensuring the legality of the instruction and the accuracy of the processing.
[0114] For example, for text-type request and response data, a dynamic dictionary compression scheme can be used to compress the request and response data. The main steps include: dynamically setting the dictionary region and performing compression operations based on compression computing power, compression space parameters, and network conditions. The recommended compression sliding window encoding area size is as follows:
[0115] C s =0.1·U m (Formula Thirteen)
[0116] The size of the compressed sliding window dictionary area is:
[0117]
[0118] Before each request and response, the size of the compressed dictionary area and the size of the encoded area need to be retrieved again, such as... Figure 4 As shown, in the response data, the first 16 bits represent the size of the compressed dictionary area, and the last 16 bits represent the size of the encoded area. The response data uses a dictionary-based compression algorithm to compress the file, by checking whether the compressed dictionary C matches the current sequence and its subsequent corresponding I. off If there is a match in the bits, then find I. off The longest repeating region (I) start ,I off ,L counf C) max Generate encoded triples (L off ,L len c) Creates a new file, thus completing file compression.
[0119] In some examples, if the data exchange file is text data, after receiving the compressed data, a new decompression sliding window is opened according to the size of the compressed dictionary area and the encoding area, and the compressed file is decompressed sequentially, extracting the triples (L... off ,L len c) Based on the region shown by the triplet, use the data at the corresponding position in the dictionary area to obtain the restored data, and append it to the end of the decompressed result. Simultaneously, move the dictionary area sliding window to the end of the decompressed result and continue extracting and restoring the next encoded tuple. The platform distributes the pronunciation image and audio resources to the client, uses ffmpeg to transcode and compress the resources, and then distributes and transmits them.
[0120] In some examples, if the data exchange file is an audio or video file, the image uses variable compression ratio H.265 compression. Real-time images are transmitted by dividing the image into small image segments over time; therefore, both real-time and non-real-time images use the H.265 compression scheme described below. Similarly, still images are compressed and encoded as independent I-frames in H.265 and transmitted using the same H.265 compression scheme. The bitrate R of the image itself is obtained. b Number of channels R c Image width R′ w Image height R h And obtain information about the audio formats supported by the client and the number of channels R′ of the formats supported by the client. c Display area width R′ w Display area height R′ h The compression bit rate and the number of channels R′ were calculated. c =min(R′) c R c ), target width R′ tw =min(R′) w R w ), target height R′ th =min(R′) h R h Where min(x,y) represents obtaining the smaller value from x and y, and using ffmpeg for transcoding, the transcoding and compression instructions are generated according to the following pattern:
[0121]
[0122] Where input.mp4 is the input image file (or image file fragment), output.mp4 is the output image file (or image file fragment), and R′ in the command... dt The calculated numerical value is the converted enumerated value.
[0123] Where, N dw For network downlink bandwidth, N s For network stability, bufsize is the size of the buffer.
[0124] For example, in this embodiment, real-time audio is transmitted by dividing the audio into small audio segments according to time. Therefore, both real-time and non-real-time audio can adopt the following resampling scheme. Obtain the sampling rate R of the audio itself. p , depth R d Bit rate R b Number of channels R cIt also obtains information on the audio formats supported by the client and the maximum sampling rate R′ of the formats supported by the client. p , depth R′ d Bit rate R′ b Number of channels R′ c The maximum sampling rate R′ of the compressed target was calculated. pt =min(0.6·R) p ,0.8·R′ p ), bit depth R′ dt =min(R) d , R′ d ), bit rate R′ bt =min(0.6·R) b ,0.8·R′ b Number of channels R′ c =min(R′) c R c ), where min(x,y) represents obtaining the smaller value from x and y. Using ffmpeg for resampling, the resampling command is generated according to the following pattern:
[0125] ffmpeg-iinput.mp3-ar R′ pt output.mp3-ab R′ bt -ac R′ c -acodec R′ dt (Formula Sixteen)
[0126] Where input.mp3 is the input audio file (or audio file segment), and output.mp3 is the output audio file (or audio file segment), and the R′ in the command... dt This is the converted enumerated value of the calculated numerical value. acodec is the audio codec.
[0127] For example, for frequently used, unchanging, and directly usable static resources supported by the client, they can be cached through a Content Delivery Network (CND) and played locally on the terminal instead. Files stored in the cloud phone are scanned. For files with high access frequency, not personal data, and directly usable by the client, the most frequently accessed files are extracted and distributed to the CDN, and marked as having been distributed via CDN. When the cloud phone detects that a file needs to be accessed has already been distributed via CDN, the client initiates the process of retrieving the distributed file from the CDN (if the client already has the corresponding file locally, it directly uses the local cache), and caches it locally. When the cloud phone client retrieves the corresponding file, it dynamically links the cached file locally to the returned file, using the local cache to replace the network transmission processing of the access request.
[0128] Optionally, the method in this embodiment may further include: dynamically adjusting the proportion of compression resource allocation by real-time monitoring of the time consumed and memory resources occupied by sub-data packets during compression processing; and dynamically adjusting the comprehensive compression parameters according to network bandwidth, network stability, and formats supported by the client.
[0129] For example, to avoid the problem of cloud phone computing resources being heavily occupied and actual business processing being slow due to compression model failure, a dynamic monitoring module is added to the system. This module monitors the dynamic changes in the time consumed by all compression algorithms and the current and historical usage of CPU and memory resources. When resources are consumed too much (when the resources used by the compression service continuously exceed 35% of the total resources) or too little (when the resources used by the compression service continuously exceed 15% of the total resources), the system can automatically adjust the resource limit for the compression function (the proportion of compression resources allocated is gradually reduced or increased by 1%). When the proportion of any resource drops to 0, the compression function is turned off.
[0130] Step 206: Transmit the encapsulated sub-data packets in parallel to the cloud phone's platform or client.
[0131] The number of concurrent transmissions of the encapsulated sub-data packets shall not exceed the smaller of the recommended compressed space size on the platform and the recommended compressed space size on the client.
[0132] For example, after encapsulation, the system can send these encapsulated data packets using a multi-threaded approach, with the maximum concurrency controlled by a parallel transmission switch: the client or platform synchronously sends the data packet splitting logic to both the cloud phone client and the platform. After the client or platform completes the secondary encapsulation, it sends the resulting data packet P″, using multi-threading, with a maximum simultaneous sending quantity of:
[0133]
[0134] Here, min(x,y) means taking the smaller of x and y, and max(x,y) means taking the largest of x and y.
[0135] Compared with existing technologies, by comprehensively analyzing the configuration parameters and network environment of the platform and client, the optimal compression computing power and compression space size are dynamically determined. Combined with application metadata and environmental information, data is intelligently split and compressed. The optimal compression method can be flexibly selected according to different application scenarios, which improves data transmission efficiency and compression efficiency, reduces network load and resource consumption, and thus significantly enhances the adaptability and smoothness of cloud phones in complex network environments, improving the user experience.
[0136] Furthermore, as Figure 1 and Figure 2 To provide a specific implementation of the method shown, this embodiment offers a data processing device, such as... Figure 5 As shown, the device includes: an acquisition module 31, a determination module 32, a startup module 33, a splitting module 34, and a selection module 35.
[0137] The acquisition module 31 is configured to acquire platform configuration parameters of the cloud phone platform and network environment configuration parameters of the client based on the data transmission instructions of the cloud phone.
[0138] The determining module 32 is configured to determine the comprehensive compression parameters corresponding to the cloud phone based on the platform configuration parameters and the network environment configuration parameters. The comprehensive compression parameters include comprehensive compression computing power and comprehensive recommended compression space size.
[0139] The startup module 33 is configured to obtain the cloud phone's environmental basic metadata and application metadata based on the startup operation corresponding to the cloud phone.
[0140] The splitting module 34 is configured to split the data interaction file to be compressed in the cloud phone into multiple sub-data packets based on the environmental basic metadata and the application metadata;
[0141] Selection module 35 is configured to select a compression algorithm corresponding to the data type of the data interaction file to compress the sub-data packet based on the comprehensive compression parameters.
[0142] In some examples of this embodiment, module 35 is specifically configured to: if the data type of the data interaction file is a control instruction, then, based on the comprehensive compression parameters and the control instruction conversion table, use a dynamic control instruction compression algorithm to compress the sub-data packet, wherein the control instruction conversion table is used to indicate the dynamic mapping relationship between the key-value pairs of the control instruction and the compression conversion code; if the data type of the data interaction file is text data, then, based on the comprehensive compression computing power and the comprehensive recommended compression space size, dynamically set the dictionary region and encoding region sizes, and use a dictionary-based compression algorithm to compress the text data to generate encoded triples; if the data type of the data interaction file is an audio / video file, then, based on the comprehensive compression parameters, use a secondary encoding transcoding compression algorithm to transcode and compress the image data and audio data in the audio / video file respectively.
[0143] In some examples of this embodiment, the selection module 35 is further configured to add a check bit to the control command based on network configuration data, which includes network latency data, network stability data, and network bandwidth data.
[0144] In some examples of this embodiment, the determining module 32 is specifically configured to calculate the compression computing power of the platform and the recommended compression space size of the platform based on the platform configuration parameters; calculate the compression computing power of the client and the recommended compression space size of the client based on the network environment configuration parameters; determine the comprehensive compression computing power based on the compression computing power of the platform and the compression computing power of the client; and determine the comprehensive recommended compression space size based on the recommended compression space size of the platform and the recommended compression space size of the client.
[0145] In some examples of this embodiment, module 35 is further configured to transmit the encapsulated sub-data packets in parallel to the platform or client of the cloud phone, wherein the number of concurrent transmissions of the encapsulated sub-data packets does not exceed the smaller of the recommended compressed space size of the platform and the recommended compressed space size of the client.
[0146] In some examples of this embodiment, the determining module 32 is further configured to dynamically adjust the proportion of compression resource allocation by real-time monitoring of the time consumed and memory resources occupied by the sub-data packets during compression processing, and to dynamically adjust the comprehensive compression parameters according to network bandwidth, network stability and the formats supported by the client.
[0147] It should be noted that for other corresponding descriptions of the various functional units involved in the data processing apparatus provided in this embodiment, please refer to... Figure 1 and Figure 2 The corresponding descriptions in [the document] will not be repeated here.
[0148] Based on the above, Figure 1 and Figure 2 Accordingly, this embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figure 1 and Figure 2 The method shown.
[0149] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.
[0150] Based on the above, Figure 1 and Figure 2 The method shown, and Figure 5 To achieve the above objectives, the present application also provides an electronic device, such as a personal computer, server, laptop computer, intelligent robot, or other intelligent terminal, as illustrated in the virtual device embodiment. This device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to implement the above-described virtual device. Figure 1 and Figure 2 The method shown.
[0151] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0152] Those skilled in the art will understand that the physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0153] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0154] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented through hardware. Compared with the prior art, by applying the solution of this embodiment, the method of this embodiment dynamically determines the optimal compression computing power and compression space size by comprehensively analyzing the configuration parameters and network environment of the platform and client, and intelligently splits and compresses data by combining application metadata and environmental information. It can flexibly select the optimal compression method according to different application scenarios, improving data transmission efficiency and compression efficiency, reducing network load and resource consumption, thereby significantly enhancing the adaptability and smoothness of cloud phones in complex network environments and improving the user experience.
[0155] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0156] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A data processing method, characterized in that, include: Based on the data transmission instructions of the cloud phone, the platform configuration parameters of the cloud phone platform and the network environment configuration parameters of the client are obtained. Based on the platform configuration parameters and the network environment configuration parameters, the comprehensive compression parameters corresponding to the cloud phone are determined. The comprehensive compression parameters include comprehensive compression computing power and comprehensive recommended compression space size. Based on the startup operation corresponding to the cloud phone, obtain the cloud phone's basic environmental metadata and application metadata; Based on the environmental metadata and the application metadata, the data interaction file to be compressed in the cloud phone is split into multiple sub-data packets; Based on the comprehensive compression parameters, a compression algorithm corresponding to the data type of the data interaction file is selected to compress the sub-data packet.
2. The method according to claim 1, characterized in that, The step of selecting a compression algorithm corresponding to the data type of the data exchange file based on the comprehensive compression parameters and compressing the sub-data packet includes: If the data type of the data interaction file is a control command, then based on the comprehensive compression parameters and the control command conversion table, a dynamic control command compression algorithm is used to compress the sub-data packet. The control command conversion table is used to indicate the dynamic mapping relationship between the key-value pairs of the control command and the compression conversion code. If the data type of the data interaction file is text data, then the dictionary region and encoding region sizes are dynamically set according to the comprehensive compression computing power and the comprehensive recommended compression space size, and the text data is compressed using a dictionary-based compression algorithm to generate encoded triples. If the data interaction file is an audio / video file, then based on the comprehensive compression parameters, a secondary encoding transcoding compression algorithm is used to transcode and compress the image data and audio data in the audio / video file respectively.
3. The method according to claim 2, characterized in that, The method further includes: Based on network configuration data, a check bit is added to the control command. The network configuration data includes network latency data, network stability data, and network bandwidth data.
4. The method according to claim 1, characterized in that, The step of determining the comprehensive compression parameters corresponding to the cloud phone based on the platform configuration parameters and the network environment configuration parameters includes: Based on the platform configuration parameters, calculate the platform's compression computing power and the recommended compression space size. Based on the network environment configuration parameters, calculate the client's compression computing power and the client's recommended compression space size; The overall compression computing power is determined based on the compression computing power of the platform and the client, and the overall recommended compression space size is determined based on the recommended compression space size of the platform and the recommended compression space size of the client.
5. The method according to claim 4, characterized in that, After compressing the sub-data packet using a compression algorithm corresponding to the data type of the data exchange file based on the comprehensive compression parameters, the method further includes: The encapsulated sub-data packets are transmitted in parallel to the cloud phone's platform or client, wherein the number of concurrent transmissions of the encapsulated sub-data packets does not exceed the smaller of the recommended compressed space size of the platform and the recommended compressed space size of the client.
6. The method according to claim 1, characterized in that, The method further includes: By monitoring in real time the time consumed and memory resources occupied by the sub-data packets during compression processing, the proportion of compression resource allocation is dynamically adjusted; The overall compression parameters are dynamically adjusted based on network bandwidth, network stability, and the formats supported by the client.
7. A data processing apparatus, characterized in that, include: The acquisition module is configured to acquire platform configuration parameters on the cloud phone's platform side and network environment configuration parameters on the client side based on the cloud phone's data transmission instructions. The determination module is configured to determine the comprehensive compression parameters corresponding to the cloud phone based on the platform configuration parameters and the network environment configuration parameters. The comprehensive compression parameters include comprehensive compression computing power and comprehensive recommended compression space size. The startup module is configured to obtain the cloud phone's environmental metadata and application metadata based on the startup operation corresponding to the cloud phone. The splitting module is configured to split the data interaction file to be compressed in the cloud phone into multiple sub-data packets based on the environmental basic metadata and the application metadata; The selection module is configured to select a compression algorithm corresponding to the data type of the data interaction file to compress the sub-data packet based on the comprehensive compression parameters.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
9. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.
10. A computer program product having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Equipment vibration parameter synchronous transmission system and method based on cloud platform, processing equipment and storage medium
CN120151937A
Data processing method and system, cloud terminal, server, and computing device
WO2022048255A1