WO2021139630A1 - 数据传输方法、装置及数据处理系统、存储介质 - Google Patents

数据传输方法、装置及数据处理系统、存储介质 Download PDF

Info

Publication number
WO2021139630A1
WO2021139630A1 PCT/CN2021/070196 CN2021070196W WO2021139630A1 WO 2021139630 A1 WO2021139630 A1 WO 2021139630A1 CN 2021070196 W CN2021070196 W CN 2021070196W WO 2021139630 A1 WO2021139630 A1 WO 2021139630A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
application
information
terminal
instruction
Prior art date
Application number
PCT/CN2021/070196
Other languages
English (en)
French (fr)
Inventor
姜泽成
罗备
彭新超
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021139630A1 publication Critical patent/WO2021139630A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of image processing, and in particular to a data transmission method, device, data processing system, and storage medium.
  • a wireless network connection is usually used between the mobile phone and the display device.
  • the current method for the mobile phone to put the user interface of the mobile game on the display device is: after the mobile phone receives the user's operation instruction, it generates a graphic instruction stream, and will follow the graphic instruction
  • the image information generated by the stream (one or more of the image information forms an image data stream) is sent to the display device, and the display device presents the received image information.
  • This application provides a data transmission method, device, data processing system, and storage medium, which can solve the problem of high transmission delay between two electronic devices.
  • a data transmission method is provided.
  • the first terminal generates a graphic instruction stream through a first sub-application running in the first terminal, and the first sub-application is a sub-application that can run independently in the detachable target application.
  • the first terminal generates instruction information based on the graphics instruction stream, the instruction information is used to indicate the graphics instruction stream, and the data amount of the instruction information is less than or equal to the data amount of the graphics instruction stream.
  • the first terminal sends the generated instruction information to the second terminal running the second sub-application, so that the second terminal can obtain the graphics instruction stream based on the instruction information through the second sub-application and generate image information.
  • the second sub-application The program is a sub-application that can run independently in the target application, and the second sub-application is different from the first sub-application.
  • the instruction information is generated based on the graphics instruction stream generated by the first sub-application of the target application running in the first terminal, and the data amount of the instruction information is less than or equal to the data amount of the graphics instruction stream. And send the generated instruction information to the second terminal running the second sub-application, so that the second terminal can obtain the graphics instruction stream based on the received instruction information through the second sub-application of the target application, and present the generated image information .
  • the first sub-application run by the first terminal can obtain the graphics instruction stream
  • the second sub-application run by the second terminal can realize the restoration of the graphics instruction stream, thereby ensuring that image information is delivered from the first terminal to the second terminal
  • the data amount of the instruction information transmitted between the first terminal and the second terminal is less than the data amount of the image information
  • the amount of data transmitted between the first terminal and the second terminal is relatively small, under the premise of ensuring the effect of image delivery , Effectively reducing the transmission delay between the two.
  • the graphics instruction stream includes at least one graphics instruction (also called image instruction).
  • the graphics instruction includes first resource information and/or second resource information, the resource information is information used to draw the resource used by the drawing target in the image frame, and the data amount of the first resource information is greater than the second resource information The amount of data.
  • the process of the first terminal generating instruction information based on the graphic instruction stream includes:
  • the first terminal detects the content in the at least one graphics instruction.
  • the first terminal generates indication information based on the detection result, where the indication information includes at least one sub-indication information corresponding to at least one graphics command in a one-to-one manner.
  • the indication information includes at least one sub-indication information corresponding to at least one graphics command in a one-to-one manner.
  • any graphics command includes the first resource information and the second resource information
  • the sub-indication information includes both the first information index and the second resource information. Both the foregoing two conditions can be met at the same time.
  • the index representation is equivalent to data compression, thereby effectively reducing the data volume of the sub-indication information and improving the data transmission efficiency.
  • the graphics instruction also includes the name of the application programming interface (application programming interface, API) calling function.
  • the first terminal can generate the indication information based on the detection result in two ways.
  • the indication information carries the name of the API call function
  • the aforementioned process of generating the indication information by the first terminal based on the detection result includes:
  • the first terminal API call function name generation indication information includes at least one sub-indication information corresponding to at least one graphics command one-to-one, and each sub-indication information includes the name of the API call function.
  • the instruction information carries the function index of the API call function
  • the foregoing process of generating the instruction information based on the detection result by the first terminal includes:
  • the first terminal uses the name of the API call function in each graphics command to query the correspondence between the call function name and the function index, and obtain the first function index corresponding to the name of the API call function.
  • the first terminal generates indication information based on the first function index obtained by the query.
  • Each sub-instruction information included in the instruction information includes the first function index of the corresponding graphics instruction.
  • the first terminal uses the function index to represent the name of the API call function, which is equivalent to data compression, thereby effectively reducing the data volume of the sub-indication information , Improve data transmission efficiency.
  • the data processing system provided in the embodiment of the present application may be in the following two situations respectively.
  • the first case the first terminal only supports the split operation mode, which refers to the mode in which the first terminal and the second terminal cooperate to present image information.
  • the first terminal can only The image information is presented through the second terminal, and the image information cannot be presented by itself.
  • the first terminal is installed with a first sub-application
  • the second terminal is installed with a second sub-application. With the cooperation of the first sub-application run by the first terminal and the second sub-application run by the second terminal, the second sub-application of the second terminal is made to present the generated image information.
  • the first terminal may not only support the above-mentioned split operation mode, but also support the merge operation mode.
  • the combined operation mode refers to a mode in which the first terminal can independently present image information.
  • the first terminal is installed with a first sub-application and a third sub-application.
  • the first terminal runs the first sub-application and the third sub-application, the first terminal can generate a graphic instruction stream to generate image information based on the graphic instruction stream and present the image information.
  • the first terminal can be in the split operation mode and the merge operation mode at the same time (that is, the two modes overlap in the execution period), or it can be in the split operation mode and the merge operation mode (that is, the two modes are divided in time). There is no overlap in the execution period).
  • the first terminal may also send the first sub-application to the first terminal to run through the first sub-application.
  • the third sub-application sends a graphic instruction stream, the third sub-application is a sub-application that can run independently in the target application, and the third sub-application is different from the first sub-application.
  • the first terminal generates image information based on the graphics instruction stream through the third sub-application.
  • the above-mentioned process of the first terminal generating instruction information based on the graphic instruction stream includes: when detecting that the first sub-application is in a split operation mode, the first terminal generates the instruction information based on the graphic instruction stream.
  • the second terminal can run the second sub-application in cooperation to make the second terminal present the generated
  • a third sub-application can also be run on the first terminal, so that the first terminal presents the same image information. This can effectively improve the user experience.
  • the first terminal after the first terminal receives the split operation instruction through the first sub-application, it determines that the first sub-application is in the split operation mode, or the first terminal detects that the first terminal only has After the first sub-application of the target application, it is determined that the first sub-application is in the split operation mode, or the first terminal detects that the first sub-application in the first terminal and the second sub-application in the second terminal After the connection of the program is successfully established, it is determined that the first sub-application is in the split operation mode.
  • the first terminal After receiving the combined operation instruction through the first sub-application, the first terminal determines that the first sub-application is in the combined operation mode, or the first terminal detects that the first sub-application and the second terminal in the first terminal are in the combined operation mode. After the connection establishment of the second sub-application fails, and after detecting that the third sub-application is installed in the first terminal, it is determined that the first sub-application is in the combined operation mode.
  • the process of the first terminal sending the generated indication information to the second terminal running the second sub-application includes:
  • the first terminal writes the generated instruction information into the data queue through the data writing thread.
  • the first terminal obtains the indication information from the data queue through the data sending thread, and sends the obtained indication information to the second terminal running the second sub-application; wherein, the data writing thread and the data sending thread run in parallel.
  • a data transmission method receives the instruction information sent by the first terminal.
  • the instruction information is used to indicate the graphics instruction stream generated by the first terminal through the first sub-application.
  • the data volume of the instruction information is less than or equal to the data volume of the graphics instruction stream.
  • the application is a sub-application that can run independently in the target application
  • the second sub-application is a sub-application that can run independently in the target application
  • the second sub-application is different from the first sub-application.
  • the second terminal obtains the graphics instruction stream based on the instruction information through the second sub-application running in the second terminal.
  • the second terminal generates image information based on the obtained graphics instruction stream through the second sub-application.
  • the instruction information sent by the first terminal is received.
  • the indication information is used to indicate the graphic instruction stream generated by the first terminal through the first sub-application, and the data amount of the indication information is less than or equal to the data amount of the graphic instruction stream.
  • the graphics instruction stream is obtained based on the instruction information through the second sub-application.
  • the second sub-application generates image information based on the acquired graphics instruction stream.
  • the first sub-application run by the first terminal can obtain the graphics instruction stream
  • the second sub-application run by the second terminal can realize the restoration of the graphics instruction stream, thereby ensuring that image information is delivered from the first terminal to the second terminal
  • the data amount of the instruction information transmitted between the first terminal and the second terminal is less than the data amount of the image information
  • the amount of data transmitted between the first terminal and the second terminal is relatively small, under the premise of ensuring the effect of image delivery , Effectively reducing the transmission delay between the two.
  • the graphics instruction stream includes at least one graphics instruction.
  • the indication information includes at least one sub-indication information, and each sub-indication information includes: second resource information and/or first information index.
  • the process for the second terminal to obtain the graphics instruction stream based on the instruction information includes:
  • the second terminal detects the content in the sub-indication information.
  • the second terminal generates a graphic instruction stream based on the detection result.
  • the graphics instruction stream includes at least one graphics instruction corresponding to at least one sub-indication information.
  • any sub-indication information includes the first information index
  • the graphics instruction corresponding to any sub-indication information includes first resource information
  • One resource information is the resource information obtained by using the first information index in the any sub-indication information to query the correspondence between the resource information and the information index
  • the resource information is the resource information used to draw the drawing target in the image frame information.
  • the any sub-indication information includes the second resource information
  • the graphics instruction corresponding to the any sub-indication information includes the second resource information
  • the data amount of the first resource information is greater than the data amount of the second resource information.
  • the index representation is equivalent to data compression, thereby effectively reducing the data volume of the sub-indication information and improving the data transmission efficiency.
  • the graphics command also includes the name of the API calling function.
  • Each sub-indication information also includes: a first function index.
  • each sub-indication information further includes: the name of the API calling function, and the process of generating the graphic instruction stream by the second terminal based on the detection result includes:
  • the second terminal generates corresponding at least one graphic instruction based on the name of the API call function corresponding to each sub-indication information in the at least one sub-indication information, and each graphic instruction includes the name of the API call function in the corresponding sub-indication information.
  • each sub-indication information further includes: a first function index, and the second terminal generates a graphic instruction stream based on the detection result, including:
  • the second terminal uses the first function index in each sub-indication information to query the correspondence between the calling function name and the function index, and obtain the name of the API calling function corresponding to the first function index.
  • the second terminal generates corresponding at least one graphic instruction based on the name of the API call function corresponding to each sub-indication information in the at least one sub-indication information, and each graphic instruction includes the name of the API call function in the corresponding sub-indication information.
  • the first terminal uses the function index to represent the name of the API call function, which is equivalent to data compression, thereby effectively reducing the data volume of the sub-indication information , Improve data transmission efficiency.
  • the process for the second terminal to receive the instruction information sent by the first terminal includes: the second terminal receives the instruction information sent by the first terminal through a data receiving thread, and writes the instruction information into the data queue.
  • the second terminal obtains the indication information from the data queue through the data reading thread.
  • the data receiving thread and the data reading thread run in parallel, and by setting the data receiving thread and the rendering thread, when the two threads are executed in parallel, the parallel execution of data receiving and rendering can be realized, which improves the first terminal Data processing efficiency between and the second terminal.
  • a data transmission device in the third aspect, includes a plurality of functional modules, and the plurality of functional modules interact to implement the above-mentioned first aspect and the methods in various embodiments thereof.
  • the multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be combined or divided arbitrarily based on specific implementations.
  • a data transmission device in a fourth aspect, includes a plurality of functional modules, and the plurality of functional modules interact to implement the above-mentioned second aspect and the methods in various embodiments thereof.
  • the multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be combined or divided arbitrarily based on specific implementations.
  • a data transmission device in a fifth aspect, includes: a processor and a memory; the memory is used to store a computer program, the computer program includes program instructions; the processor is used to call the A computer program that implements the data transmission method as described in any one of the first aspect.
  • a data transmission device in a sixth aspect, includes: a processor and a memory; the memory is used to store a computer program, and the computer program includes program instructions; the processor is used to call the A computer program that implements the data transmission method according to any one of the second aspects.
  • a data processing system in a seventh aspect, includes a first terminal and a second terminal.
  • the first terminal includes the data transmission device according to any one of the third or fifth aspects.
  • the second terminal includes the data transmission device according to any one of the foregoing fourth aspect or the sixth aspect.
  • the data processing system further includes a server.
  • a storage medium is provided, and instructions are stored on the computer storage medium.
  • any data transmission method as in the first method is implemented; or, when the instructions are executed by a second terminal , Achieve any data transmission method as in the second aspect.
  • the embodiments of the present application provide a computer program or computer program product containing computer-readable instructions.
  • the computer program or computer program product runs on a computer, the computer can execute any of the aforementioned first or second aspects.
  • the computer program product may include one or more program units for implementing the foregoing method.
  • this application provides a chip, such as a central processing unit (CPU) or a graphics processing unit (GPU).
  • the chip includes a logic circuit, and the logic circuit may be a programmable logic circuit.
  • the chip is running, it is used to implement any one of the aforementioned image transmission methods of the first aspect or the second aspect.
  • this application provides a chip, such as a CPU or GPU.
  • the chip includes one or more physical cores and a storage medium, and the one or more physical cores implement any one of the aforementioned image transmission methods of the first aspect or the second aspect after reading the computer instructions in the storage medium .
  • the instruction information is generated based on the graphics instruction stream generated by the first sub-application of the target application running in the first terminal, and the data amount of the instruction information is less than or equal to the data amount of the graphics instruction stream. And send the generated instruction information to the second terminal running the second sub-application, so that the second terminal can obtain the graphics instruction stream based on the received instruction information through the second sub-application of the target application, and present the generated image information .
  • the first sub-application running on the first terminal can obtain the graphics instruction stream, and the second sub-application running on the second terminal can realize the recovery of the graphics instruction stream, thereby ensuring
  • the image information is delivered from the first terminal to the second terminal, and because the data volume of the instruction information transmitted between the first terminal and the second terminal is less than or equal to the data volume of the graphics instruction stream, the data volume of the graphics instruction stream is much smaller than The data volume of image information (the two are usually not of the same order of magnitude). Therefore, the data volume of the indication information is small, that is, the amount of data transmitted between the first terminal and the second terminal is small, so as to ensure the image delivery effect. This effectively reduces the transmission delay between the two.
  • Figure 1 is a schematic structural diagram of a data processing system provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a data transmission method provided by an embodiment of the present application.
  • FIG. 3 is a block diagram of modules involved in a data transmission process between a first terminal and a second terminal according to an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a structure of communication information provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a process in which a first terminal sends instruction information to a second terminal according to an embodiment of the present application
  • FIG. 6 is a schematic diagram of a process of a data transmission method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a display state of a data processing system provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a data transmission device provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of another data transmission device provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of another data transmission device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a data transmission device provided by another embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Graphic command stream (or image command stream): A collection of commands used to generate image information.
  • the graphics instruction stream contains one or more graphics instructions (also called image instructions).
  • the graphics processing unit (GPU) in the terminal can obtain image information by running the graphics instructions in the graphics instruction stream for the display to present the image information. Usually, a frame of image is drawn based on one or more graphics instruction streams.
  • Multimedia information includes audio information, text information and/or image information.
  • Graphics instructions including drawing instructions, query instructions, and/or coordinate change instructions, etc.
  • the graphics instruction is an instruction used to draw (also called generating) a drawing target, such as the draw call of the open graphics library (open graphics library, OpenGL) (that is, the central processing unit (CPU)) to the underlying graphics The call command of the drawing interface).
  • the GPU can generate a drawing target that meets the requirements by running graphics instructions.
  • the graphics instructions may include application programming interface (application programming interface, API) calling function names and resource information.
  • the API call function name is the name of the API call function involved in drawing the drawing target.
  • the resource information is the information of the resource used to draw the drawing target in the image frame, for example, the information called by the aforementioned API calling function, such as the information of the vertices or the information of the index value.
  • the graphics command includes the API call function name: glDrawElments and resource information: GLenum mode, GLsize count, GLenum type, and const void *indices.
  • GLenum mode indicates the type of the specified drawing primitive
  • GLsize count indicates the total number of vertices connected by the mode type
  • GLenum type indicates the type of index value
  • const void*indices indicates the index storage location Pointer.
  • the graphics command includes API call function name: glBindFramebuffer and resource information: GLenum target and GLuint framebuffer.
  • GLenum target indicates the frame buffer target of the specified binding operation
  • GLuint framebuffer indicates the name of the frame buffer object to be bound.
  • the graphics command only includes the API call function name: glBlendBarrier, and there is no resource information.
  • the "graphics instruction" in this application can be one instruction, such as an API call function; it can also be a collection of multiple instructions.
  • a draw call usually contains multiple API call functions.
  • This draw call can be considered It is a graphics instruction to complete a drawing.
  • One draw call can draw one drawing target, multiple draw calls can draw one drawing target, or one draw call can draw multiple drawing targets.
  • This application does not limit how to divide the drawing targets. For example, a house to be drawn can be determined as an indivisible drawing target, or a house to be drawn can be divided into two drawing targets, a roof and a wall.
  • FIG. 1 shows a schematic structural diagram of a data processing system involved in a data transmission method provided by an embodiment of the present application.
  • the data processing system 100 includes a first terminal 101, a second terminal 102, and a server 103.
  • the first terminal 101 and the second terminal 102 are connected through the network, and the server 103 is respectively connected with the first terminal 101 and the second terminal 102 through the network.
  • the network can be a wired network or a wireless network.
  • the screen of the second terminal 102 is generally larger than the screen of the first terminal 101, so that the screen projection function of the first terminal on the second terminal can be realized.
  • the first terminal 101 may be a mobile phone
  • the second terminal 102 may be an electronic device with a larger screen such as a TV
  • the server 103 may be a server, or a server cluster composed of several servers, or a cloud computing Service Center.
  • the embodiments of the present application also provide a target application (application, APP), which can generate image information based on a graphic instruction stream during runtime, so that a terminal running the target application can present the image information.
  • the target application is a detachable application, which can include (that is, can be split into) a first sub-application that can be run independently and a second sub-application that can be run independently, and the second sub-application and the first sub-application can be run independently.
  • a sub-application is different.
  • the first sub-application is used to generate the instruction information of the graphics instruction stream at runtime.
  • the second sub-application is used to generate image information based on the instruction information of the image instruction stream.
  • the first sub-application may be installed on the first terminal 101
  • the second sub-application may be installed on the second terminal 102.
  • the image information corresponding to the graphics instruction stream in the first terminal can be displayed on the second terminal.
  • a third sub-application may also be installed in the first terminal 101, the third sub-application is a sub-application that can run independently in the target application, and the third sub-application is different from the first sub-application .
  • the function of the third sub-application may be the same as or similar to that of the second sub-application, and the third sub-application may also generate image information based on the instruction information of the image instruction stream.
  • the second sub-application and the third sub-application correspond to the same installation package, and the first terminal and the second terminal can download and install the installation package in the same server to obtain the second sub-application respectively.
  • the two can be regarded as the same sub-application, the difference is only that they are installed on different terminals; in another optional case, the second sub-application and the third sub-application
  • the application program corresponds to different installation packages, where the second installation package corresponding to the second sub-application is an installation package provided for the terminal of the type of the second terminal (for example, the screen size is greater than the specified size threshold), and the third sub-application
  • the third installation package corresponding to the program is an installation package provided for the terminal of the type of the first terminal (for example, the size of the screen is less than the specified size threshold)
  • the first terminal can download and install the third installation package on the server
  • the second The terminal can download and install the second installation package in the server to obtain the second sub-application and the third sub-application respectively.
  • the two can be regarded as different sub-applications.
  • the target application may be a game application, a reading application (or called a reading application), or a video application.
  • the first sub-application can be called a logical game application, which is mainly used for the logic management of the game, and the second and third sub-applications can be called resource game applications. Mainly used for the acquisition and rendering of game resources.
  • the first sub-application may include a game logic module, a physical module, a user interface module, a rendering module, a network module, an input and output processing module, and a game login and update module.
  • the second sub-application may include a rendering resource information package and the like.
  • the data processing system provided by the embodiment of the present application may be in the following two situations respectively.
  • the first situation the first terminal 101 only supports the split operation mode, which refers to the mode in which the first terminal 101 and the second terminal 102 cooperate to present image information.
  • the first terminal 101 and the second terminal 102 cooperate with each other to present image information.
  • the terminal can only present image information through the second terminal, and cannot present image information by itself.
  • the first terminal 101 is installed with a first sub-application
  • the second terminal 102 is installed with a second sub-application. With the cooperation of the first sub-application run by the first terminal 101 and the second sub-application run by the second terminal, the second sub-application of the second terminal is made to present the generated image information.
  • the first terminal 101 may not only support the aforementioned split operation mode, but also support the merge operation mode.
  • the combined operation mode refers to a mode in which the first terminal 101 can independently present image information.
  • the first terminal 101 is installed with a first sub-application and a third sub-application.
  • the first terminal runs the first sub-application and the third sub-application, the first terminal can generate a graphic instruction stream to generate image information based on the graphic instruction stream and present the image information.
  • the first terminal can be in the split operation mode and the merge operation mode at the same time (that is, the two modes overlap in the execution period), or it can be in the split operation mode and the merge operation mode (that is, the two modes are divided in time).
  • the state in which the first terminal can be in the split operation mode and the combined operation mode at the same time is referred to as the compatible operation state
  • the state in which the first terminal can be in the split operation mode and the combined operation mode in time intervals is referred to as non Compatible operating status.
  • the first terminal 101 When the first terminal is in a non-compatible operating state, if the first terminal 101 is presenting image information (that is, the first terminal separately executes the combined operation mode), the second terminal 102 does not perform related actions; the second terminal 102 is presenting image information (That is, when the first terminal separately executes the split operation mode), the first terminal 101 does not perform related actions.
  • the first terminal 101 is installed with a first sub-application and a third sub-application
  • the second terminal 102 is installed with a second sub-application.
  • the second terminal 102 can display the generated image information with the cooperation of the second sub-application running on the second terminal 102, and the first terminal 101 can also run the second sub-application.
  • the three sub-applications enable the first terminal 101 to present the same image information. This can effectively improve the user experience.
  • the aforementioned compatible operating state and incompatible operating state of the first terminal may be set by the user, and the first terminal may perform state switching under the control of the user, which is not limited in the embodiment of the present application.
  • the first terminal 101 may support two modes of split operation mode and merge operation mode.
  • the process for the first terminal 101 to determine that the first sub-application is in the split operation mode may be:
  • the first terminal 101 may determine that the first sub-application is in the split operation mode after receiving the split operation instruction through the first sub-application run by the first terminal 101. Alternatively, the first terminal 101 may also determine that the first sub-application is in the split operation mode after detecting that only the first sub-application of the target application is installed in the first terminal. Alternatively, the first terminal 101 may also determine that the first sub-application is in the split operation mode after detecting that the connection between the first sub-application in the first terminal and the second sub-application in the second terminal is successfully established.
  • the process for the first terminal 101 to determine that the first sub-application is in the combined operation mode may be:
  • the first terminal 101 may determine that the first sub-application is in the combined operation mode after receiving the combined operation instruction through the first sub-application. Alternatively, the first terminal 101 may also detect that the connection establishment between the first sub-application in the first terminal and the second sub-application in the second terminal fails, and it is detected that the third sub-application is installed in the first terminal. After that, it is determined that the first sub-application is in the combined operation mode.
  • the embodiment of the present application provides a data transmission method, which is applied to a data processing system.
  • the data processing system may be in the first situation or the second situation.
  • the following embodiments take the data processing system in the second situation as an example for description. As shown in FIG. 2, the method includes:
  • Step 201 The first terminal generates a graphics instruction stream through a first sub-application running in the first terminal.
  • the first sub-application After the first terminal runs the first sub-application, if the user operates the first sub-application, the first sub-application generates a graphic instruction stream accordingly.
  • the graphics instruction stream may include a variety of graphics instructions, for example, the graphics instruction may be a drawing position icon instruction.
  • the first terminal uses a process in which a user of the first terminal generates a graphic instruction stream through a trigger operation on the touch screen of the first terminal as an example.
  • FIG. 3 shows a block diagram of the modules involved in the data transmission process of the first terminal and the second terminal.
  • the first terminal includes an event monitoring module, an event reading module, and a perception calculation module.
  • the event monitoring module listens to the touch operation, triggers the event reading module to read the user's operation posture, and sends the corresponding data generated based on the operation posture To the perceptual computing module.
  • the perception calculation module After receiving the data, the perception calculation module generates a graphic instruction stream based on the position information of the user's touch reflected by the data.
  • Step 202 When it is detected that the first sub-application is in the split operation mode, the first terminal generates instruction information based on the graphic instruction stream through the first sub-application.
  • the instruction information is used to indicate the graphics instruction stream, and the data amount of the instruction information is less than or equal to the data amount of the graphics instruction stream.
  • the foregoing implementation manners for the first terminal to generate the instruction information based on the graphic instruction stream through the first sub-application include but are not limited to the following two implementation manners.
  • the resource information carried in the graphics instruction can be divided into two parts with different data sizes for subsequent processing.
  • the resource information includes first resource information and/or second resource information.
  • the resource information is the resource information used to draw the drawing target in the image frame.
  • the data amount of the first resource information is greater than the data amount of the second resource information, and the data amount of the two is not an order of magnitude.
  • the amount of data is much larger than that of the second resource information.
  • the size of the first resource information is 4 kilobytes (KB)
  • the size of the second resource information is 8 bytes (B).
  • the first resource information and the second resource information can be determined in multiple ways.
  • the first resource information and the second resource information may be determined in the resource information by using a preset data amount threshold.
  • the data volume of the first resource information is greater than the data volume threshold, and the data volume of the second resource information is less than the data volume threshold; in two alternative examples, the parameters corresponding to the first resource information and the second resource information are The fixed parameter, that is, the parameter corresponding to the resource information of the graphics instruction belongs to the first parameter set is the first resource information, and the corresponding parameter belongs to the second parameter set is the second resource information, where the first parameter set And the parameters in the second parameter set are predetermined fixed parameters.
  • the first parameter set may include a resource parameter, and the parameter length of the resource parameter is usually not a fixed value, that is, the length is variable.
  • the resource parameter is a pointer parameter that points to the storage address of the resource information, and the length of the pointer parameter usually changes as the storage address of the resource information changes.
  • the resource parameter is: const void*indices.
  • the second parameter set may include a non-resource parameter, and the parameter length of the non-resource parameter is usually a fixed value, so it is also called a fixed-length parameter, and the data amount of the fixed-length parameter is usually small.
  • non-resource parameters are: GLenum mode, GLsize count, or GLenum type.
  • the realization process of the first terminal generating instruction information based on the graphic instruction stream through the first sub-application may include:
  • Step A1 The first terminal detects the content in the at least one graphics instruction through the first sub-application.
  • the first terminal uses the first sub-application to detect whether the graphics instruction includes the first resource information and the second resource information. Due to the multiple ways of determining the first resource information and the second resource information in the aforementioned graphics instruction. Correspondingly, there may be multiple detection methods for the first terminal to detect the content in the at least one graphic instruction through the first sub-application. In an optional example, the first terminal may determine whether the content in the graphics command includes the first resource information and/or the second resource information by determining whether the data amount of each resource information in the graphics command is greater than the data amount threshold. .
  • the first terminal uses the first sub-application to determine whether the parameter corresponding to the resource information in the graphics instruction belongs to the first parameter set or the second parameter set to determine whether the content in the graphics instruction includes the first parameter set.
  • One resource information and/or second resource information are included in the first terminal.
  • Step A2 Generate indication information based on the detection result, where the indication information includes at least one sub-indication information corresponding to the at least one graphics command one-to-one.
  • the first resource information in any graphics command can be used to query the correspondence between resource information and the information index to obtain the first information index corresponding to the first resource information.
  • the sub-indication information corresponding to any graphics command includes the first information index; when any graphics command includes the second resource information, the sub-indication information corresponding to any graphics command includes the second resource information.
  • the first terminal pre-stores the corresponding relationship between the aforementioned resource information and the information index (the corresponding relationship is usually stored in the first installation package corresponding to the first sub-application, and the first installation package is downloaded through the server.
  • the corresponding relationship is usually stored in the first installation package corresponding to the first sub-application, and the first installation package is downloaded through the server.
  • the updated corresponding relationship can be stored in the updated first installation package downloaded by the first terminal through the server; or it can also be directly downloaded from the corresponding server through the first sub-application)
  • the information index The data amount of is smaller than the data amount of the first resource information.
  • the correspondence between resource information and information index may be represented in the form of a correspondence table.
  • the following table 1 includes the information index 1 (res_index1) corresponding to the first resource information 1 (res1), the information index 2 (res_index2) corresponding to the first resource information 2 (res2), and the first resource information 3 (res3) ) Corresponding information index 3 (res_index3). Since the content of the first resource information is usually large, in order to facilitate readers' understanding, the characters in Table 1 are only represented by schematic characters, and the characters in Table 1 do not represent the actual content of the first resource information.
  • the first sub-application can traverse the first resource information in the aforementioned at least one graphic instruction to query the correspondence between the resource information and the information index, so as to obtain the first information index corresponding to each first resource information.
  • the target graphics instruction is any one of the one or more graphics instructions included in the graphics instruction stream
  • the first resource information in the target graphics instruction is ses1
  • the first terminal uses the first sub-application to use res1 queries the correspondence table to obtain the information index corresponding to the first resource information: res_index1.
  • the instruction information generated by the first terminal based on the detection result includes the The target sub-indication information corresponding to the target graphics instruction, the target sub-indication information includes an information index: res_index1 and the second resource information in the target graphics instruction.
  • the first terminal divides the resource information carried in the graphics instruction into two parts with different data sizes (that is, the first resource information and the second resource information), and the larger part (I.e., the first resource information) is represented by a resource index, which is equivalent to performing data compression, thereby effectively reducing the data amount of the sub-indication information and improving the data transmission efficiency.
  • each of the foregoing graphics commands may also include the name of the API calling function.
  • the first terminal may generate the indication information based on the detection result in two ways.
  • the indication information carries the name of the API call function
  • the aforementioned process of generating the indication information by the first terminal based on the detection result includes:
  • the first terminal generates instruction information based on the first function index of the corresponding graphics instruction, and the instruction information includes the name of the API calling function.
  • the instruction information carries the function index of the API call function
  • the foregoing process of generating the instruction information based on the detection result by the first terminal includes:
  • Step A21 The first terminal uses the name of the API call function in each graphics instruction to query the correspondence between the call function name and the function index through the first sub-application, and obtain the first function index corresponding to the name of the API call function.
  • the first terminal pre-stores the correspondence between the name of the API calling function and the function index (the correspondence is usually stored in the first installation package corresponding to the first sub-application, and the first installation package is downloaded through the server.
  • the updated corresponding relationship may be stored in the updated first installation package downloaded by the first terminal through the server; or it may be directly downloaded from the corresponding server through the first sub-application), the
  • the data volume of the function index is smaller than the data volume of the API call function name.
  • the correspondence between the name of the API calling function and the function index may be represented in the form of a correspondence table.
  • the following table 2 includes the function index 1 (api_index1) corresponding to the name of the API calling function 1 (glDrawElments), the function index 2 (api_index2) corresponding to the name of the API calling function 2 (eglInitialize), and the name of the API calling function Function index 3 (api_index3) corresponding to 3 (glUniform4fw).
  • the first terminal uses eglInitialize to query the correspondence table through the first sub-application to obtain the function index corresponding to the name of the API calling function: api_index2.
  • Step A22 The first terminal generates indication information based on the first function index obtained by the query.
  • Each sub-instruction information included in the instruction information includes the first function index of the corresponding graphics instruction.
  • the indication information generated by the first terminal based on the first function index obtained by the query includes target sub-indication information corresponding to the target graphics instruction, and the target sub-indication information includes the function index: api_index2.
  • the first terminal uses the function index to represent the name of the API call function, which is equivalent to data compression, thereby effectively reducing the data volume of the sub-indication information , Improve data transmission efficiency.
  • the implementation process of the foregoing first terminal generating instruction information based on the graphic instruction stream through the first sub-application includes:
  • the first terminal uses the corresponding relationship between each information query information in each graphic instruction and the information index through the first sub-application to obtain the second information index corresponding to the graphic instruction.
  • the first terminal generates indication information based on the second information index obtained by the query, where the indication information includes at least one sub-indication information corresponding to at least one graphics command one-to-one, and each sub-indication information includes the second information index.
  • the graphics instruction may include the name of the API calling function.
  • the graphics instruction may include and may also include resource information.
  • the first terminal pre-stores the correspondence between the information and the information index (the correspondence is usually stored in the first installation package corresponding to the first sub-application, and the first installation package is downloaded through the server.
  • the updated correspondence relationship can be stored in the updated first installation package downloaded by the first terminal through the server; or it can also be directly downloaded from the corresponding server through the first sub-application), the information index data The amount is less than or equal to the data amount of the corresponding information.
  • the correspondence between the information and the information index may be represented in the form of a correspondence table.
  • the first terminal obtains the information index for each information and carries it in the indication information, which is equivalent to performing data compression, thereby effectively reducing the data volume of the sub-indication information and improving the data. Transmission efficiency.
  • the first terminal no longer distinguishes the resource information in the graphics instruction by the amount of data, thereby reducing the process of determining the first resource information and the second resource information, thereby simplifying the generation of the instruction information The process of improving the efficiency of generating indication information.
  • the graphics instruction may also only include the name of the API call function, and the aforementioned process of generating the instruction information by the first terminal through the first sub-application based on the graphics instruction flow may include:
  • the first terminal uses the name of the API call function in each graphics instruction to query the correspondence between the name of the call function and the function index through the first sub-application, and obtain the first function index corresponding to the name of the API call function.
  • the first terminal generates indication information based on the first function index obtained by the query.
  • Each sub-indication information only included in the instruction information includes the first function index of the corresponding graphics instruction.
  • Step 203 The first terminal sends the generated instruction information to the second terminal running the second sub-application.
  • This process is the process of information exchange between the first terminal and the second terminal.
  • the first terminal may send the instruction information every time the instruction information corresponding to the graphics instruction is generated; or it may send the designated instruction information after each designated number of instruction information is generated.
  • This application The embodiment does not limit this.
  • the first terminal and the second terminal have established a network connection
  • the network connection may take many forms.
  • TCP transmission control protocol
  • IP internet protocol
  • WIFI wireless Fidelity
  • the process of sending the generated instruction information by the first terminal to the second terminal running the second sub-application includes:
  • Step B1 The first terminal sends a communication message to the second terminal, where the communication message includes indication information.
  • the first terminal encapsulates the indication information to obtain the communication message.
  • FIG. 4 shows a schematic diagram of a structure of communication information.
  • the communication information includes instruction information.
  • the instruction information includes the function index corresponding to the graphics instruction, the first information index, and the second resource information as an example for description.
  • the communication information further includes a data packet length field, the data packet length field and the indication information constitute an encapsulated data packet, and the data packet length field carries length information of the encapsulated data packet.
  • the size of the data packet length field, the function index corresponding to the graphics instruction, and the first information index included in the encapsulated data packet are all 2 bytes.
  • the first terminal may sequentially send the communication message to the second terminal through the data transmission layer, the network layer, and the data link layer.
  • the communication information also includes a TCP header, an IP header, and an Ethernet header.
  • the TCP header, IP header and Ethernet header in the communication message can be obtained by encapsulating the encapsulated data packet through the transport layer, the network layer and the data link layer in turn, and the first terminal will eventually pass through the data link layer.
  • the communication message is transmitted to the second terminal.
  • two threads may be set to send the foregoing indication information.
  • the process of the first terminal sending the generated indication information to the second terminal running the second sub-application may include:
  • the first terminal writes the generated indication information into the data queue through the data writing thread, and then obtains the indication information from the data queue through the data sending thread, and sends the obtained indication information to the second sub-application running the second sub-application. terminal.
  • the data writing thread when the sending process complies with the TCP/IP protocol, the data writing thread is also called a data encapsulation thread.
  • the data writing thread can encapsulate the instruction information and write the processed communication information into the data queue.
  • the first terminal obtains the communication information carrying the indication information from the data queue through the data sending thread, and sends the obtained communication information to the second terminal.
  • the data writing thread and the data sending thread can run in parallel.
  • the parallel execution of data writing and sending can be realized, which improves the first terminal Data processing efficiency between and the second terminal.
  • the data queue may include only one queue, or the data queue may also include two sub-queues, the two sub-queues being the first sub-queue and the second sub-queue.
  • the foregoing process of sending the generated indication information by the first terminal to the second terminal running the second sub-application may include:
  • the first terminal writes the generated instruction information into the data queue through the data writing thread, acquires the instruction information from the data queue through the data sending thread, and sends the acquired instruction information to the second terminal running the second sub-application .
  • the writing position of the data writing thread in the data queue and the reading position of the data sending thread in the data queue are different, so that parallel execution of the two threads can be ensured.
  • the data writing thread can write the generated instruction information from the head of the data queue to the data queue, and the data sending thread reads the instruction information from the end of the data queue (that is, obtaining the instruction information), or data writing The incoming thread can write the generated instruction information from the tail of the data queue into the data queue, and the data sending thread reads the instruction information from the head of the data queue (that is, obtains the instruction information).
  • the process of sending the generated indication information by the first terminal to the second terminal running the second sub-application may include:
  • the first terminal writes the generated indication information into the first sub-queue through the data writing thread.
  • the first terminal exchanges the first sub-queue and the second sub-queue so that the first terminal subsequently writes the generated indication information through the data writing thread Enter the new first sub-queue (that is, the original second sub-queue), and obtain indication information from the new second sub-queue (that is, the original first sub-queue) through the data sending thread.
  • the data writing thread and data Sending threads can run in parallel. In this way, it can be ensured that the information in the first sub-queue and the second sub-queue are continuously written and sent. In the process of data sending by the data sending thread, the data writing thread can continue to write the instruction information corresponding to the next image instruction stream. Therefore, the two threads run in parallel, which improves the efficiency of data processing.
  • the first terminal generates an image instruction stream corresponding to the drawing target: "Jingke" through the first sub-application.
  • the image instruction stream includes a plurality of graphics instructions, and the instruction information 1 to 10 are generated accordingly.
  • the first terminal sequentially writes the instruction information 1 to 10 into the first sub-queue through the data writing thread, and after the writing is completed, the first sub-queue and the second sub-queue are exchanged.
  • the first terminal reads the instruction information 1 sequentially from the second sub-queue (that is, the original first sub-queue) through the data sending thread, and sends the read instruction information to the second terminal.
  • the first terminal since the first terminal simultaneously performs encapsulation processing and sending through the data writing thread and the data sending thread, the parallel processing capability of the first terminal is enhanced, and the efficiency of the first terminal to process data is improved.
  • Step 204 The second terminal receives the instruction information sent by the first terminal, where the instruction information is used to indicate the graphics instruction stream generated by the first terminal through the first sub-application.
  • the embodiment of the present application continues to use the TIP/IP protocol-based network connection to perform instruction information transmission as an example for description.
  • the process of the second terminal receiving the indication information sent by the first terminal includes: the second terminal receives a communication message, and the communication message includes the indication information.
  • the second terminal obtains the indication information based on the received communication message.
  • the communication message received by the second terminal may be decapsulated to obtain the instruction information.
  • the communication information may sequentially decapsulate the Ethernet header, IP header, and TCP header through the data link layer, network layer, and data transmission layer to obtain encapsulated data packets, and then obtain instruction information.
  • the second terminal may also set up two threads to receive the aforementioned indication information. Then the process of the second terminal receiving the indication information sent by the first terminal may include:
  • the second terminal writes the received instruction information sent by the first terminal into the data queue through the data receiving thread, and then obtains the instruction information from the data queue through the rendering thread.
  • the data receiving thread and the data reading thread run in parallel.
  • the data queue may also include only one queue, or the data queue may also include two sub-queues, the two sub-queues being the first sub-queue and the second sub-queue.
  • the above-mentioned process of the second terminal receiving the instruction information sent by the first terminal may include: the second terminal writes the received instruction information sent by the first terminal into the data queue through the data receiving thread, and then through The rendering thread obtains the indication information from the data queue.
  • the rendering thread may also obtain a graphics instruction stream based on the instruction information, and perform rendering of the image frame.
  • the writing position of the data receiving thread in the data queue and the reading position of the rendering thread in the data queue are different, so that parallel execution of the two threads can be ensured.
  • the data receiving thread can write the received instruction information from the head of the data queue to the data queue, and the rendering thread can read the instruction information from the end of the data queue (that is, obtain the instruction information), or the data receiving thread can The generated instruction information is written from the end of the data queue to the data queue, and the rendering thread reads the instruction information from the head of the data queue (that is, the instruction information is obtained).
  • the above-mentioned process of the second terminal receiving the indication information sent by the first terminal may include:
  • the second terminal writes the received indication information into the first sub-queue through the data receiving thread.
  • the first terminal exchanges the first sub-queue and the second sub-queue, so that the first terminal subsequently writes the generated instruction information into the new sub-queue through the data receiving thread.
  • the first sub-queue that is, the original second sub-queue
  • the indication information is obtained from the new second sub-queue (that is, the original first sub-queue) through the rendering thread. In this way, it can be ensured that the information in the first sub-queue and the second sub-queue are continuously written and sent.
  • the data receiving thread can continue to write the instruction information corresponding to the next image instruction stream. Therefore, the two threads run in parallel, which improves the efficiency of data processing.
  • Step 205 The second terminal obtains the graphics instruction stream based on the received instruction information through the second sub-application running in the second terminal.
  • the first terminal in the above step 102, the first terminal generates the instruction information based on the graphic instruction stream.
  • the second terminal uses the second terminal to obtain two types of the graphic instruction stream based on the instruction information.
  • the implementation method is described as an example.
  • the instruction information includes at least one sub-indication information corresponding to at least one graphics instruction one-to-one, and each sub-indication information includes: second resource information and/or first An information index.
  • the above-mentioned second terminal obtains the graphics instruction stream based on the instruction information, including:
  • Step C1 The second terminal detects the content in the sub-indication information through the second sub-application.
  • the second terminal uses the second sub-application to detect whether the content in the sub-indication information includes the first information index and/or the second resource information.
  • Step C2 The second terminal generates a graphic instruction stream based on the detection result.
  • the graphics instruction stream includes at least one graphics instruction corresponding to at least one sub-instruction information one-to-one.
  • the first information index in each sub-indication information may be used to query the correspondence between resource information and the information index to obtain the first resource information corresponding to the first information index.
  • the graphics instruction corresponding to any sub-indication information includes the first resource information.
  • the graphics instruction corresponding to any sub-indication information includes the second resource information.
  • the second terminal pre-stores the same resource information and information index correspondence as the first terminal (this correspondence is usually stored in the second installation package corresponding to the second sub-application, and the second installation package is downloaded through the server
  • this correspondence is usually stored in the second installation package corresponding to the second sub-application, and the second installation package is downloaded through the server
  • the updated corresponding relationship can be stored in the updated second installation package downloaded by the second terminal through the server; or it can be downloaded directly from the corresponding server through the second sub-application )
  • the data volume of the information index is less than the data volume of the resource information.
  • the correspondence between resource information and information index can refer to the content of Table 1 above.
  • the graphics instruction also includes the name of the API calling function, and the foregoing step C2 may have the following two optional methods:
  • each sub-indication information further includes: the name of the API calling function, and the second terminal generates the graphic instruction stream based on the detection result.
  • the process includes:
  • the second terminal generates corresponding at least one graphic instruction based on the name of the API call function corresponding to each sub-indication information in the at least one sub-indication information, and each graphic instruction includes the name of the API call function in the corresponding sub-indication information.
  • each sub-indication information further includes: the first function index, and the second terminal generates a graphic instruction stream based on the detection result, including:
  • Step C21 The second terminal uses the first function index in each sub-indication information to query the correspondence between the calling function name and the function index through the second sub-application, and obtain the name of the API calling function corresponding to the first function index.
  • the second terminal pre-stores the corresponding relationship between the name of the API call function and the function index that is the same as that of the first terminal (the corresponding relationship is usually stored in the second installation package corresponding to the second sub-application, and the second installation package is Downloaded through the server.
  • the updated correspondence may be stored in the updated second installation package downloaded by the second terminal through the server; or it may be directly in the corresponding Downloaded from the server), the data volume of the function index is less than the data volume of the resource information.
  • the corresponding relationship between resource information and information index can refer to the content of Table 2 above.
  • Step C22 The second terminal generates corresponding at least one graphics instruction based on the name of the API call function corresponding to each sub-indication information in the at least one sub-indication information, and each graphics instruction includes the corresponding API call function in the corresponding sub-indication information. name.
  • each sub-indication information includes: a second information index. Then, the process of obtaining the graphics instruction stream by the second terminal based on the instruction information includes:
  • the second terminal uses the second sub-application program to query the correspondence between the second information index in each sub-indication information and the information index to obtain the second information index correspondence
  • This information belongs to graphics instructions.
  • the second terminal generates corresponding at least one graphics instruction based on the information corresponding to each sub-indication information in the at least one sub-indication information to obtain a graphics instruction stream.
  • the second terminal stores the same information and the corresponding relationship of the information index as the first terminal (the corresponding relationship is usually stored in the second installation package corresponding to the second sub-application, and the second installation package is downloaded through the server
  • the updated corresponding relationship can be stored in the updated second installation package downloaded by the second terminal through the server; or it can be downloaded directly from the corresponding server through the second sub-application )
  • the data volume of the information index is less than or equal to the data volume of the corresponding information.
  • the correspondence between the information and the information index may be represented in the form of a correspondence table.
  • each sub-indication information may also include only the first function index.
  • the process of obtaining the graphics instruction stream by the second terminal based on the instruction information includes:
  • the first terminal generates the instruction information based on the graphics instruction stream through the first sub-application, and the second terminal uses the second sub-application
  • the program uses the first function index in each sub-indication information to query the correspondence between the name of the calling function and the function index, and obtain the name of the API calling function corresponding to the first function index.
  • the second terminal generates the corresponding at least one graphic instruction based on the name of the API call function corresponding to each sub-indication information in the at least one sub-indication information, and each graphic instruction only includes the name of the API call function in the corresponding sub-indication information.
  • Step 206 The second terminal generates image information based on the obtained graphics instruction stream through the second sub-application.
  • the second terminal performs rendering processing based on the obtained graphics instruction stream through the second sub-application to generate image information. Then the second terminal presents the image information. For example, the image frame corresponding to the image information is displayed, the audio corresponding to the image information is played, and/or the text corresponding to the image information is displayed.
  • the second terminal may include a receiving module, a rendering module, and a presentation module.
  • the receiving module is used to receive the instruction information sent by the first terminal.
  • the rendering module is used to obtain the graphics instruction stream based on the received instruction information.
  • the presentation module is used to generate and present image information based on the obtained graphics instruction stream.
  • Step 207 When it is detected that the first sub-application is in the combined operation mode, the first terminal sends the graphics instruction stream to the third sub-application running in the first terminal through the first sub-application.
  • the first terminal can directly send the graphics instruction stream to the third sub-application through the first sub-application.
  • This process is a process of instruction stream transmission inside the first terminal.
  • Step 208 The first terminal generates image information based on the graphics instruction stream through the third sub-application.
  • the first terminal performs rendering processing based on the acquired graphics instruction stream through the third sub-application to generate image information. Then the third terminal displays based on the image information.
  • the first terminal when it is detected that the first sub-application is in the split operation mode, the first terminal can perform the above steps 201 to 203, and accordingly, the second terminal can perform the above steps 204 and Step 206.
  • the first terminal may execute the above step 207 and step 208.
  • the data processing system provided by the embodiment of the present application only has the aforementioned first situation, that is, the first terminal in the data processing system only supports the split mode of operation, then only the aforementioned mode can be executed. Steps 201 to 203, correspondingly, the second terminal can perform step 204 and step 206.
  • the first terminal can determine that the first sub-application is in split operation after detecting that the connection between the first sub-application in the first terminal and the second sub-application in the second terminal is successfully established.
  • the first terminal can generate a target graphics instruction stream for presenting prompt information that the first terminal and the second terminal are successfully connected, so that the second terminal presents the prompt information after receiving the target graphics instruction stream.
  • the first terminal may also detect that the connection establishment between the first sub-application in the first terminal and the second sub-application in the second terminal fails, and the third sub-application is not installed in the first terminal Program (for example, when the first sub-application fails to establish a connection with the second sub-application for the first time), the third sub-application should be automatically downloaded, so that the first terminal can display the image information normally.
  • the first terminal may generate a target graphics instruction stream for presenting the prompt information of the connection failure of the first terminal and the second terminal, so that after receiving the target graphics instruction stream, the first terminal presents the prompt information, thereby prompting the user to connect failure.
  • the first terminal may also execute a problem detection process after detecting that the connection between the first sub-application and the second sub-application fails to be established, so as to analyze the establishment of the connection between the first sub-application and the second sub-application
  • the reason for the failure after determining the reason for the connection failure between the two, the first terminal displays the reason for the connection failure on the user interface so that the user can understand the connection between the two subroutines.
  • the first terminal may perform a heartbeat detection function and send a heartbeat request to the second terminal.
  • the first terminal may generate a graphic instruction stream for presenting the prompt information with the prompt words "no network", so that the third sub-application presents the prompt words of "no network” after receiving the target graphic instruction stream .
  • this embodiment of the present application takes the aforementioned first terminal as a mobile phone and a second terminal as a TV as an example to describe the data transmission method applied by the first terminal and the second terminal in the split operation mode.
  • the user of the mobile phone is Xiao Ming
  • the target application is game G.
  • the game G includes a first sub-application G1 and a second sub-application G2.
  • Xiao Ming turns on the TV, and runs the second sub-application G2 of the game G installed on the TV, and runs the first sub-application G1 of the game G installed on the mobile phone.
  • the mobile phone When the mobile phone detects that the first sub-application G1 is successfully connected to the second sub-application installed on the TV, Xiao Ming can operate the mobile phone to display the game content on the TV.
  • the mobile phone When Huawei clicks on game G, the mobile phone generates a graphics instruction stream through the first sub-application G1, and the graphics instruction stream includes the first graphics instruction and the second graphics instruction.
  • the first graphics instruction includes the name of the API call function (indicated as API1 in Figure 6): glUniform4fw and second resource information;
  • the second graphics instruction includes the name of the API call function (indicated as API2 in Figure 6): glDrawElments, the first 1.
  • Resource information res2 and second resource information (both res2 and second resource information in FIG.
  • the mobile phone uses the hook module in the first sub-application G1 so that it can generate instruction information based on the graphics instruction stream and the corresponding relationship shown in Table 1 and Table 2 above.
  • the instruction information includes a first sub instruction corresponding to the first graphics instruction.
  • the first sub-indication information includes a function index: api_index3 and second resource information;
  • the second sub-indication information includes a function index: api_index2, an information index: res_index2, and second resource information.
  • the mobile phone sends the instruction information to the TV running the second sub-application G2.
  • the TV After the TV receives the instruction information, it first obtains it based on the instruction information, the correspondence table of resource information and information index shown in Table 1 above, and the correspondence table of API call function names and function indexes shown in Table 2 above.
  • Graphics instruction stream also referred to as the function index and information index included in the graphics instruction in the interpretation image instruction stream.
  • the second terminal performs rendering processing based on the obtained graphics instruction stream through the second sub-application G2 to generate image information.
  • the second terminal presents the image information.
  • Xiao Ming’s mobile phone only supports split operation mode (for example, Xiao Ming’s mobile phone only runs the first sub-application).
  • Xiao Ming mobile phone does not display the user interface of the game, so Xiao Ming can pass the blind control of the mobile phone.
  • the mobile phone is equivalent to the gamepad; in the second case, as shown in Figure 7, Xiao Ming’s mobile phone only supports the above-mentioned split operation mode, but also supports the combined operation mode (such as Xiao Ming’s mobile phone).
  • the first sub-application and the third sub-application are running at the same time), Xiao Ming's mobile phone displays the game user interface, and the TV also displays the game user interface, so Xiao Ming can control the game content on the TV by operating the mobile phone. Since the user interface of the game is displayed on the screen of the TV, the user can obtain a larger view of the game and improve the visual experience of the mobile game.
  • the graphics instruction stream generated by the mobile phone can refer to the data transmission method shown in FIG. 6 so that the image information corresponding to the graphics instruction stream is presented on the TV.
  • the instruction information is generated based on the graphic instruction stream generated by the first sub-application of the target application running in the first terminal, and the data amount of the instruction information is Less than or equal to the amount of data in the graphics instruction stream. And send the generated instruction information to the second terminal running the second sub-application, so that the second terminal can obtain the graphics instruction stream based on the received instruction information through the second sub-application of the target application, and present the generated image information .
  • the first sub-application run by the first terminal can obtain the graphics instruction stream
  • the second sub-application run by the second terminal can realize the restoration of the graphics instruction stream, thereby ensuring that image information is delivered from the first terminal to the second terminal
  • the data volume of the instruction information transmitted between the first terminal and the second terminal is less than or equal to the data volume of the graphics instruction stream
  • the data volume of the graphics instruction stream is far greater than the data volume of the image information
  • the data of the instruction information The amount is small, that is, the amount of data transmitted between the first terminal and the second terminal is small, thereby effectively reducing the transmission delay between the two on the premise of ensuring the effect of image delivery.
  • the first terminal and the second terminal transmit indication information with a small amount of data, which can reduce the transmission delay between the two.
  • the indication information generated in the foregoing step 202 carries the function index of the API calling function and the information index of the first resource information
  • the transmission delay between the first terminal and the second terminal is less than 10 microseconds (ms), which is far It is lower than the 200-300ms transmission delay between the two in the related art.
  • the reduced transmission delay can improve the real-time performance of the game operation, thereby improving the game experience.
  • FIG. 8 is a schematic structural diagram of a data transmission device provided by an embodiment of the present application, and the data transmission device is applied to a first terminal. As shown in FIG. 8, the data transmission device 300 includes:
  • the first generating module 301 is configured to generate a graphics instruction stream through a first sub-application running in the first terminal, the first sub-application being a sub-application that can be run independently in the detachable target application.
  • the second generation module 302 is configured to generate instruction information based on the graphics instruction stream, the instruction information is used to indicate the graphics instruction stream, and the data amount of the instruction information is less than or equal to the data amount of the graphics instruction stream.
  • the first sending module 303 is configured to send the generated instruction information to the second terminal running the second sub-application, so that the second terminal can obtain the graphics instruction stream based on the instruction information through the second sub-application, and generate image information .
  • the second sub-application is a sub-application that can run independently in the target application, and the second sub-application is different from the first sub-application.
  • the graphics instruction stream includes at least one graphics instruction, where the graphics instruction includes first resource information and second resource information, and the data amount of the first resource information is greater than the data amount of the second resource information, and the second generation module 302, Used for:
  • the content in the at least one graphics instruction is detected.
  • the indication information is generated based on the detection result, and the indication information includes at least one sub-indication information corresponding to at least one graphic instruction one-to-one.
  • the sub-indication information corresponding to any graphics command includes a first information index
  • the first information index is to use the first resource information in any graphics command to query resource information and The corresponding relationship of the information index, the obtained information index; when any graphics command includes the second resource information, the sub-indication information corresponding to the any graphics command includes the second resource information.
  • the graphics instruction also includes the name of the API calling function, and the second generation module 302 is used for:
  • the name of the API calling function in each graphics instruction is used to query the correspondence between the calling function name and the function index, and the first function index corresponding to the name of the API calling function is obtained. Based on the first function index obtained by the query, indication information is generated, and each sub-indication information included in the indication information includes the first function index of the corresponding graphics instruction.
  • the data transmission device 300 further includes:
  • the second sending module 304 is configured to send the graphics instruction stream to the third sub-application running in the first terminal through the first sub-application when it is detected that the first sub-application is in the combined operation mode.
  • the third sub-application is A sub-application that can run independently in the target application, and the third sub-application is different from the first sub-application.
  • the third generation module 305 is configured to generate image information based on the graphics instruction stream through the third sub-application.
  • the second generating module 302 is configured to: when it is detected that the first sub-application is in the split operation mode, generate instruction information based on the graphic instruction stream.
  • the data transmission apparatus 300 further includes:
  • the first determining module 306 is configured to determine that the first sub-application is in the split operation mode after receiving the split operation instruction through the first sub-application, or, when it is detected that only the target application is installed in the first terminal After the first sub-application in the first terminal, it is determined that the first sub-application is in the split operation mode, or after it is detected that the connection between the first sub-application in the first terminal and the second sub-application in the second terminal is successfully established , It is determined that the first sub-application is in the split operation mode.
  • the second determining module 307 is configured to determine that the first sub-application is in the combined operation mode after receiving the combined operation instruction through the first sub-application, or, after detecting that the first sub-application and the first sub-application in the first terminal are in a combined operation mode After the connection establishment of the second sub-application in the second terminal fails, and after detecting that the third sub-application is installed in the first terminal, it is determined that the first sub-application is in the combined operation mode.
  • the first sending module 303 is configured to write the generated indication information into the data queue through the data writing thread.
  • the data sending thread obtains the indication information from the data queue, and sends the obtained indication information to the second terminal running the second sub-application; wherein the data writing thread and the data sending thread run in parallel.
  • the first sub-application run by the first generation module generates the graphics instruction stream
  • the second generation module generates the instruction information based on the graphics instruction stream.
  • the amount of data is less than or equal to the amount of data in the graphics instruction stream.
  • the sending module sends the generated instruction information to the second terminal running the second sub-application, so that the second terminal can obtain the graphics instruction stream based on the received instruction information through the second sub-application of the target application, and present the generated image information.
  • the first sub-application run by the first terminal can obtain the graphics instruction stream
  • the second sub-application run by the second terminal can realize the restoration of the graphics instruction stream, thereby ensuring that image information is delivered from the first terminal to the second terminal
  • the data volume of the instruction information transmitted between the first terminal and the second terminal is less than or equal to the data volume of the graphics instruction stream
  • the data volume of the graphics instruction stream is much smaller than the data volume of the image information
  • the data of the instruction information The amount is small, that is, the amount of data transmitted between the first terminal and the second terminal is small, and the transmission delay between the two is effectively reduced on the premise of ensuring the effect of image delivery.
  • the target application is a game application
  • the reduced transmission delay can improve the real-time performance of the game operation, thereby improving the game experience.
  • FIG. 11 is a schematic structural diagram of a data transmission device provided by another embodiment of the present application, and the data transmission device is applied to a second terminal.
  • the data transmission device 400 includes:
  • the receiving module 401 is configured to receive instruction information sent by the first terminal, the instruction information is used to instruct the first terminal to generate a graphics instruction stream through the first sub-application, and the data amount of the instruction information is less than or equal to the data amount of the graphics instruction stream,
  • the first sub-application is a sub-application that can run independently in the target application
  • the second sub-application is a sub-application that can run independently in the target application
  • the second sub-application is different from the first sub-application .
  • the obtaining module 402 is configured to obtain the graphics instruction stream based on the instruction information through the second sub-application running in the second terminal.
  • the generating module 403 is configured to generate image information based on the obtained graphic instruction stream through the second sub-application.
  • the graphics instruction stream includes at least one graphics instruction
  • the instruction information includes at least one sub-indication information
  • each sub-indication information includes: second resource information and/or first information index.
  • the obtaining module 402 is configured to:
  • the graphics instruction stream includes at least one graphics instruction corresponding to at least one sub-indication information.
  • the graphics instruction corresponding to any sub-indication information includes first resource information
  • One resource information is the resource information obtained by using the first information index in any sub-indication information to query the correspondence between the resource information and the information index, and the resource information is the information of the resource used to draw the drawing target in the image frame ;
  • the graphics instruction corresponding to the any sub-indication information includes the second resource information, and the data amount of the first resource information is greater than the data amount of the second resource information.
  • the graphics instruction further includes the name of the API calling function, and each sub-indication information further includes: the first function index.
  • the obtaining module 402 is used to:
  • the first function index in each sub-indicator information is used to query the correspondence between the calling function name and the function index, and the name of the API calling function corresponding to the first function index is obtained. Based on the name of the API call function corresponding to each sub-instruction information in the at least one sub-indication information, generate at least one corresponding graphic instruction, and each graphic instruction includes the name of the API call function in the corresponding sub-instruction information.
  • the receiving module 401 is configured to: receive the instruction information sent by the first terminal through the data receiving thread, and write the instruction information into the data queue.
  • the indication information is obtained from the data queue through the data reading thread; wherein, the data receiving thread and the data reading thread run in parallel.
  • the instruction information sent by the first terminal is received through the receiving module.
  • the indication information is used to indicate the graphic instruction stream generated by the first terminal through the first sub-application, and the data amount of the indication information is less than or equal to the data amount of the graphic instruction stream.
  • the acquiring module acquires the graphics instruction stream based on the instruction information through the second sub-application.
  • the generating module generates image information based on the obtained graphics instruction stream through the second sub-application.
  • the first sub-application run by the first terminal can obtain the graphics instruction stream
  • the second sub-application run by the second terminal can realize the restoration of the graphics instruction stream, thereby ensuring that image information is delivered from the first terminal to the second terminal
  • the data volume of the instruction information transmitted between the first terminal and the second terminal is less than or equal to the data volume of the graphics instruction stream
  • the data volume of the graphics instruction stream is much smaller than the data volume of the image information
  • the data of the instruction information The amount is small, that is, the amount of data transmitted between the first terminal and the second terminal is small, thereby effectively reducing the transmission delay between the two on the premise of ensuring the effect of image delivery.
  • the target application is a game application
  • the reduced transmission delay can improve the real-time performance of the game operation, thereby improving the game experience.
  • FIG. 12 shows a schematic structural diagram of an electronic device 500 involved in the data transmission method.
  • the electronic device 500 may be the aforementioned first terminal or the second terminal.
  • the electronic device 500 can be, but is not limited to, a laptop computer, a desktop computer, a mobile phone, a smart phone, a tablet computer, a multimedia player, an e-reader, a smart car device, a smart home appliance, an artificial intelligence device, a wearable device, a thing Networked equipment, or virtual reality/augmented reality/mixed reality equipment, etc.
  • the electronic device 500 may include a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (USB) interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1, and an antenna 2.
  • Mobile communication module 550 wireless communication module 560, audio module 570, speaker 570A, receiver 570B, microphone 570C, earphone interface 570D, sensor module 580, buttons 590, motor 591, indicator 592, camera 593, display 594, and Subscriber identification module (subscriber identification module, SIM) card interface 595, etc.
  • SIM Subscriber identification module
  • the sensor module 580 may include pressure sensor 580A, gyroscope sensor 580B, air pressure sensor 580C, magnetic sensor 580D, acceleration sensor 580E, distance sensor 580F, proximity light sensor 580G, fingerprint sensor 580H, temperature sensor 580J, touch sensor 580K, ambient light Sensor 580L, bone conduction sensor 580M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 500.
  • the electronic device 500 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 500.
  • the electronic device 500 may also adopt different interface connection modes (for example, bus connection modes) in the above-mentioned embodiments, or a combination of multiple interface connection modes.
  • the processor 510 may include one or more processing units, for example, a central processing unit (such as an application processor (application processor, AP)), a graphics processor GPU, and further, may also include a modem processor, and image signal processing units.
  • a central processing unit such as an application processor (application processor, AP)
  • a graphics processor GPU may also include a modem processor, and image signal processing units.
  • processor image signal processor, ISP
  • microcontroller unit microcontroller unit, MCU
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit, NPU
  • the different processing units may be independent devices or integrated in one or more processors.
  • a memory may also be provided in the processor 510 to store instructions and data.
  • the memory in the processor 510 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 510. If the processor 510 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 510 is reduced, and the efficiency of the system is improved.
  • the processor 510 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter/receiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 510 may include multiple sets of I2C buses.
  • the processor 510 may couple the touch sensor 580K, charger, flash, camera 593, etc., respectively through different I2C bus interfaces.
  • the processor 510 may couple the touch sensor 580K through an I2C interface, so that the processor 510 and the touch sensor 580K communicate through the I2C bus interface to implement the touch function of the electronic device 500.
  • the I2S interface can be used for audio communication.
  • the processor 510 may include multiple sets of I2S buses.
  • the processor 510 may be coupled with the audio module 570 through an I2S bus to implement communication between the processor 510 and the audio module 570.
  • the audio module 570 may transmit audio signals to the wireless communication module 560 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 570 and the wireless communication module 560 may be coupled through a PCM bus interface.
  • the audio module 570 may also transmit audio signals to the wireless communication module 560 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is usually used to connect the processor 510 and the wireless communication module 560.
  • the processor 510 communicates with the Bluetooth module in the wireless communication module 560 through the UART interface to realize the Bluetooth function.
  • the audio module 570 may transmit audio signals to the wireless communication module 560 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 510 with the display 594, camera 593 and other peripheral devices.
  • the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
  • the processor 510 and the camera 593 communicate through a CSI interface to implement the shooting function of the electronic device 500.
  • the processor 510 and the display screen 594 communicate through a DSI interface to realize the display function of the electronic device 500.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 510 with the camera 593, the display screen 594, the wireless communication module 560, the audio module 570, the sensor module 580, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 530 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 530 can be used to connect a charger to charge the electronic device 500, and can also be used to transfer data between the electronic device 500 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect other electronic devices, such as AR devices.
  • the charging management module 540 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 540 may receive the charging input of the wired charger through the USB interface 530.
  • the charging management module 540 may receive the wireless charging input through the wireless charging coil of the electronic device 500. While the charging management module 540 charges the battery 542, it can also supply power to the electronic device through the power management module 541.
  • the power management module 541 is used to connect the battery 542, the charging management module 540 and the processor 510.
  • the power management module 541 receives input from the battery 542 and/or the charging management module 540, and supplies power to the processor 510, the internal memory 521, the display screen 594, the camera 593, and the wireless communication module 560.
  • the power management module 541 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 541 may also be provided in the processor 510.
  • the power management module 541 and the charging management module 540 may also be provided in the same device.
  • the wireless communication function of the electronic device 500 can be implemented by the antenna 1, the antenna 2, the mobile communication module 550, the wireless communication module 560, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 500 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 550 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 500.
  • the mobile communication module 550 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 550 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 550 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 550 may be provided in the processor 510.
  • at least part of the functional modules of the mobile communication module 550 and at least part of the modules of the processor 510 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 570A, the receiver 570B, etc.), or displays an image or video through the display screen 594.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 510 and be provided in the same device as the mobile communication module 550 or other functional modules.
  • the wireless communication module 560 can provide applications on the electronic device 500, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 560 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 560 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 510.
  • the wireless communication module 560 can also receive the signal to be sent from the processor 510, perform frequency modulation, amplify it, and convert it into electromagnetic waves through the antenna 2 and radiate it out.
  • the antenna 1 of the electronic device 500 is coupled with the mobile communication module 550, and the antenna 2 is coupled with the wireless communication module 560, so that the electronic device 500 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 500 implements a display function through a GPU, a display screen 594, and an application processor.
  • the GPU is a microprocessor for image processing, connected to the display 594 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 510 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 594 is used to display images, videos, etc.
  • the display screen 594 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 500 may include one or N display screens 594, and N is a positive integer greater than one.
  • the screen size of the display screen 594 is smaller than the screen size of the display screen of the second terminal; when the electronic device 500 is the second terminal, the screen size of the display screen 594 is It is larger than the screen size of the display screen of the first terminal.
  • the electronic device 500 can implement a shooting function through an ISP, a camera 593, a video codec, a GPU, a display screen 594, and an application processor.
  • the ISP is used to process the data fed back from the camera 593. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 593.
  • the camera 593 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 500 may include 1 or N cameras 593, and N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 500 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 500 may support one or more video codecs. In this way, the electronic device 500 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the electronic device 500 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 520 may be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 500.
  • the external memory card communicates with the processor 510 through the external memory interface 520 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 521 may be used to store computer executable program code, where the executable program code includes instructions.
  • the internal memory 521 may include a program storage area and a data storage area.
  • the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 500.
  • the internal memory 521 may include a high-speed random access memory, such as a double data rate synchronous dynamic random access memory (DDR), and may also include a non-volatile memory, such as at least one disk storage device, Flash memory devices, universal flash storage (UFS), etc.
  • the processor 510 executes various functional applications and data processing of the electronic device 500 by running instructions stored in the internal memory 521 and/or instructions stored in a memory provided in the processor.
  • the electronic device 500 can implement audio functions through the audio module 570, the speaker 570A, the receiver 570B, the microphone 570C, the earphone interface 570D, and the application processor. For example, music playback, recording, etc.
  • the audio module 570 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 570 can also be used to encode and decode audio signals.
  • the audio module 570 may be provided in the processor 510, or part of the functional modules of the audio module 570 may be provided in the processor 510.
  • the speaker 570A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 500 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 570B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device 500 answers a call or voice message, it can receive the voice by bringing the receiver 570B close to the human ear.
  • Microphone 570C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 570C through the mouth, and input the sound signal into the microphone 570C.
  • the electronic device 500 may be provided with at least one microphone 570C. In other embodiments, the electronic device 500 may be provided with two microphones 570C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 500 may also be provided with three, four or more microphones 570C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 570D is used to connect wired earphones.
  • the earphone interface 570D may be a USB interface 530, or a 3.5 mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association
  • the pressure sensor 580A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 580A may be provided on the display screen 594.
  • the capacitive pressure sensor may include at least two parallel plates with conductive materials.
  • the electronic device 500 may also calculate the touched position according to the detection signal of the pressure sensor 580A.
  • touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 580B may be used to determine the movement posture of the electronic device 500.
  • the angular velocity of the electronic device 500 around three axes ie, x, y, and z axes
  • the gyroscope sensor 580B can be used for shooting anti-shake.
  • the gyroscope sensor 580B detects the shake angle of the electronic device 500, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 500 through reverse movement to achieve anti-shake.
  • the gyroscope sensor 580B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 580C is used to measure air pressure.
  • the electronic device 500 calculates the altitude based on the air pressure value measured by the air pressure sensor 580C to assist positioning and navigation.
  • the magnetic sensor 580D includes a Hall sensor.
  • the electronic device 500 can use the magnetic sensor 580D to detect the opening and closing of the flip holster.
  • the electronic device 500 when the electronic device 500 is a flip machine, the electronic device 500 can detect the opening and closing of the flip according to the magnetic sensor 580D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 580E can detect the magnitude of the acceleration of the electronic device 500 in various directions (generally three axes). When the electronic device 500 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 500 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 500 may use the distance sensor 580F to measure the distance to achieve fast focusing.
  • the proximity light sensor 580G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 500 emits infrared light to the outside through the light emitting diode.
  • the electronic device 500 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 500. When insufficient reflected light is detected, the electronic device 500 can determine that there is no object near the electronic device 500.
  • the electronic device 500 can use the proximity light sensor 580G to detect that the user holds the electronic device 500 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 580G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 580L is used to sense the brightness of the ambient light.
  • the electronic device 500 can adaptively adjust the brightness of the display screen 594 according to the perceived brightness of the ambient light.
  • the ambient light sensor 580L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 580L can also cooperate with the proximity light sensor 580G to detect whether the electronic device 500 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 580H is used to collect fingerprints.
  • the electronic device 500 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 580J is used to detect temperature.
  • the electronic device 500 uses the temperature detected by the temperature sensor 580J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 580J exceeds a threshold, the electronic device 500 performs a reduction in the performance of the processor located near the temperature sensor 580J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 500 when the temperature is lower than another threshold, the electronic device 500 heats the battery 542 to avoid abnormal shutdown of the electronic device 500 due to low temperature.
  • the electronic device 500 boosts the output voltage of the battery 542 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 580K also called “touch device”.
  • the touch sensor 580K can be arranged on the display screen 594, and the touch screen is composed of the touch sensor 580K and the display screen 594, which is also called a “touch screen”.
  • the touch sensor 580K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 594.
  • the touch sensor 580K may also be disposed on the surface of the electronic device 500, which is different from the position of the display screen 594.
  • the bone conduction sensor 580M can acquire vibration signals.
  • the bone conduction sensor 580M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 580M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 580M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 570 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 580M, and realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 580M, and realize the heart rate detection function.
  • the electronic device 500 may also use different interface connection modes in the above embodiments. For example, some or all of the above multiple sensors are connected to the MCU, and then the AP is connected through the MCU.
  • the button 590 includes a power button, a volume button, and so on.
  • the button 590 may be a mechanical button. It can also be a touch button.
  • the electronic device 500 may receive key input, and generate key signal input related to user settings and function control of the electronic device 500.
  • the motor 591 can generate vibration prompts.
  • the motor 591 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 594, the motor 591 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 592 can be an indicator light, which can be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 595 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 595 or pulled out from the SIM card interface 595 to achieve contact and separation with the electronic device 500.
  • the electronic device 500 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 595 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 595 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 595 can also be compatible with different types of SIM cards.
  • the SIM card interface 595 can also be compatible with external memory cards.
  • the electronic device 500 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 500 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 500 and cannot be separated from the electronic device 500.
  • the software system of the electronic device 500 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 500 by way of example.
  • the embodiment of the present application also provides a storage medium.
  • the storage medium stores instructions. When the instructions are executed by the first terminal, the steps performed by the first terminal as related to the foregoing method embodiments are implemented; or, when the instructions are executed by the second terminal, the steps are implemented as related to the foregoing method embodiments. The steps performed by the second terminal.
  • the storage medium may include: read-only memory (ROM) or random access memory (RAM), magnetic disks or optical disks, and other media that can store program codes.
  • the program can be stored in a computer-readable storage medium.
  • the storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种数据传输方法、装置及数据处理系统,属于图像处理领域。所述方法包括:第一终端通过第一终端中运行的第一子应用程序生成图形指令流,该第一子应用程序为可拆分的目标应用程序中可独立运行的一个子应用程序。第一终端基于图形指令流生成指示信息,指示信息用于指示图形指令流,指示信息的数据量小于或等于图形指令流的数据量。第一终端向运行有第二子应用程序的第二终端发送生成的指示信息。本申请降低了第一终端和第二终端之间传输的数据的数据量,降低了二者之间传输延时。

Description

数据传输方法、装置及数据处理系统、存储介质
本申请要求于2020年1月10日提交的申请号为202010027733.X、发明名称为“数据传输方法、装置及数据处理系统、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理领域,特别涉及一种数据传输方法、装置及数据处理系统、存储介质。
背景技术
随着手机游戏(简称手游)的兴起,用户越来越多地开始关注游戏体验。而手机屏幕尺寸的局限性已经影响到手游的视觉体验,因此,用户开始将手游的用户界面投放至诸如电视等具有较大显示尺寸的显示设备上,以获取较大的游戏视野,提高手游的视觉体验。
其中,手机和显示设备之间通常采用无线网络连接,目前手机将手游的用户界面投放至显示设备的方法为:手机在接收到用户的操作指令后,生成图形指令流,并将根据图形指令流生成的图像信息(一个或多个该图像信息组成图像数据流)发送至显示设备,该显示设备呈现接收到的图像信息。
但是,由于手机和显示设备之间传输的图像信息的数据量较大,因此容易造成较高的传输延时。
发明内容
本申请提供了一种数据传输方法、装置及数据处理系统、存储介质,可以解决两个电子设备之间传输延时较高的问题。
第一方面,提供了一种数据传输方法。第一终端通过第一终端中运行的第一子应用程序生成图形指令流,第一子应用程序为可拆分的目标应用程序中可独立运行的一个子应用程序。第一终端基于图形指令流生成指示信息,指示信息用于指示图形指令流,指示信息的数据量小于或等于图形指令流的数据量。第一终端向运行有第二子应用程序的第二终端发送生成的指示信息,以供第二终端通过第二子应用程序,基于指示信息获取图形指令流,并生成图像信息,第二子应用程序为目标应用程序中可独立运行的一个子应用程序,第二子应用程序与第一子应用程序不同。
本申请中,基于第一终端中运行的目标应用程序的第一子应用程序生成的图形指令流,生成指示信息,该指示信息的数据量小于或等于图形指令流的数据量。并向运行有第二子应用程序的第二终端发送生成的指示信息,以供第二终端通过目标应用程序的第二子应用程序,基于接收的指示信息获取图形指令流,呈现生成的图像信息。由于第一终端运行的第一子应用程序能够获取图形指令流,而第二终端运行的第二子应用程序能够实现图形指令流的恢复,从而保证图像信息由第一终端投放至第二终端,并且由于第一终端和第二终端之间传输的指 示信息的数据量小于图像信息的数据量,因此第一终端和第二终端之间传输的数据量较小,在保证图像投放效果的前提下,有效降低了二者之间传输延时。
可选地,图形指令流包括至少一个图形指令(又称图像指令)。其中,图形指令包括第一资源信息和/或第二资源信息,所述资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息,第一资源信息的数据量大于第二资源信息的数据量。第一终端基于图形指令流生成指示信息的过程包括:
第一终端检测该至少一个图形指令中的内容。第一终端基于检测结果生成指示信息,该指示信息包括与至少一个图形指令一一对应的至少一个子指示信息。其中,当任一图形指令包括第一资源信息,与该任一图形指令对应的子指示信息包括第一信息索引,第一信息索引为采用任一图形指令中的第一资源信息查询资源信息与信息索引的对应关系,得到的信息索引;当任一图形指令包括第二资源信息,与该任一图形指令对应的子指示信息包括第二资源信息。
需要说明的是,当任一图形指令包括第一资源信息和第二资源信息的时候,子指示信息既包括所述第一信息索引,也包括所述第二资源信息。既前述两个条件可以同时满足。
由于第一终端将图形指令中所携带的资源信息划分为数据量大小不同的两部分(即第一资源信息和第二资源信息),并将较大的部分(即第一资源信息)采用资源索引表征,相当于进行了数据的压缩,从而有效减少子指示信息的数据量,提高数据传输效率。
本申请实际实现时,图形指令还包括应用程序编程接口(application programming interface,API)调用函数的名称。第一终端基于检测结果生成指示信息可以有两种生成方式。
在第一种可选的方式中,指示信息中携带有API调用函数的名称,则前述第一终端基于检测结果生成指示信息的过程包括:
第一终端API调用函数的名称生成指示信息,该指示信息包括与至少一个图形指令一一对应的至少一个子指示信息,每个子指示信息包括API调用函数的名称。
在第二种可选的方式中,指示信息中携带有API调用函数的函数索引,则前述第一终端基于检测结果生成指示信息的过程包括:
第一终端采用每个图形指令中的API调用函数的名称查询调用函数名称与函数索引的对应关系,得到API调用函数的名称对应的第一函数索引。第一终端基于查询得到的第一函数索引,生成指示信息。该指示信息包括的每个子指示信息包括对应的图形指令的第一函数索引。
由于API调用函数的名称通常比较复杂,第二种可选的方式中,第一终端将API调用函数的名称采用函数索引表征,相当于进行了数据的压缩,从而有效减少子指示信息的数据量,提高数据传输效率。
可选地,本申请实施例提供的数据处理系统中可以分别处于以下两种情况。
第一种情况:该第一终端仅支持拆分运行模式,该拆分运行模式指的是第一终端与第二终端相互配合以呈现图像信息的模式,在该模式下,第一终端只能通过第二终端呈现图像信息,自身无法进行图像信息的呈现。例如,第一终端安装有第一子应用程序,第二终端安装有第二子应用程序。在第一终端运行的第一子应用程序,与第二终端运行的第二子应用程序的配合下,使得第二终端的第二子应用程序呈现生成的图像信息。
第二种情况:该第一终端可以不仅支持上述拆分运行模式,也支持合并运行模式。其中, 合并运行模式指的是第一终端能够独立呈现图像信息的模式。例如,第一终端安装有第一子应用程序和第三子应用程序。在第一终端运行该第一子应用程序和第三子应用程序时,使得第一终端可以生成图形指令流,以基于该图形指令流生成图像信息,并呈现该图像信息。其中,第一终端可以同时处于拆分运行模式和合并运行模式(也即是两个模式在执行时段上重叠),也可以分时段处于拆分运行模式和合并运行模式(也即是两个模式在执行时段上不重叠)。
在该第二种情况中,在上述基于图形指令流生成指示信息之前,当检测到第一子应用程序处于合并运行模式,第一终端还可以通过第一子应用程序向第一终端中运行的第三子应用程序发送图形指令流,第三子应用程序为目标应用程序中可独立运行的一个子应用程序,第三子应用程序与第一子应用程序不同。第一终端通过第三子应用程序,基于图形指令流,生成图像信息。
并且,上述第一终端基于图形指令流生成指示信息的过程包括:当检测到第一子应用程序处于拆分运行模式,第一终端基于图形指令流生成指示信息。
若第一终端同时处于拆分运行模式和合并运行模式,在第一终端运行第一子应用程序后,既可以在第二终端运行第二子应用程序的配合下,使得第二终端呈现生成的图像信息,还可以在第一终端运行第三子应用程序,使得第一终端呈现相同的图像信息。如此可以有效提高用户体验。
在本申请中,第一终端在通过第一子应用程序接收到拆分运行指令后,确定第一子应用程序处于拆分运行模式,或者,第一终端在检测到第一终端中仅安装有目标应用程序的第一子应用程序后,确定第一子应用程序处于拆分运行模式,或者,第一终端在检测到第一终端中的第一子应用程序与第二终端中第二子应用程序的连接建立成功后,确定第一子应用程序处于拆分运行模式。
第一终端在通过第一子应用程序接收到合并运行指令后,确定第一子应用程序处于合并运行模式,或者,第一终端在检测到第一终端中的第一子应用程序与第二终端中第二子应用程序的连接建立失败,且检测到第一终端中安装有第三子应用程序后,确定第一子应用程序处于合并运行模式。
可选地,第一终端向运行有第二子应用程序的第二终端发送生成的指示信息的过程包括:
第一终端通过数据写入线程将生成的指示信息写入数据队列。第一终端通过数据发送线程从数据队列中获取指示信息,并将获取的指示信息发送至运行有第二子应用程序的第二终端;其中,该数据写入线程和该数据发送线程并行运行。
通过设置数据写入线程和数据发送线程,在两个线程并行执行时,可以实现数据写入和发送的并行执行,提高第一终端和第二终端之间的数据处理效率。
第二方面,提供了一种数据传输方法。第二终端接收第一终端发送的指示信息,指示信息用于指示第一终端通过第一子应用程序生成的图形指令流,指示信息的数据量小于或等于图形指令流的数据量,第一子应用程序为目标应用程序中可独立运行的一个子应用程序,第二子应用程序为目标应用程序中可独立运行的一个子应用程序,第二子应用程序与第一子应用程序不同。第二终端通过第二终端中运行的第二子应用程序,基于指示信息获取图形指令流。第二终端通过第二子应用程序,基于获取的图形指令流,生成图像信息。
本申请中,通过接收第一终端发送的指示信息。该指示信息用于指示第一终端通过第一子应用程序生成的图形指令流,且该指示信息的数据量小于或等于图形指令流的数据量。通 过第二子应用程序基于指示信息获取图形指令流。通过第二子应用程序基于获取的图形指令流生成图像信息。由于第一终端运行的第一子应用程序能够获取图形指令流,而第二终端运行的第二子应用程序能够实现图形指令流的恢复,从而保证图像信息由第一终端投放至第二终端,并且由于第一终端和第二终端之间传输的指示信息的数据量小于图像信息的数据量,因此第一终端和第二终端之间传输的数据量较小,在保证图像投放效果的前提下,有效降低了二者之间传输延时。
可选地,图形指令流包括至少一个图形指令。指示信息包括至少一个子指示信息,每个子指示信息包括:第二资源信息和/或第一信息索引。第二终端基于指示信息获取图形指令流的过程包括:
第二终端检测子指示信息中的内容。第二终端基于检测结果,生成图形指令流。其中,图形指令流包括与至少一个子指示信息一一对应的至少一个图形指令,当任一子指示信息包括第一信息索引,与任一子指示信息对应的图形指令包括第一资源信息,第一资源信息为采用该任一子指示信息中的第一信息索引查询资源信息与信息索引的对应关系,得到的资源信息,该资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息。当该任一子指示信息包括第二资源信息,与该任一子指示信息对应的图形指令包括第二资源信息,第一资源信息的数据量大于第二资源信息的数据量。
由于第一终端将图形指令中所携带的资源信息划分为数据量大小不同的两部分(即第一资源信息和第二资源信息),并将较大的部分(即第一资源信息)采用资源索引表征,相当于进行了数据的压缩,从而有效减少子指示信息的数据量,提高数据传输效率。
本申请实际实现时,图形指令还包括API调用函数的名称。每个子指示信息还包括:第一函数索引。第二终端基于检测结果,生成图形指令流的生成方式有两种。
第一种可选的方式,每个子指示信息还包括:API调用函数的名称,则第二终端基于检测结果生成图形指令流的过程包括:
第二终端基于至少一个子指示信息中每个子指示信息对应的API调用函数的名称,生成对应的至少一个图形指令,每个图形指令包括与对应的子指示信息中的API调用函数的名称。
第二种可选的方式,每个子指示信息还包括:第一函数索引,则第二终端基于检测结果,生成图形指令流,包括:
第二终端采用每个子指示信息中的第一函数索引查询调用函数名称与函数索引的对应关系,得到第一函数索引对应的API调用函数的名称。第二终端基于至少一个子指示信息中每个子指示信息对应的API调用函数的名称,生成对应的至少一个图形指令,每个图形指令包括与对应的子指示信息中的API调用函数的名称。
由于API调用函数的名称通常比较复杂,第二种可选的方式中,第一终端将API调用函数的名称采用函数索引表征,相当于进行了数据的压缩,从而有效减少子指示信息的数据量,提高数据传输效率。
可选地,第二终端接收第一终端发送的指示信息的过程包括:第二终端通过数据接收线程接收第一终端发送的指示信息,并将指示信息写入数据队列。第二终端通过数据读出线程从数据队列获取指示信息。
可选地,所述数据接收线程和所述数据读出线程并行运行,通过设置数据接收线程和渲染线程,在两个线程并行执行时,可以实现数据接收和渲染的并行执行,提高第一终端和第 二终端之间的数据处理效率。
第三方面,提供了一种数据传输装置。所述装置包括多个功能模块,所述多个功能模块相互作用,实现上述第一方面及其各实施方式中的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
第四方面,提供了一种数据传输装置。所述装置包括多个功能模块,所述多个功能模块相互作用,实现上述第二方面及其各实施方式中的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
第五方面,提供了一种数据传输装置,所述装置包括:处理器和存储器;所述存储器,用于存储计算机程序,所述计算机程序包括程序指令;所述处理器,用于调用所述计算机程序,实现如第一方面任一所述的数据传输方法。
第六方面,提供了一种数据传输装置,所述装置包括:处理器和存储器;所述存储器,用于存储计算机程序,所述计算机程序包括程序指令;所述处理器,用于调用所述计算机程序,实现如第二方面任一所述的数据传输方法。
第七方面,提供了一种数据处理系统,该数据处理系统包括第一终端和第二终端,该第一终端包括如上述第三方面或第五方面任一所述的数据传输装置,所述第二终端包括如上述第四方面或第六方面任一所述的数据传输装置。
可选地,该数据处理系统还包括服务器。
第八方面,提供了一种存储介质,计算机存储介质上存储有指令,当指令被第一终端执行时,实现如第一方法任一的数据传输方法;或者,当指令被第二终端执行时,实现如第二方面任一的数据传输方法。
第九方面,本申请实施例提供了一种包含计算机可读指令的计算机程序或计算机程序产品,当计算机程序或计算机程序产品在计算机上运行时,使得计算机执行前述第一方面或第二方面任意一种图像传输方法。该计算机程序产品中可以包括一个或多个程序单元,用于实现前述方法。
第十方面,本申请提供了一种芯片,例如中央处理器(central processing unit,CPU)或图形处理器(Graphics Processing Unit,GPU)。所述芯片包括逻辑电路,所述逻辑电路可以为可编程逻辑电路。当所述芯片运行时用于实现前述第一方面或第二方面任意一种图像传输方法。
第十一方面,本申请提供了一种芯片,例如CPU或GPU。所述芯片包括一个或多个物理核、以及存储介质,所述一个或多个物理核在读取所述存储介质中的计算机指令后实现前述第一方面或第二方面任意一种图像传输方法。
本申请提供的技术方案带来的有益效果至少包括:
本申请中,基于第一终端中运行的目标应用程序的第一子应用程序生成的图形指令流,生成指示信息,该指示信息的数据量小于或等于图形指令流的数据量。并向运行有第二子应用程序的第二终端发送生成的指示信息,以供第二终端通过目标应用程序的第二子应用程序,基于接收的指示信息获取图形指令流,呈现生成的图像信息。由于图形指令流为目标应用程序内部的指令流,第一终端运行的第一子应用程序能够获取图形指令流,而第二终端运行的第二子应用程序能够实现图形指令流的恢复,从而保证图像信息由第一终端投放至第二终端,并且由于第一终端和第二终端之间传输的指示信息的数据量小于或等于图形指令流的数据量, 而图形指令流的数据量远远小于图像信息的数据量(两者通常不在同一个数量级),因此,指示信息的数据量较小,即第一终端和第二终端之间传输的数据量较小,从而在保证图像投放效果的前提下,有效降低了二者之间传输延时。
附图说明
图1是本申请实施例提供的一种数据处理系统的结构示意图;
图2是本申请实施例提供的一种数据传输方法的流程示意图;
图3是本申请实施例提供的一种第一终端和第二终端在数据传输过程中所涉及的模块的框图;
图4是本申请实施例提供的一种通信信息的结构示意图;
图5是本申请实施例提供的一种第一终端向第二终端发送指示信息的过程示意图;
图6是本申请实施例提供的一种数据传输方法的过程示意图;
图7是本申请实施例提供的一种数据处理系统的显示状态示意图;
图8是本申请实施例提供的一种数据传输装置的结构示意图;
图9是本申请实施例提供的另一种数据传输装置的结构示意图;
图10是本申请实施例提供的又一种数据传输装置的结构示意图;
图11是本申请另一实施例提供的一种数据传输装置的结构示意图;
图12是本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
为便于理解,下面先对本申请实施例中涉及的名词进行解释。
图形指令流(graphic command stream)(或称图像指令流):用于生成图像信息的指令的集合。图形指令流包含一个或多个图形指令(又称图像指令),终端中的图形处理器(Graphics Processing Unit,GPU)可以通过运行图形指令流中的图形指令得到图像信息,以供显示器呈现该图像信息。通常,一帧图像是基于一个或多个图形指令流绘制而成。
多媒体信息包括音频信息、文本信息和/或图像信息。
图形指令:包括绘制指令、查询指令和/或坐标变化指令等。该图形指令为用于绘制(也称生成)绘制目标的指令,例如开放图形库(open graphics library,OpenGL)的绘制调用(draw call)(即中央处理器(central processing unit,CPU)对底层图形绘制接口的调用命令)。GPU通过运行图形指令可以生成满足要求的绘制目标。可选地,图形指令可以包括应用程序接口(application programming interface,API)调用函数名称和资源信息。该API调用函数名称为用于绘制绘制目标所涉及的API调用函数的名称。资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息,例如前述API调用函数所调用的信息,如顶点的信息或索引值的信息。例如,图形指令包括的信息为glDrawElments(GLenum mode,GLsizei count,GLenum type,const void*indices),则图形指令包括API调用函数名称:glDrawElments和资源信息:GLenum mode、GLsizei count、GLenum type和const void*indices。其中,“GLenum mode”表示指定绘制图元的类型;“GLsizei count”表示以mode类型连接的顶点的总数;“GLenum type”表 示索引值的类型;“const void*indices”表示指向索引存贮位置的指针。
又例如,图形指令包括的信息为glBindFramebuffer(GLenum target,GLuint framebuffer),则图形指令包括API调用函数名称:glBindFramebuffer和资源信息:GLenum target和GLuint framebuffer。其中,“GLenum target”表示指定绑定操作的帧缓冲区目标;“GLuint framebuffer”表示指定要绑定的帧缓冲区对象的名称。
再例如,图形指令包括的信息为glBlendBarrier(void),则图形指令仅包括API调用函数名称:glBlendBarrier,并没有资源信息。
本申请中的“图形指令”可以是一条指令,例如一个API调用函数;也可以是多条指令的集合,例如在openGL中,一个draw call通常包含多个API调用函数,这一个draw call可以认为是一个图形指令,完成一次绘制。一个draw call可以绘制一个绘制目标,也可以多个draw call绘制一个绘制目标或一个draw call绘制多个绘制目标。本申请对如何划分绘制目标不做限定,例如,可以将待绘制的一个房子确定为一个不可分的绘制目标,或者,将待绘制的一个房子划分为房顶和墙这两个绘制目标。
请参考图1,其示出了本申请实施例提供的一种数据传输方法所涉及的数据处理系统的结构示意图。该数据处理系统100包括第一终端101、第二终端102和服务器103。该第一终端101与第二终端102通过网络连接,服务器103分别与第一终端101与第二终端102通过网络连接。该网络可以是有线网络或者无线网络。第二终端102的屏幕通常大于第一终端101的屏幕,从而可以实现第一终端在第二终端上的投屏功能。示例地,该第一终端101可以是手机,第二终端102可以是电视等具有较大屏幕的电子设备,服务器103可以一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算服务中心。
本申请实施例还提供了一种目标应用程序(application,APP),该目标应用程序可以在运行时基于图形指令流生成图像信息,以使得运行该目标应用程序的终端呈现该图像信息。其中,目标应用程序为可拆分的应用程序,其可以包括(即可以拆分为)可独立运行的第一子应用程序和可独立运行的第二子应用程序,第二子应用程序与第一子应用程序不同。该第一子应用程序用于在运行时生成图形指令流的指示信息。第二子应用程序用于基于该图像指令流的指示信息生成图像信息。示例的,该第一子应用程序可以安装于第一终端101上,第二子应用程序可以安装于第二终端102上。第一子应用程序和第二子应用程序通过配合,可以实现第一终端中的图形指令流所对应的图像信息呈现在第二终端上。
可选地,第一终端101中还可以安装第三子应用程序,该第三子应用程序为目标应用程序中可独立运行的一个子应用程序,第三子应用程序与第一子应用程序不同。该第三子应用程序的功能可以与第二子应用程序的功能相同或类似,第三子应用程序也可以基于图像指令流的指示信息生成图像信息。在一种可选情况下,第二子应用程序和第三子应用程序对应相同的安装包,第一终端和第二终端可以在同一服务器中下载并安装该安装包,以分别得到第二子应用程序和第三子应用程序,如此,两者可以视为相同的子应用程序,区别仅在于安装在不同的终端上;在另一种可选情况下,第二子应用程序和第三子应用程序对应不同的安装包,其中,第二子应用程序对应的第二安装包是针对第二终端所属类型(例如,屏幕的尺寸大于指定尺寸阈值)的终端提供的安装包,第三子应用程序对应的第三安装包是针对第一终端所属类型(例如,屏幕的尺寸小于指定尺寸阈值)的终端提供的安装包,则第一终端可以 在服务器中下载并安装第三安装包,第二终端可以在服务器中下载并安装第二安装包,以分别得到第二子应用程序和第三子应用程序,如此,两者可以视为不同的子应用程序。
示例地,该目标应用程序可以是游戏应用程序、读书应用程序(或称阅读应用程序)或者视频应用程序等。当目标应用程序为游戏应用程序时,第一子应用程序可以称为逻辑游戏应用程序,主要用于游戏的逻辑管理,第二子应用程序和第三子应用程序可以称为资源游戏应用程序,主要用于游戏资源的获取和渲染。第一子应用程序可以包括游戏逻辑模块、物理模块、用户界面模块、渲染模块、网络模块、输入与输出处理模块、以及游戏登录与更新模块等。第二子应用程序可以包括渲染资源信息包等。
基于上述情况,本申请实施例提供的数据处理系统中可以分别处于以下两种情况。
第一种情况:该第一终端101仅支持拆分运行模式,该拆分运行模式指的是第一终端101与第二终端102相互配合以呈现图像信息的模式,在该模式下,第一终端只能通过第二终端呈现图像信息,自身无法进行图像信息的呈现。例如,第一终端101安装有第一子应用程序,第二终端102安装有第二子应用程序。在第一终端101运行的第一子应用程序,与第二终端运行的第二子应用程序的配合下,使得第二终端的第二子应用程序呈现生成的图像信息。
第二种情况:该第一终端101可以不仅支持上述拆分运行模式,也支持合并运行模式。其中,合并运行模式指的是第一终端101能够独立呈现图像信息的模式。例如,第一终端101安装有第一子应用程序和第三子应用程序。在第一终端101运行该第一子应用程序和第三子应用程序时,使得第一终端可以生成图形指令流,以基于该图形指令流生成图像信息,并呈现该图像信息。其中,第一终端可以同时处于拆分运行模式和合并运行模式(也即是两个模式在执行时段上重叠),也可以分时段处于拆分运行模式和合并运行模式(也即是两个模式在执行时段上不重叠)。本申请实施例中,将第一终端可以同时处于拆分运行模式和合并运行模式的状态称为兼容运行状态,将第一终端可以分时段处于拆分运行模式和合并运行模式的状态称为非兼容运行状态。当第一终端处于兼容运行状态时,若第一终端同时处于拆分运行模式和合并运行模式,第一终端101和第二终端102能够呈现相同的图像信息。当第一终端处于非兼容运行状态时,若第一终端101在呈现图像信息(即第一终端单独执行合并运行模式)时,第二终端102不执行相关动作;第二终端102在呈现图像信息(即第一终端单独执行拆分运行模式)时,第一终端101不执行相关动作。
以第一终端处于兼容运行状态为例,第一终端101安装有第一子应用程序和第三子应用程序,第二终端102安装有第二子应用程序。在第一终端101运行第一子应用程序后,既可以在第二终端102运行第二子应用程序的配合下,使得第二终端102呈现生成的图像信息,还可以在第一终端101运行第三子应用程序,使得第一终端101呈现相同的图像信息。如此可以有效提高用户体验。
值得说明的是,前述第一终端的兼容运行状态和非兼容运行状态可以由用户设置,第一终端可以在用户控制下进行状态切换,本申请实施例对此不做限定。
本申请实施例中,若数据处理系统处于为第二种情况下的数据处理系统,第一终端101可以支持拆分运行模式和合并运行模式这两种模式。
则第一终端101确定第一子应用程序处于拆分运行模式的过程可以为:
第一终端101可以在通过该第一终端101运行的第一子应用程序接收到拆分运行指令后,确定第一子应用程序处于拆分运行模式。或者,第一终端101也可以在检测到第一终端中仅 安装有目标应用程序的第一子应用程序后,确定第一子应用程序处于拆分运行模式。或者,第一终端101还可以在检测到第一终端中的第一子应用程序与第二终端中第二子应用程序的连接建立成功后,确定第一子应用程序处于拆分运行模式。
第一终端101确定第一子应用程序处于合并运行模式的过程可以为:
第一终端101可以在通过第一子应用程序接收到合并运行指令后,确定第一子应用程序处于合并运行模式。或者,第一终端101还可以在检测到第一终端中的第一子应用程序与第二终端中第二子应用程序的连接建立失败,且检测到第一终端中安装有第三子应用程序后,确定第一子应用程序处于合并运行模式。
本申请实施例提供了一种数据传输方法,该数据传输方法应用于数据处理系统。如前述实施例,数据处理系统可以处于第一种情况或第二种情况,下述实施例以该数据处理系统处于第二种情况为例进行说明,如图2所示,该方法包括:
步骤201、第一终端通过该第一终端中运行的第一子应用程序生成图形指令流。
第一终端运行第一子应用程序后,若用户对第一子应用程序进行操作,则第一子应用程序相应生成图形指令流。其中,图形指令流可以包括多种图形指令,例如,该图形指令可以为绘制位置图标指令。
第一终端通过第一子应用程序生成图形指令流的生成方式有多种,本申请实施例以第一终端的用户通过对第一终端的触摸屏的触发操作生成图形指令流的过程为例进行说明。如图3所示,其示出了第一终端和第二终端在数据传输过程中所涉及的模块的框图。可选的,第一终端包括事件监听模块、事件读取模块和感知计算模块。第一终端的用户在触摸屏上进行点击或者滑动等触控操作后,事件监听模块监听到该触控操作,触发事件读取模块读取用户的操作姿态,将基于该操作姿态生成的对应数据发送至感知计算模块。该感知计算模块接收到该数据后,基于该数据反映的用户触摸的位置信息生成图形指令流。
步骤202、当检测到第一子应用程序处于拆分运行模式时,第一终端通过第一子应用程序基于图形指令流生成指示信息。
其中,该指示信息用于指示图形指令流,且该指示信息的数据量小于或等于图形指令流的数据量。上述第一终端通过第一子应用程序,基于图形指令流生成指示信息的实现方式包括但不仅限于以下两种实现方式。
第一种实现方式,图形指令中所携带的资源信息可以划分为数据量大小不同的两部分,以供后续处理。
示例的,该资源信息包括第一资源信息和/或第二资源信息。该资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息,第一资源信息的数据量大于第二资源信息的数据量,二者的数据量并非一个数量级,第一资源信息的数据量远大于第二资源信息的数据量。例如,第一资源信息的大小为4千字节(KB),第二资源信息的大小为8字节(B)。第一资源信息和第二资源信息可以有多种确定方式。在一种可选示例中,可以通过预先设置的数据量阈值,在资源信息中确定第一资源信息和第二资源信息。其中,第一资源信息的数据量大于该数据量阈值,第二资源信息的数据量小于该数据量阈值;在二种可选示例中,第一资源信息和第二资源信息所对应的参数为固定参数,也即是,图形指令的资源信息对应的参数属于第一参数集的信息为第一资源信息,对应的参数属于第二参数集的信息为第二资源信息,其中,第 一参数集和第二参数集中的参数为预先确定的固定参数。可选地,第一参数集可以包括资源参数,该资源参数的参数长度通常不是固定值,也即是长度可变。示例地,该资源参数为指向资源信息的存储地址的指针参数,该指针参数的长度通常随着资源信息的存储地址的改变而改变。例如,资源参数为:const void*indices。第二参数集合可以包括非资源参数,该非资源参数的参数长度通常为固定值,所以也称为固定长度参数,且该固定长度的参数的数据量通常较小。例如,非资源参数为:GLenum mode、GLsizei count或GLenum type。
相应的,上述第一终端通过第一子应用程序,基于图形指令流生成指示信息的实现过程可以包括:
步骤A1、第一终端通过第一子应用程序,检测该至少一个图形指令中的内容。
第一终端通过第一子应用程序,检测图形指令中是否包括第一资源信息和第二资源信息。由于前述图形指令中的第一资源信息和第二资源信息的多种确定方式。对应的,第一终端通过第一子应用程序检测该至少一个图形指令中的内容的检测方式也可以有多种。在一种可选示例中,第一终端可以通过判断图形指令中的每个资源信息的数据量是否大于数据量阈值,确定图形指令中的内容是否包括第一资源信息和/或第二资源信息。在另一种可选示例中,第一终端通过第一子应用程序通过判断图形指令中的资源信息对应的参数是否属于第一参数集或第二参数集,确定图形指令中的内容是否包括第一资源信息和/或第二资源信息。
步骤A2、基于检测结果生成指示信息,该指示信息包括与至少一个图形指令一一对应的至少一个子指示信息。
其中,当任一图形指令包括第一资源信息,可以采用该任一图形指令中的第一资源信息查询资源信息与信息索引的对应关系,得到第一资源信息对应的第一信息索引。相应的,与任一图形指令对应的子指示信息包括第一信息索引;当任一图形指令包括第二资源信息,与该任一图形指令对应的子指示信息包括第二资源信息。
第一终端预先存储有前述资源信息和信息索引的对应关系(该对应关系通常是存储在第一子应用程序对应的第一安装包中,该第一安装包是通过服务器下载的。当该对应关系需要更新时,更新后的对应关系可以存储在第一终端通过服务器下载的更新后的第一安装包中;或者也可以通过第一子应用程序直接在对应的服务器中下载),该信息索引的数据量小于第一资源信息的数据量。示例地,资源信息与信息索引的对应关系可以以对应关系表的形式表征。例如下述表1,其包括第一资源信息1(res1)对应的信息索引1(res_index1),第一资源信息2(res2)对应的信息索引2(res_index2),以及第一资源信息3(res3)对应的信息索引3(res_index3)。由于第一资源信息内容通常较多,为了便于读者理解,表1中仅以示意性字符表示,表1中的字符并不代表实际的第一资源信息的内容。
表1
第一资源信息 信息索引
res1 res_index1
res2 res_index2
res3 res_index3
第一子应用程序可以遍历前述至少一个图形指令中的第一资源信息,以查询资源信息与信息索引的对应关系,从而得到每个第一资源信息对应的第一信息索引。示例地,假设目标图形指令为图形指令流包括的一个或多个图形指令中的任一图形指令,目标图形指令中的第 一资源信息为ses1,则第一终端通过第一子应用程序,采用res1查询该对应关系表,得到第一资源信息对应的信息索引:res_index1。
对于目标图形指令,假设第一终端通过第一子应用程序,检测该至少一个图形指令中的内容包括第一资源信息和第二资源信息,则第一终端基于检测结果生成的指示信息包括与该目标图形指令对应的目标子指示信息,该目标子指示信息包括信息索引:res_index1和该目标图形指令中的第二资源信息。
在该第一种实现方式中,由于第一终端将图形指令中所携带的资源信息划分为数据量大小不同的两部分(即第一资源信息和第二资源信息),并将较大的部分(即第一资源信息)采用资源索引表征,相当于进行了数据的压缩,从而有效减少子指示信息的数据量,提高数据传输效率。
本申请实施例在实际实现时,上述每个图形指令还可以包括API调用函数的名称。示例的,第一终端基于检测结果生成指示信息可以有两种生成方式。
在第一种可选的方式中,指示信息中携带有API调用函数的名称,则前述第一终端基于检测结果生成指示信息的过程包括:
第一终端基于对应的图形指令的第一函数索引生成指示信息,该指示信息包括API调用函数的名称。
第二种可选的方式中,指示信息中携带有API调用函数的函数索引,则前述第一终端基于检测结果生成指示信息的过程包括:
步骤A21、第一终端通过第一子应用程序,采用每个图形指令中的API调用函数的名称查询调用函数名称与函数索引的对应关系,得到API调用函数的名称对应的第一函数索引。
第一终端预先存储有API调用函数的名称和函数索引的对应关系(该对应关系通常是存储在第一子应用程序对应的第一安装包中,该第一安装包是通过服务器下载的。当该对应关系需要更新时,更新后的对应关系可以存储在第一终端通过服务器下载的更新后的第一安装包中;或者也可以通过第一子应用程序直接在对应的服务器中下载),该函数索引的数据量小于API调用函数的名称的数据量。示例地,API调用函数的名称和函数索引的对应关系可以以对应关系表的形式表征。例如下述表2,其包括API调用函数的名称1(glDrawElments)对应的函数索引1(api_index1),API调用函数的名称2(eglInitialize)对应的函数索引2(api_index2),以及API调用函数的名称3(glUniform4fw)对应的函数索引3(api_index3)。
表2
API调用函数的名称 函数索引
glDrawElments api_index1
eglInitialize api_index2
glUniform4fw api_index3
示例地,假设目标图形指令中的API调用函数的名称为eglInitialize,则第一终端通过第一子应用程序,采用eglInitialize查询该对应关系表,得到API调用函数的名称对应的函数索引:api_index2。
步骤A22、第一终端基于查询得到的第一函数索引,生成指示信息。该指示信息包括的每个子指示信息包括对应的图形指令的第一函数索引。
继续以上述步骤A21中的例子为例,第一终端基于查询得到的第一函数索引生成的指示 信息包括与目标图形指令对应的目标子指示信息,该目标子指示信息包括函数索引:api_index2。
由于API调用函数的名称通常比较复杂,第二种可选的方式中,第一终端将API调用函数的名称采用函数索引表征,相当于进行了数据的压缩,从而有效减少子指示信息的数据量,提高数据传输效率。
第二种实现方式,上述第一终端通过第一子应用程序,基于图形指令流生成指示信息的实现过程包括:
第一终端通过第一子应用程序,采用每个图形指令中的每个信息查询信息与信息索引的对应关系,得到图形指令对应的第二信息索引。第一终端基于查询得到的第二信息索引生成指示信息,指示信息包括与至少一个图形指令一一对应的至少一个子指示信息,每个子指示信息包括第二信息索引。其中,该图形指令可以包括API调用函数的名称,可选地,该图形指令可以包括还可以包括资源信息。第一终端预先存储有信息和信息索引的对应关系(该对应关系通常是存储在第一子应用程序对应的第一安装包中,该第一安装包是通过服务器下载的。当该对应关系需要更新时,更新后的对应关系可以存储在第一终端通过服务器下载的更新后的第一安装包中;或者也可以通过第一子应用程序直接在对应的服务器中下载),该信息索引的数据量小于或等于对应信息的数据量。示例地,信息和信息索引的对应关系可以以对应关系表的形式表征。
本申请实施例提供的第二种实现方式,第一终端为每个信息获取信息索引,并携带在指示信息中,相当于进行了数据的压缩,从而有效减少子指示信息的数据量,提高数据传输效率。相较于第一种实现方式而言,第一终端不再以数据量大小区分图形指令中的资源信息,从而减少了确定第一资源信息和第二资源信息的过程,进而简化了生成指示信息的过程,提高了指示信息的生成效率。
需要说明的是,图形指令中还可以仅包括API调用函数的名称,则前述第一终端通过第一子应用程序基于图形指令流生成指示信息的过程可以包括:
第一终端通过第一子应用程序,采用每个图形指令中的API调用函数的名称查询调用函数名称与函数索引的对应关系,得到该API调用函数的名称对应的第一函数索引。第一终端基于查询得到的第一函数索引,生成指示信息。该指示信息仅包括的每个子指示信息包括对应的图形指令的第一函数索引。
步骤203、第一终端向运行有第二子应用程序的第二终端发送生成的指示信息。
该过程是第一终端和第二终端进行设备间信息交互的过程。示例的,第一终端可以在每生成一个图形指令对应的指示信息后,即发送该指示信息;也可以在每生成指定个数个指示信息后,再发送该指定个数个指示信息,本申请实施例对此不做限定。
在前述实施例中,第一终端和第二终端建立有网络连接,该网络连接的可以有多种形式。例如,基于传输控制协议(transmission control protocol,TCP)/互联网协议(internet protocol,IP)的网络连接,或者基于无线保真(Wireless Fidelity,WIFI)协议的网络连接。其中,在第一终端和第二终端采用不同的网络连接方式进行连接时,第一终端和第二终端之间传输指示信息的方式也不同。本申请实施例以基于TIP/IP协议的网络连接进行指示信息传输为例进行说明。则上述第一终端向运行有第二子应用程序的第二终端发送生成的指示信息的过程包括:
步骤B1、第一终端将通信消息发送至第二终端,该通信消息包括指示信息。
可选地,第一终端对指示信息进行封装处理得到通信消息。如图4所示,其示出了一种通信信息的结构示意图。该通信信息包括指示信息。图4中以该指示信息包括与对应图形指令的函数索引、第一信息索引和第二资源信息为例进行说明。可选地,该通信信息还包括数据包长度字段,该数据包长度字段和指示信息构成封装数据包,该数据包长度字段携带有该封装数据包的长度信息。示例的,该封装数据包中包括的数据包长度字段、与图形指令对应的函数索引,以及第一信息索引的大小均为2个字节。
第一终端可以依次通过数据传输层、网络层以及数据链路层将该通信消息发送至第二终端。如图4所示,该通信信息还包括TCP报头、IP报头和以太网报头。其中,通信消息中的TCP报头、IP报头和以太网报头可以是封装数据包依次通过传输层、网络层和数据链路层后封装得到的,第一终端最终将经过数据链路层后生成的通信消息传输至第二终端。
本申请实施例在实际实现时,可以设置两个线程来进行前述指示信息的发送。则第一终端向运行有第二子应用程序的第二终端发送生成的指示信息的过程可以包括:
第一终端通过数据写入线程将生成的指示信息写入数据队列,然后通过数据发送线程从该数据队列中获取指示信息,并将获取的指示信息发送至运行有第二子应用程序的第二终端。
其中,当该发送过程遵循TCP/IP协议时,数据写入线程又称数据封装线程,该数据写入线程可以对指示信息进行封装处理,将处理得到的通信信息写入数据队列。第一终端通过数据发送线程从数据队列中获取携带有指示信息的通信信息,并将获取的通信信息发送至该第二终端。
可选地,数据写入线程和数据发送线程可以并行运行,通过设置数据写入线程和数据发送线程,在两个线程并行执行时,可以实现数据写入和发送的并行执行,提高第一终端和第二终端之间的数据处理效率。
可选地,数据队列可以仅包括一个队列,或者,该数据队列也可以包括两个子队列,该两个子队列为第一子队列和第二子队列。
当数据队列仅包括一个队列时,上述第一终端向运行有第二子应用程序的第二终端发送生成的指示信息的过程可以包括:
第一终端通过数据写入线程将生成的指示信息写入数据队列,通过数据发送线程从该数据队列中获取指示信息,并将获取的指示信息发送至运行有第二子应用程序的第二终端。
可选地,数据写入线程在数据队列的写入位置和数据发送线程在数据队列的读取位置不同,这样可以保证两个线程并行执行。例如,数据写入线程可以将生成的指示信息从数据队列的头部写入该数据队列,数据发送线程将指示信息从数据队列的尾部读取(也即是获取指示信息),或者,数据写入线程可以将生成的指示信息从数据队列的尾部写入该数据队列,数据发送线程将指示信息从数据队列的头部读取(也即是获取指示信息)。
当数据队列包括第一子队列和第二子队列时,如图5所示,上述第一终端向运行有第二子应用程序的第二终端发送生成的指示信息的过程可以包括:
第一终端通过数据写入线程将生成的指示信息写入第一子队列。在每次数据写入线程将生成的指示信息写入第一子队列后,第一终端交换第一子队列和第二子队列,使得第一终端后续通过数据写入线程将生成的指示信息写入新的第一子队列(即原第二子队列),并且通过数据发送线程从新的第二子队列(即原第一子队列)中获取指示信息,可选地,数据写入线 程和数据发送线程可以并行运行。如此可以保证,第一子队列和第二子队列中的信息的持续写入和发送。在数据发送线程进行数据发送的过程中,数据写入线程可以继续写入下个图像指令流所对应的指示信息,因此,两个线程并行运行,提高了数据处理效率。
示例地,如图5所示,第一终端通过第一子应用程序生成绘制目标:“荆轲”对应的图像指令流,该图像指令流中包括多个图形指令,相应生成了指示信息1至10。第一终端通过数据写入线程将依次将指示信息1至10写入第一子队列,在写入完成后,交换第一子队列和第二子队列。第一终端通过数据发送线程从第二子队列(即原第一子队列)中依次读取该指示信息1,并将读取的指示信息发送至第二终端。
本申请实施例中,由于第一终端通过数据写入线程和数据发送线程同时进行封装处理和发送,因此增强了第一终端并行处理能力,提高了第一终端处理数据的效率。
步骤204、第二终端接收第一终端发送的指示信息,指示信息用于指示第一终端通过第一子应用程序生成的图形指令流。
与上述步骤203对应的,本申请实施例继续以基于TIP/IP协议的网络连接进行指示信息传输为例进行说明。则第二终端接收第一终端发送的指示信息的过程包括:第二终端接收通信消息,该通信消息包括指示信息。第二终端基于接收的通信消息,获取指示信息。其中,第二终端可以接收到的通信消息进行解封装处理,得到指示信息。与前述封装过程对应的,通信信息可以依次通过数据链路层、网络层以及数据传输层解封装以太网报头、IP报头和TCP报头得到封装数据包,进而得到指示信息。
本申请实施例在实际实现时,第二终端也可以设置两个线程来进行前述指示信息的接收。则第二终端接收第一终端发送的指示信息的过程可以包括:
第二终端通过数据接收线程将接收的第一终端发送的指示信息写入数据队列,然后通过渲染线程从该数据队列中获取指示信息。其中,该数据接收线程和该数据读出线程并行运行,通过设置数据接收线程和渲染线程,在两个线程并行执行时,可以实现数据接收和渲染的并行执行,提高第一终端和第二终端之间的数据处理效率。
可选地,数据队列也可以仅包括一个队列,或者,该数据队列也可以包括两个子队列,该两个子队列为第一子队列和第二子队列。
当数据队列仅包括一个队列时,上述第二终端接收第一终端发送的指示信息的过程可以包括:第二终端通过数据接收线程将接收的第一终端发送的指示信息写入数据队列,然后通过渲染线程从该数据队列中获取指示信息。可选地,该渲染线程在获取指示信息后,还可以基于指示信息获取图形指令流,并进行图像帧的渲染。
可选地,数据接收线程在数据队列的写入位置和渲染线程在数据队列的读取位置不同,这样可以保证两个线程并行执行。例如,数据接收线程可以将接收的指示信息从数据队列的头部写入该数据队列,渲染线程将指示信息从数据队列的尾部读取(也即是获取指示信息),或者,数据接收线程可以将生成的指示信息从数据队列的尾部写入该数据队列,渲染线程将指示信息从数据队列的头部读取(也即是获取指示信息)。
当数据队列包括第一子队列和第二子队列时,如图5所示,上述第二终端接收第一终端发送的指示信息的过程可以包括:
第二终端通过数据接收线程将接收的指示信息写入第一子队列。在每次数据接收线程将生成的指示信息写入第一子队列后,第一终端交换第一子队列和第二子队列,使得第一终端 后续通过数据接收线程将生成的指示信息写入新的第一子队列(即原第二子队列),并且通过渲染线程从新的第二子队列(即原第一子队列)中获取指示信息。如此可以保证,第一子队列和第二子队列中的信息的持续写入和发送。在渲染线程进行数据发送的过程中,数据接收线程可以继续写入下个图像指令流所对应的指示信息,因此,两个线程并行运行,提高了数据处理效率。
步骤205、第二终端通过该第二终端中运行的第二子应用程序,基于接收的指示信息获取图形指令流。
由于本申请实施例中,上述步骤102中第一终端基于图形指令流生成指示信息的方式示例出有两种实现方式,因此相应的,以下以第二终端基于指示信息获取图形指令流的两种实现方式为例进行说明。
与前述步骤102中步骤A1和步骤A2对应的第一种实现方式,指示信息包括与至少一个图形指令一一对应的至少一个子指示信息,每个子指示信息包括:第二资源信息和/或第一信息索引。
上述第二终端基于指示信息获取图形指令流,包括:
步骤C1、第二终端通过第二子应用程序,检测子指示信息中的内容。
第二终端通过第二子应用程序,检测子指示信息中的内容是否包括第一信息索引和/或第二资源信息。
步骤C2、第二终端基于检测结果,生成图形指令流。该图形指令流包括与至少一个子指示信息一一对应的至少一个图形指令。
其中,当任一子指示信息包括第一信息索引,可以采用每个子指示信息中的第一信息索引查询资源信息与信息索引的对应关系,得到第一信息索引对应的第一资源信息。相应的,与任一子指示信息对应的图形指令包括第一资源信息。当任一子指示信息包括第二资源信息,与任一子指示信息对应的图形指令包括第二资源信息。
第二终端预先存储有与第一终端相同的资源信息和信息索引的对应关系(该对应关系通常是存储在第二子应用程序对应的第二安装包中,该第二安装包是通过服务器下载的。当该对应关系需要更新时,更新后的对应关系可以存储在第二终端通过服务器下载的更新后的第二安装包中;或者也可以通过第二子应用程序直接在对应的服务器中下载的),该信息索引的数据量小于资源信息的数据量。示例地,资源信息与信息索引的对应关系可以参考上述表1的内容。
可选地,与前述步骤A2对应的,图形指令还包括API调用函数的名称,则前述步骤C2可以有以下两种可选方式:
在第一种可选的方式中,每个子指示信息还包括:API调用函数的名称,则第二终端基于检测结果,生成图形指令流的过程包括:
第二终端基于至少一个子指示信息中每个子指示信息对应的API调用函数的名称,生成对应的至少一个图形指令,每个图形指令包括与对应的子指示信息中的API调用函数的名称。
在第二种可选的方式中,每个子指示信息还包括:第一函数索引,则第二终端基于检测结果,生成图形指令流,包括:
步骤C21、第二终端通过第二子应用程序,采用每个子指示信息中的第一函数索引查询调用函数名称与函数索引的对应关系,得到第一函数索引对应的API调用函数的名称。
第二终端预先存储有与第一终端相同的API调用函数的名称和函数索引的对应关系(该对应关系通常是存储在第二子应用程序对应的第二安装包中,该第二安装包是通过服务器下载的。当该对应关系需要更新时,更新后的对应关系可以存储在第二终端通过服务器下载的更新后的第二安装包中;或者也可以通过第二子应用程序直接在对应的服务器中下载的),该函数索引的数据量小于资源信息的数据量。示例地,资源信息与信息索引的对应关系可以参考上述表2的内容。
步骤C22、第二终端基于至少一个子指示信息中每个子指示信息对应的API调用函数的名称,生成对应的至少一个图形指令,每个图形指令包括与对应的子指示信息中的API调用函数的名称。
第二种实现方式,每个子指示信息包括:第二信息索引。则上述第二终端基于指示信息获取图形指令流的过程,包括:
与前述步骤202中的第二种实现方式对应的,第二终端通过第二子应用程序,采用每个子指示信息中的第二信息索引查询信息与信息索引的对应关系,得到第二信息索引对应的信息,该信息属于图形指令。第二终端基于至少一个子指示信息中每个子指示信息对应的信息生成对应的至少一个图形指令,以得到图形指令流。其中,第二终端存储有与第一终端相同的信息和信息索引的对应关系(该对应关系通常是存储在第二子应用程序对应的第二安装包中,该第二安装包是通过服务器下载的。当该对应关系需要更新时,更新后的对应关系可以存储在第二终端通过服务器下载的更新后的第二安装包中;或者也可以通过第二子应用程序直接在对应的服务器中下载的),该信息索引的数据量小于或等于对应信息的数据量。示例地,信息和信息索引的对应关系可以以对应关系表的形式表征。
需要说明的是,每个子指示信息还可以仅包括第一函数索引。则上述第二终端基于指示信息获取图形指令流的过程,包括:
与前述步骤202中在图形指令中还可以仅包括API调用函数的名称时,第一终端通过第一子应用程序基于图形指令流生成指示信息的实现方式对应的,第二终端通过第二子应用程序,采用每个子指示信息中的第一函数索引查询调用函数名称与函数索引的对应关系,得到第一函数索引对应的API调用函数的名称。第二终端基于至少一个子指示信息中每个子指示信息对应的API调用函数的名称,生成对应的至少一个图形指令,每个图形指令仅包括与对应的子指示信息中的API调用函数的名称。
步骤206、第二终端通过第二子应用程序,基于获取的图形指令流,生成图像信息。
第二终端通过第二子应用程序基于获取的图形指令流进行渲染处理,生成图像信息。之后第二终端呈现该图像信息。例如显示该图像信息对应的图像帧、播放该图像信息对应的音频,和/或显示该图像信息对应的文本。
本申请实施例中,基于上述步骤204至步骤206所述,如图3所示,第二终端可以包括接收模块、渲染模块和呈现模块。该接收模块用于接收第一终端发送的指示信息。渲染模块用于基于接收的指示信息获取图形指令流。呈现模块用于基于获取的图形指令流,生成并呈现图像信息。
步骤207、当检测到第一子应用程序处于合并运行模式时,第一终端通过第一子应用程序向第一终端中运行的第三子应用程序发送图形指令流。
由于第一子应用程序和第三子应用程序均安装在第一终端上,因此,第一终端通过第一 子应用程序可以直接向该第三子应用程序发送图形指令流。该过程是第一终端内部进行指令流传输的过程。
步骤208、第一终端通过第三子应用程序,基于图形指令流,生成图像信息。
第一终端通过第三子应用程序基于获取的图形指令流进行渲染处理,生成图像信息。之后第三终端基于该图像信息进行显示。
需要说明的是,前述实施例中,当检测到第一子应用程序处于拆分运行模式时,该第一终端可以执行如上步骤201至步骤203,相应的,第二终端可以执行上述步骤204和步骤206。当检测到第一子应用程序处于合并运行模式时,该第一终端可以执行如上步骤207和步骤208。实际实现时,若本申请实施例提供的数据处理系统仅存在前述第一种情况,也即是该数据处理系统中的第一终端仅支持拆分运行模式这一种模式,则可以仅执行前述步骤201至203,相应的,第二终端可以执行步骤204和步骤206。
结合前述实施例可知,第一终端可以在检测到该第一终端中的第一子应用程序与第二终端中第二子应用程序的连接建立成功后,确定第一子应用程序处于拆分运行模式,此时,第一终端可以生成用于呈现第一终端和第二终端连接成功的提示信息的目标图形指令流,使得第二终端在接收到该目标图形指令流之后,呈现该提示信息。相应的,第一终端也可以在检测到该第一终端中的第一子应用程序与第二终端中的第二子应用程序连接建立失败,且第一终端中并未安装有第三子应用程序(例如,第一子应用程序首次与第二子应用程序建立连接失败)时,则该自动下载该第三子应用程序,以使第一终端可以正常呈现图像信息。且第一终端可以生成用于呈现第一终端和第二终端连接失败的提示信息的目标图形指令流,使得第一终端在接收到该目标图形指令流之后,呈现该提示信息,从而提示用户连接失败。
可选地,第一终端也可以在检测到第一子应用程序与第二子应用程序的连接建立失败后,执行问题检测流程,以解析该第一子应用程序和第二子应用程序建立连接失败的原因,在确定两者连接失败的原因后,第一终端在用户界面呈现该连接失败的原因,以供用户了解两个子程序的连接情况。示例地,第一终端可以执行心跳检测功能,向第二终端发送心跳请求。当第一终端在预设时长内未接收到第二终端发送的该心跳请求对应得快心跳响应后,确定该第一子应用程序与第二子应用程序的连接建立失败的原因是网络原因。则第一终端可以生成用于呈现具有“无网络”的提示字样的提示信息的图形指令流,使得第三子应用程序在接收到该目标图形指令流之后,呈现该“无网络”的提示字样。
为了便于读者理解,本申请实施例以前述第一终端为手机,第二终端为电视为例,对处于拆分运行模式下的第一终端和第二终端所应用的数据传输方法进行说明。如图6所示,假设手机的用户为小明,目标应用程序为游戏G,该游戏G包括第一子应用程序G1和第二子应用程序G2。小明打开电视,并运行安装在电视中的游戏G的第二子应用程序G2,并且运行手机上安装的游戏G的第一子应用程序G1。
当手机检测到第一子应用程序G1与电视上安装的第二子应用程序连接建立成功后,小明即可通过操作手机,来使游戏内容在电视上显示。小明点击游戏G,手机通过第一子应用程序G1生成图形指令流,该图形指令流中包括第一图形指令和第二图形指令。该第一图形指令包括API调用函数的名称(图6中表示为API1):glUniform4fw和第二资源信息;该第二图形指令包括API调用函数的名称(图6中表示为API2):glDrawElments,第一资源信息: res2和第二资源信息(图6中res2和第二资源信息均统称为资源信息)。手机通过第一子应用程序G1中的钩子模块使得其可以基于图形指令流、上述表1和表2所示的对应关系生成指示信息,该指示信息包括与第一图形指令对应的第一子指示信息,以及与第二图形指令对应的第二子指示信息。该第一子指示信息包括函数索引:api_index3和第二资源信息;第二子指示信息包括函数索引:api_index2、信息索引:res_index2和第二资源信息。手机向运行第二子应用程序G2的电视发送该指示信息。
电视接收到该指示信息后,首先基于该指示信息、上述表1所示的资源信息和信息索引的对应关系表,以及上述表2所示的API调用函数的名称和函数索引的对应关系表得到图形指令流(也可以称为解译图像指令流中图形指令包括的函数索引和信息索引)。然后第二终端通过第二子应用程序G2基于获取的图形指令流进行渲染处理生成图像信息。最终第二终端呈现该图像信息。在第一种情况下,小明的手机仅支持拆分运行模式(如小明的手机内仅运行有第一子应用程序),小明的手机不显示游戏的用户界面,则小明可以通过对手机的盲操作来控制电视上的游戏内容,手机相当于游戏手柄;在第二种情况下,如图7所示,小明的手机仅不仅支持上述拆分运行模式,也支持合并运行模式(如小明的手机内同时运行有第一子应用程序和第三子应用程序),小明的手机显示游戏的用户界面,电视也显示游戏的用户界面,则小明可以通过对手机的操作来控制电视上的游戏内容。由于游戏的用户界面显示在电视的屏幕上,可以使得用户获取较大的游戏视野,提高手游的视觉体验。
本申请实施例中,在手机处于拆分运行模式下,其生成的图形指令流均可以参考图6所示的数据传输方法,以使得电视上呈现该图形指令流对应的图像信息。
综上所述,本申请实施例提供的一种数据传输方法中,基于第一终端中运行的目标应用程序的第一子应用程序生成的图形指令流,生成指示信息,该指示信息的数据量小于或等于图形指令流的数据量。并向运行有第二子应用程序的第二终端发送生成的指示信息,以供第二终端通过目标应用程序的第二子应用程序,基于接收的指示信息获取图形指令流,呈现生成的图像信息。由于第一终端运行的第一子应用程序能够获取图形指令流,而第二终端运行的第二子应用程序能够实现图形指令流的恢复,从而保证图像信息由第一终端投放至第二终端,并且由于第一终端和第二终端之间传输的指示信息的数据量小于小于或等于图形指令流的数据量,而图形指令流的数据量远远图像信息的数据量,因此,指示信息的数据量较小,即第一终端和第二终端之间传输的数据量较小,从而在保证图像投放效果的前提下,有效降低了二者之间传输延时。进一步,当目标应用程序为游戏应用程序时,第一终端和第二终端之间传输数据量较小的指示信息,可以降低二者之间传输延时。特别是当前述步骤202中生成的指示信息携带API调用函数的函数索引和第一资源信息的信息索引时,第一终端和第二终端之间的传输延时小于10微秒(ms),远低于相关技术中二者之间具有的200~300ms的传输延时。并且降低后的传输延时可以提高游戏操作的实时性,进而提高游戏体验。
下述为本申请的装置实施例,可以用于执行本申请的方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
图8是本申请实施例提供的一种数据传输装置的结构示意图,该数据传输装置应用于第一终端。如图8所示,该数据传输装置300包括:
第一生成模块301,用于通过第一终端中运行的第一子应用程序生成图形指令流,第一 子应用程序为可拆分的目标应用程序中可独立运行的一个子应用程序。
第二生成模块302,用于基于图形指令流生成指示信息,指示信息用于指示图形指令流,指示信息的数据量小于或等于图形指令流的数据量。
第一发送模块303,用于向运行有第二子应用程序的第二终端发送生成的指示信息,以供第二终端通过第二子应用程序,基于指示信息获取图形指令流,并生成图像信息,第二子应用程序为目标应用程序中可独立运行的一个子应用程序,第二子应用程序与第一子应用程序不同。
可选地,图形指令流包括至少一个图形指令,其中,图形指令包括第一资源信息和第二资源信息,第一资源信息的数据量大于第二资源信息的数据量,第二生成模块302,用于:
检测该至少一个图形指令中的内容。基于检测结果生成指示信息,指示信息包括与至少一个图形指令一一对应的至少一个子指示信息。其中,当任一图形指令包括第一资源信息,与该任一图形指令对应的子指示信息包括第一信息索引,第一信息索引为采用任一图形指令中的第一资源信息查询资源信息与信息索引的对应关系,得到的信息索引;当任一图形指令包括第二资源信息,与该任一图形指令对应的子指示信息包括第二资源信息。
可选地,图形指令还包括API调用函数的名称,第二生成模块302,用于:
采用每个图形指令中的API调用函数的名称查询调用函数名称与函数索引的对应关系,得到API调用函数的名称对应的第一函数索引。基于查询得到的第一函数索引,生成指示信息,指示信息包括的每个子指示信息包括对应的图形指令的第一函数索引。
可选地,如图9所示,数据传输装置300还包括:
第二发送模块304,用于当检测到第一子应用程序处于合并运行模式,通过第一子应用程序向第一终端中运行的第三子应用程序发送图形指令流,第三子应用程序为目标应用程序中可独立运行的一个子应用程序,第三子应用程序与第一子应用程序不同。
第三生成模块305,用于通过第三子应用程序,基于图形指令流,生成图像信息。
第二生成模块302,用于:当检测到第一子应用程序处于拆分运行模式,基于图形指令流生成指示信息。
可选地,如图10所示,数据传输装置300还包括:
第一确定模块306,用于在通过第一子应用程序接收到拆分运行指令后,确定第一子应用程序处于拆分运行模式,或者,在检测到第一终端中仅安装有目标应用程序的第一子应用程序后,确定第一子应用程序处于拆分运行模式,或者,在检测到第一终端中的第一子应用程序与第二终端中第二子应用程序的连接建立成功后,确定第一子应用程序处于拆分运行模式。
第二确定模块307,用于在通过第一子应用程序接收到合并运行指令后,确定第一子应用程序处于合并运行模式,或者,在检测到第一终端中的第一子应用程序与第二终端中第二子应用程序的连接建立失败,且检测到第一终端中安装有第三子应用程序后,确定第一子应用程序处于合并运行模式。
可选地,第一发送模块303,用于:通过数据写入线程将生成的指示信息写入数据队列。通过数据发送线程从数据队列中获取指示信息,并将获取的指示信息发送至运行有第二子应用程序的第二终端;其中,该数据写入线程和该数据发送线程并行运行。
综上所述,本申请实施例提供的一种数据传输装置中,通过第一生成模块运行的第一子 应用程序生成图形指令流,第二生成模块基于图形指令流生成指示信息,该指示信息的数据量小于或等于图形指令流的数据量。发送模块向运行有第二子应用程序的第二终端发送生成的指示信息,以供第二终端通过目标应用程序的第二子应用程序,基于接收的指示信息获取图形指令流,呈现生成的图像信息。由于第一终端运行的第一子应用程序能够获取图形指令流,而第二终端运行的第二子应用程序能够实现图形指令流的恢复,从而保证图像信息由第一终端投放至第二终端,并且由于第一终端和第二终端之间传输的指示信息的数据量小于或等于图形指令流的数据量,而图形指令流的数据量远远小于图像信息的数据量,因此,指示信息的数据量较小,即第一终端和第二终端之间传输的数据量较小,在保证图像投放效果的前提下,从而有效降低了二者之间传输延时。进一步,当目标应用程序为游戏应用程序时,降低后的传输延时可以提高游戏操作的实时性,进而提高游戏体验。
图11是本申请另一实施例提供的一种数据传输装置的结构示意图,该数据传输装置应用于第二终端。如图11所示,数据传输装置400包括:
接收模块401,用于接收第一终端发送的指示信息,指示信息用于指示第一终端通过第一子应用程序生成的图形指令流,指示信息的数据量小于或等于图形指令流的数据量,第一子应用程序为目标应用程序中可独立运行的一个子应用程序,第二子应用程序为目标应用程序中可独立运行的一个子应用程序,第二子应用程序与第一子应用程序不同。
获取模块402,用于通过第二终端中运行的第二子应用程序,基于指示信息获取图形指令流。
生成模块403,用于通过第二子应用程序,基于获取的图形指令流,生成图像信息。
可选地,图形指令流包括至少一个图形指令,指示信息包括至少一个子指示信息,每个子指示信息包括:第二资源信息和/或第一信息索引,获取模块402,用于:
检测子指示信息中的内容。基于检测结果,生成图形指令流。其中,图形指令流包括与至少一个子指示信息一一对应的至少一个图形指令,当任一子指示信息包括第一信息索引,与任一子指示信息对应的图形指令包括第一资源信息,第一资源信息为采用任一子指示信息中的第一信息索引查询资源信息与信息索引的对应关系,得到的资源信息,该资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息;当该任一子指示信息包括第二资源信息,与该任一子指示信息对应的图形指令包括第二资源信息,第一资源信息的数据量大于第二资源信息的数据量。
可选地,图形指令还包括API调用函数的名称,每个子指示信息还包括:第一函数索引。获取模块402,用于:
采用每个子指示信息中的第一函数索引查询调用函数名称与函数索引的对应关系,得到第一函数索引对应的API调用函数的名称。基于至少一个子指示信息中每个子指示信息对应的API调用函数的名称,生成对应的至少一个图形指令,每个图形指令包括与对应的子指示信息中的API调用函数的名称。
可选地,接收模块401,用于:通过数据接收线程接收第一终端发送的指示信息,并将指示信息写入数据队列。通过数据读出线程从数据队列获取指示信息;其中,该数据接收线程和该数据读出线程并行运行。
综上所述,本申请实施例提供的一种数据传输装置中,通过接收模块接收第一终端发送 的指示信息。该指示信息用于指示第一终端通过第一子应用程序生成的图形指令流,且该指示信息的数据量小于或等于图形指令流的数据量。获取模块通过第二子应用程序基于指示信息获取图形指令流。生成模块通过第二子应用程序基于获取的图形指令流生成图像信息。由于第一终端运行的第一子应用程序能够获取图形指令流,而第二终端运行的第二子应用程序能够实现图形指令流的恢复,从而保证图像信息由第一终端投放至第二终端,并且由于第一终端和第二终端之间传输的指示信息的数据量小于或等于图形指令流的数据量,而图形指令流的数据量远远小于图像信息的数据量,因此,指示信息的数据量较小,即第一终端和第二终端之间传输的数据量较小,从而在保证图像投放效果的前提下,有效降低了二者之间传输延时。进一步,当目标应用程序为游戏应用程序时,降低后的传输延时可以提高游戏操作的实时性,进而提高游戏体验。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图12示出了该数据传输方法涉及的电子设备500的结构示意图。该电子设备500可以为上述第一终端或者第二终端。该电子设备500可以但不限于是膝上型计算机、台式计算机、移动电话、智能手机、平板电脑、多媒体播放器、电子阅读器、智能车载设备、智能家电、人工智能设备、穿戴式设备、物联网设备、或虚拟现实/增强现实/混合现实设备等。
电子设备500可以包括处理器510,外部存储器接口520,内部存储器521,通用串行总线(universal serial bus,USB)接口530,充电管理模块540,电源管理模块541,电池542,天线1,天线2,移动通信模块550,无线通信模块560,音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,传感器模块580,按键590,马达591,指示器592,摄像头593,显示屏594,以及用户标识模块(subscriber identification module,SIM)卡接口595等。其中传感器模块580可以包括压力传感器580A,陀螺仪传感器580B,气压传感器580C,磁传感器580D,加速度传感器580E,距离传感器580F,接近光传感器580G,指纹传感器580H,温度传感器580J,触摸传感器580K,环境光传感器580L,骨传导传感器580M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备500的具体限定。在本申请另一些实施例中,电子设备500可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备500的结构限定。在本申请另一些实施例中,电子设备500也可以采用上述实施例中不同的接口连接方式(例如总线连接方式),或多种接口连接方式的组合。
处理器510可以包括一个或多个处理单元,例如包括中央处理器CPU(例如应用处理器(application processor,AP)),图形处理器GPU,进一步的,还可以包括调制解调处理器,图像信号处理器(image signal processor,ISP),微控制器单元(microcontroller unit,MCU),视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
处理器510中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器510中的存储器为高速缓冲存储器。该存储器可以保存处理器510刚用过或循环使用的指令或数据。如果处理器510需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器510的等待时间,因而提高了系统的效率。
在一些实施例中,处理器510可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器510可以包含多组I2C总线。处理器510可以通过不同的I2C总线接口分别耦合触摸传感器580K,充电器,闪光灯,摄像头593等。例如:处理器510可以通过I2C接口耦合触摸传感器580K,使处理器510与触摸传感器580K通过I2C总线接口通信,实现电子设备500的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器510可以包含多组I2S总线。处理器510可以通过I2S总线与音频模块570耦合,实现处理器510与音频模块570之间的通信。在一些实施例中,音频模块570可以通过I2S接口向无线通信模块560传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块570与无线通信模块560可以通过PCM总线接口耦合。在一些实施例中,音频模块570也可以通过PCM接口向无线通信模块560传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器510与无线通信模块560。例如:处理器510通过UART接口与无线通信模块560中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块570可以通过UART接口向无线通信模块560传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器510与显示屏594,摄像头593等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器510和摄像头593通过CSI接口通信,实现电子设备500的拍摄功能。处理器510和显示屏594通过DSI接口通信,实现电子设备500的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器510与摄像头593,显示屏594,无线通信模块560,音频模块570,传感器模块580等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口530是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口530可以用于连接充电器为电子设备500充电,也可以用 于电子设备500与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
充电管理模块540用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块540可以通过USB接口530接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块540可以通过电子设备500的无线充电线圈接收无线充电输入。充电管理模块540为电池542充电的同时,还可以通过电源管理模块541为电子设备供电。
电源管理模块541用于连接电池542,充电管理模块540与处理器510。电源管理模块541接收电池542和/或充电管理模块540的输入,为处理器510,内部存储器521,显示屏594,摄像头593,和无线通信模块560等供电。电源管理模块541还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块541也可以设置于处理器510中。在另一些实施例中,电源管理模块541和充电管理模块540也可以设置于同一个器件中。
电子设备500的无线通信功能可以通过天线1,天线2,移动通信模块550,无线通信模块560,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备500中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块550可以提供应用在电子设备500上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块550可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块550可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块550还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块550的至少部分功能模块可以被设置于处理器510中。在一些实施例中,移动通信模块550的至少部分功能模块可以与处理器510的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器570A,受话器570B等)输出声音信号,或通过显示屏594显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器510,与移动通信模块550或其他功能模块设置在同一个器件中。
无线通信模块560可以提供应用在电子设备500上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块560可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块560经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器510。无线通信模块560还可以从处理器510接收待发送的信号,对其 进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备500的天线1和移动通信模块550耦合,天线2和无线通信模块560耦合,使得电子设备500可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备500通过GPU,显示屏594,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏594和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器510可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏594用于显示图像,视频等。显示屏594包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备500可以包括1个或N个显示屏594,N为大于1的正整数。需要说明的是,当电子设备500为第一终端时,其显示屏594的屏幕尺寸小于第二终端的显示屏的屏幕尺寸;当电子设备500为第二终端时,其显示屏594的屏幕尺寸大于第一终端的显示屏的屏幕尺寸。
电子设备500可以通过ISP,摄像头593,视频编解码器,GPU,显示屏594以及应用处理器等实现拍摄功能。
ISP用于处理摄像头593反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头593中。
摄像头593用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备500可以包括1个或N个摄像头593,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备500在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备500可以支持一种或多种视频编 解码器。这样,电子设备500可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备500的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口520可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备500的存储能力。外部存储卡通过外部存储器接口520与处理器510通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器521可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器521可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备500使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器521可以包括高速随机存取存储器,例如双倍速率同步动态随机存储器(double data rate synchronous dynamic random access memory,DDR),还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器510通过运行存储在内部存储器521的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备500的各种功能应用以及数据处理。
电子设备500可以通过音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块570用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块570还可以用于对音频信号编码和解码。在一些实施例中,音频模块570可以设置于处理器510中,或将音频模块570的部分功能模块设置于处理器510中。
扬声器570A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备500可以通过扬声器170A收听音乐,或收听免提通话。
受话器570B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备500接听电话或语音信息时,可以通过将受话器570B靠近人耳接听语音。
麦克风570C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风570C发声,将声音信号输入到麦克风570C。电子设备500可以设置至少一个麦克风570C。在另一些实施例中,电子设备500可以设置两个麦克风570C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备500还可以设置三个,四个或更多麦克风570C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口570D用于连接有线耳机。耳机接口570D可以是USB接口530,也可以是3.5毫米的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器580A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器580A可以设置于显示屏594。压力传感器580A的种类很多,如电阻式压力传感 器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器580A,电极之间的电容改变。电子设备500根据电容的变化确定压力的强度。当有触摸操作作用于显示屏594,电子设备500根据压力传感器580A检测所述触摸操作强度。电子设备500也可以根据压力传感器580A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器580B可以用于确定电子设备500的运动姿态。在一些实施例中,可以通过陀螺仪传感器580B确定电子设备500围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器580B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器580B检测电子设备500抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备500的抖动,实现防抖。陀螺仪传感器580B还可以用于导航,体感游戏场景。
气压传感器580C用于测量气压。在一些实施例中,电子设备500通过气压传感器580C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器580D包括霍尔传感器。电子设备500可以利用磁传感器580D检测翻盖皮套的开合。在一些实施例中,当电子设备500是翻盖机时,电子设备500可以根据磁传感器580D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器580E可检测电子设备500在各个方向上(一般为三轴)加速度的大小。当电子设备500静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器580F,用于测量距离。电子设备500可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备500可以利用距离传感器580F测距以实现快速对焦。
接近光传感器580G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备500通过发光二极管向外发射红外光。电子设备500使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备500附近有物体。当检测到不充分的反射光时,电子设备500可以确定电子设备500附近没有物体。电子设备500可以利用接近光传感器580G检测用户手持电子设备500贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器580G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器580L用于感知环境光亮度。电子设备500可以根据感知的环境光亮度自适应调节显示屏594亮度。环境光传感器580L也可用于拍照时自动调节白平衡。环境光传感器580L还可以与接近光传感器580G配合,检测电子设备500是否在口袋里,以防误触。
指纹传感器580H用于采集指纹。电子设备500可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器580J用于检测温度。在一些实施例中,电子设备500利用温度传感器580J检测的温度,执行温度处理策略。例如,当温度传感器580J上报的温度超过阈值,电子设备500执行降低位于温度传感器580J附近的处理器的性能,以便降低功耗实施热保护。在另一 些实施例中,当温度低于另一阈值时,电子设备500对电池542加热,以避免低温导致电子设备500异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备500对电池542的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器580K,也称“触控器件”。触摸传感器580K可以设置于显示屏594,由触摸传感器580K与显示屏594组成触摸屏,也称“触控屏”。触摸传感器580K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏594提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器580K也可以设置于电子设备500的表面,与显示屏594所处的位置不同。
骨传导传感器580M可以获取振动信号。在一些实施例中,骨传导传感器580M可以获取人体声部振动骨块的振动信号。骨传导传感器580M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器580M也可以设置于耳机中,结合成骨传导耳机。音频模块570可以基于所述骨传导传感器580M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器580M获取的血压跳动信号解析心率信息,实现心率检测功能。
在本申请另一些实施例中,电子设备500也可以采用上述实施例中不同的接口连接方式,例如以上多种传感器中的部分或全部传感器连接MCU,通过MCU再连接AP。
按键590包括开机键,音量键等。按键590可以是机械按键。也可以是触摸式按键。电子设备500可以接收按键输入,产生与电子设备500的用户设置以及功能控制有关的键信号输入。
马达591可以产生振动提示。马达591可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏594不同区域的触摸操作,马达591也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器592可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口595用于连接SIM卡。SIM卡可以通过插入SIM卡接口595,或从SIM卡接口595拔出,实现和电子设备500的接触和分离。电子设备500可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口595可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口595可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口595也可以兼容不同类型的SIM卡。SIM卡接口595也可以兼容外部存储卡。电子设备500通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备500采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备500中,不能和电子设备500分离。
电子设备500的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备500的软件结构。
本申请实施例还提供了一种存储介质。该存储介质上存储有指令,当指令被第一终端执 行时,实现如上述方法实施例涉及的第一终端执行的步骤;或者,当指令被第二终端执行时,实现如上述方法实施例涉及的第二终端执行的步骤。该存储介质可以包括:只读存储器(read-only memory,ROM)或随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可存储程序代码的介质。
在本申请实施例中,术语“第一”、“第二”和“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。
本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (23)

  1. 一种数据传输方法,其特征在于,所述方法应用于第一终端,所述方法包括:
    通过所述第一终端中运行的第一子应用程序生成图形指令流,所述第一子应用程序为可拆分的目标应用程序中可独立运行的一个子应用程序;
    基于所述图形指令流生成指示信息,所述指示信息用于指示所述图形指令流,所述指示信息的数据量小于或等于所述图形指令流的数据量;
    向运行有第二子应用程序的第二终端发送生成的指示信息,以供所述第二终端通过所述第二子应用程序,基于所述指示信息获取所述图形指令流,并生成图像信息,所述第二子应用程序为所述目标应用程序中可独立运行的一个子应用程序,所述第二子应用程序与所述第一子应用程序不同。
  2. 根据权利要求1所述的方法,其特征在于,所述图形指令流包括至少一个图形指令,其中,所述图形指令包括第一资源信息和/或第二资源信息,所述资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息,所述第一资源信息的数据量大于所述第二资源信息的数据量,所述基于所述图形指令流生成指示信息,包括:
    检测所述至少一个图形指令中的内容;
    基于检测结果生成所述指示信息,所述指示信息包括与所述至少一个所述图形指令一一对应的至少一个子指示信息;
    其中,当任一图形指令包括所述第一资源信息,与所述任一图形指令对应的子指示信息包括第一信息索引,所述第一信息索引为采用所述任一图形指令中的第一资源信息查询资源信息与信息索引的对应关系,得到的信息索引;
    当任一图形指令包括所述第二资源信息,与所述任一图形指令对应的子指示信息包括所述第二资源信息。
  3. 根据权利要求2所述的方法,其特征在于,所述图形指令还包括应用程序编程接口API调用函数的名称,所述基于检测结果生成所述指示信息,包括:
    采用每个所述图形指令中的API调用函数的名称查询调用函数名称与函数索引的对应关系,得到所述API调用函数的名称对应的第一函数索引;
    基于查询得到的第一函数索引,生成所述指示信息,所述指示信息包括的每个所述子指示信息包括对应的图形指令的第一函数索引。
  4. 根据权利要求1至3任一所述的方法,其特征在于,在所述基于所述图形指令流生成指示信息之前,所述方法还包括:
    当检测到所述第一子应用程序处于合并运行模式,通过所述第一子应用程序向所述第一终端中运行的第三子应用程序发送所述图形指令流,所述第三子应用程序为所述目标应用程序中可独立运行的一个子应用程序,所述第三子应用程序与所述第一子应用程序不同;
    通过所述第三子应用程序,基于所述图形指令流,生成图像信息;
    所述基于所述图形指令流生成指示信息,包括:
    当检测到所述第一子应用程序处于拆分运行模式,基于所述图形指令流生成所述指示信息。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    在通过所述第一子应用程序接收到拆分运行指令后,确定所述第一子应用程序处于所述拆分运行模式,或者,在检测到所述第一终端中仅安装有所述目标应用程序的第一子应用程序后,确定所述第一子应用程序处于所述拆分运行模式,或者,在检测到所述第一终端中的所述第一子应用程序与所述第二终端中所述第二子应用程序的连接建立成功后,确定所述第一子应用程序处于所述拆分运行模式;
    在通过所述第一子应用程序接收到合并运行指令后,确定所述第一子应用程序处于所述合并运行模式,或者,在检测到所述第一终端中的所述第一子应用程序与所述第二终端中所述第二子应用程序的连接建立失败,且检测到所述第一终端中安装有所述第三子应用程序后,确定所述第一子应用程序处于所述合并运行模式。
  6. 根据权利要求1至5任一所述的方法,其特征在于,所述向运行有第二子应用程序的第二终端发送生成的指示信息,包括:
    通过数据写入线程将生成的指示信息写入数据队列;
    通过数据发送线程从所述数据队列中获取指示信息,并将获取的指示信息发送至所述运行有第二子应用程序的第二终端;
    其中,所述数据写入线程和所述数据发送线程并行运行。
  7. 一种数据传输方法,其特征在于,所述方法应用于第二终端,所述方法包括:
    接收第一终端发送的指示信息,所述指示信息用于指示所述第一终端通过第一子应用程序生成的图形指令流,所述指示信息的数据量小于或等于所述图形指令流的数据量,所述第一子应用程序为所述目标应用程序中可独立运行的一个子应用程序,所述第二子应用程序为所述目标应用程序中可独立运行的一个子应用程序,所述第二子应用程序与所述第一子应用程序不同;
    通过所述第二终端中运行的第二子应用程序,基于所述指示信息获取所述图形指令流;
    通过所述第二子应用程序,基于获取的图形指令流,生成图像信息。
  8. 根据权利要求7所述的方法,其特征在于,所述图形指令流包括至少一个图形指令,所述指示信息包括至少一个子指示信息,每个所述子指示信息包括:第二资源信息和/或第一信息索引,所述基于所述指示信息获取所述图形指令流,包括:
    检测所述子指示信息中的内容;
    基于检测结果,生成所述图形指令流;
    其中,所述图形指令流包括与所述至少一个子指示信息一一对应的至少一个图形指令,当任一子指示信息包括第一信息索引,与所述任一子指示信息对应的图形指令包括第一资源信息,所述第一资源信息为采用所述任一子指示信息中的第一信息索引查询资源信息与信息索引的对应关系,得到的资源信息,所述资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息;
    当任一子指示信息包括第二资源信息,与所述任一子指示信息对应的图形指令包括所述第二资源信息,所述第一资源信息的数据量大于所述第二资源信息的数据量。
  9. 根据权利要求8所述的方法,其特征在于,所述图形指令还包括应用程序编程接口API调用函数的名称,所述每个子指示信息还包括:第一函数索引,所述基于检测结果,生成所述图形指令流,包括:
    采用每个所述子指示信息中的第一函数索引查询调用函数名称与函数索引的对应关系,得到所述第一函数索引对应的API调用函数的名称;
    基于所述至少一个子指示信息中每个子指示信息对应的API调用函数的名称,生成对应的至少一个图形指令,每个所述图形指令包括与对应的子指示信息中的所述API调用函数的名称。
  10. 根据权利要求7至9任一所述的方法,其特征在于,所述接收第一终端发送的指示信息,包括:
    通过数据接收线程接收所述第一终端发送的指示信息,并将所述指示信息写入数据队列;
    通过数据读出线程从所述数据队列获取指示信息;
    其中,所述数据接收线程和所述数据读出线程并行运行。
  11. 一种数据传输装置,其特征在于,所述装置应用于第一终端,所述装置包括:
    第一生成模块,用于通过所述第一终端中运行的第一子应用程序生成图形指令流,所述第一子应用程序为可拆分的目标应用程序中可独立运行的一个子应用程序;
    第二生成模块,用于基于所述图形指令流生成指示信息,所述指示信息用于指示所述图形指令流,所述指示信息的数据量小于或等于所述图形指令流的数据量;
    第一发送模块,用于向运行有第二子应用程序的第二终端发送生成的指示信息,以供所述第二终端通过所述第二子应用程序,基于所述指示信息获取所述图形指令流,并生成图像信息,所述第二子应用程序为所述目标应用程序中可独立运行的一个子应用程序,所述第二子应用程序与所述第一子应用程序不同。
  12. 根据权利要求11所述的装置,其特征在于,所述图形指令流包括至少一个图形指令,其中,所述图形指令包括第一资源信息和/或第二资源信息,所述资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息,所述第一资源信息的数据量大于所述第二资源信息的数据量,所述第二生成模块,用于:
    检测所述至少一个图形指令中的内容;
    基于检测结果生成所述指示信息,所述指示信息包括与所述至少一个所述图形指令一一对应的至少一个子指示信息;
    其中,当任一图形指令包括所述第一资源信息,与所述任一图形指令对应的子指示信息包括第一信息索引,所述第一信息索引为采用所述任一图形指令中的第一资源信息查询资源信息与信息索引的对应关系,得到的信息索引;
    当任一图形指令包括所述第二资源信息,与所述任一图形指令对应的子指示信息包括所述第二资源信息。
  13. 根据权利要求12所述的装置,其特征在于,所述图形指令还包括应用程序编程接口API调用函数的名称,所述第二生成模块,用于:
    采用每个所述图形指令中的API调用函数的名称查询调用函数名称与函数索引的对应关系,得到所述API调用函数的名称对应的第一函数索引;
    基于查询得到的第一函数索引,生成所述指示信息,所述指示信息包括的每个所述子指示信息包括对应的图形指令的第一函数索引。
  14. 根据权利要求11至13任一所述的装置,其特征在于,所述装置还包括:
    第二发送模块,用于当检测到所述第一子应用程序处于合并运行模式,通过所述第一子 应用程序向所述第一终端中运行的第三子应用程序发送所述图形指令流,所述第三子应用程序为所述目标应用程序中可独立运行的一个子应用程序,所述第三子应用程序与所述第一子应用程序不同;
    第三生成模块,用于通过所述第三子应用程序,基于所述图形指令流,生成图像信息;
    所述第二生成模块,用于:
    当检测到所述第一子应用程序处于拆分运行模式,基于所述图形指令流生成所述指示信息。
  15. 根据权利要求14所述的装置,其特征在于,所述装置还包括:
    第一确定模块,用于在通过所述第一子应用程序接收到拆分运行指令后,确定所述第一子应用程序处于所述拆分运行模式,或者,在检测到所述第一终端中仅安装有所述目标应用程序的第一子应用程序后,确定所述第一子应用程序处于所述拆分运行模式,或者,在检测到所述第一终端中的所述第一子应用程序与所述第二终端中所述第二子应用程序的连接建立成功后,确定所述第一子应用程序处于所述拆分运行模式;
    第二确定模块,用于在通过所述第一子应用程序接收到合并运行指令后,确定所述第一子应用程序处于所述合并运行模式,或者,在检测到所述第一终端中的所述第一子应用程序与所述第二终端中所述第二子应用程序的连接建立失败,且检测到所述第一终端中安装有所述第三子应用程序后,确定所述第一子应用程序处于所述合并运行模式。
  16. 根据权利要求11至15任一所述的装置,其特征在于,所述第一发送模块,用于:
    通过数据写入线程将生成的指示信息写入数据队列;
    通过数据发送线程从所述数据队列中获取指示信息,并将获取的指示信息发送至所述运行有第二子应用程序的第二终端;
    其中,所述数据写入线程和所述数据发送线程并行运行。
  17. 一种数据传输装置,其特征在于,所述装置应用于第二终端,所述装置包括:
    接收模块,用于接收第一终端发送的指示信息,所述指示信息用于指示所述第一终端通过第一子应用程序生成的图形指令流,所述指示信息的数据量小于或等于所述图形指令流的数据量,所述第一子应用程序为所述目标应用程序中可独立运行的一个子应用程序,所述第二子应用程序为所述目标应用程序中可独立运行的一个子应用程序,所述第二子应用程序与所述第一子应用程序不同;
    获取模块,用于通过所述第二终端中运行的第二子应用程序,基于所述指示信息获取所述图形指令流;
    生成模块,用于通过所述第二子应用程序,基于获取的图形指令流,生成图像信息。
  18. 根据权利要求17所述的装置,其特征在于,所述图形指令流包括至少一个图形指令,所述指示信息包括至少一个子指示信息,每个所述子指示信息包括:第二资源信息和/或第一信息索引,所述获取模块,用于:
    检测所述子指示信息中的内容;
    基于检测结果,生成所述图形指令流;
    其中,所述图形指令流包括与所述至少一个子指示信息一一对应的至少一个图形指令,当任一子指示信息包括第一信息索引,与所述任一子指示信息对应的图形指令包括第一资源信息,所述第一资源信息为采用所述任一子指示信息中的第一信息索引查询资源信息与信息 索引的对应关系,得到的资源信息,所述资源信息为用于绘制图像帧中的绘制目标所采用的资源的信息;
    当任一子指示信息包括第二资源信息,与所述任一子指示信息对应的图形指令包括所述第二资源信息,所述第一资源信息的数据量大于所述第二资源信息的数据量。
  19. 根据权利要求18所述的装置,其特征在于,所述图形指令还包括应用程序编程接口API调用函数的名称,所述每个子指示信息还包括:第一函数索引,所述获取模块,用于:
    采用每个所述子指示信息中的第一函数索引查询调用函数名称与函数索引的对应关系,得到所述第一函数索引对应的API调用函数的名称;
    基于所述至少一个子指示信息中每个子指示信息对应的API调用函数的名称,生成对应的至少一个图形指令,每个所述图形指令包括与对应的子指示信息中的所述API调用函数的名称。
  20. 根据权利要求17至19任一所述的装置,其特征在于,所述接收模块,用于:
    通过数据接收线程接收所述第一终端发送的指示信息,并将所述指示信息写入数据队列;
    通过数据读出线程从所述数据队列获取指示信息;
    其中,所述数据接收线程和所述数据读出线程并行运行。
  21. 一种数据处理系统,其特征在于,所述数据处理系统包括第一终端和第二终端,所述第一终端包括如权利要求11至16任一所述的数据传输装置,所述第二终端包括如权利要求17至20任一所述的数据传输装置。
  22. 一种电子设备,其特征在于,所述电子设备应用于第一终端,所述电子设备包括:处理器和存储器;
    所述存储器,用于存储计算机程序,所述计算机程序包括程序指令;
    所述处理器,用于调用所述计算机程序,实现如权利要求1至6任一所述的数据传输方法。
  23. 一种电子设备,其特征在于,所述电子设备应用于第二终端,所述电子设备包括:处理器和存储器;
    所述存储器,用于存储计算机程序,所述计算机程序包括程序指令;
    所述处理器,用于调用所述计算机程序,实现如权利要求7至10任一所述的数据传输方法。
PCT/CN2021/070196 2020-01-10 2021-01-04 数据传输方法、装置及数据处理系统、存储介质 WO2021139630A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010027733.X 2020-01-10
CN202010027733.XA CN113129202B (zh) 2020-01-10 2020-01-10 数据传输方法、装置及数据处理系统、存储介质

Publications (1)

Publication Number Publication Date
WO2021139630A1 true WO2021139630A1 (zh) 2021-07-15

Family

ID=76771561

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/070196 WO2021139630A1 (zh) 2020-01-10 2021-01-04 数据传输方法、装置及数据处理系统、存储介质

Country Status (2)

Country Link
CN (1) CN113129202B (zh)
WO (1) WO2021139630A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114296816A (zh) * 2021-12-16 2022-04-08 珠海豹趣科技有限公司 一种稳定运行的Windows系统主题的更改方法及装置
CN114443189A (zh) * 2021-08-20 2022-05-06 荣耀终端有限公司 一种图像处理方法和电子设备
CN115278591A (zh) * 2022-05-19 2022-11-01 深圳市航盛电子股份有限公司 投屏传输方法、装置、终端设备以及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721876A (zh) * 2021-09-06 2021-11-30 维沃移动通信有限公司 投屏处理方法及相关设备
CN117909071A (zh) * 2023-05-29 2024-04-19 荣耀终端有限公司 图像显示方法、电子设备、存储介质和芯片系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8355585B2 (en) * 2009-05-12 2013-01-15 Red Hat Israel, Ltd. Data compression of images using a shared dictionary
CN105917382A (zh) * 2014-01-21 2016-08-31 艾丽卡滑翔有限公司 用于交互式图形流传输的方法和系统
CN108323236A (zh) * 2016-12-27 2018-07-24 华为技术有限公司 一种交互方法和终端

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2804094A1 (en) * 2013-05-13 2014-11-19 2236008 Ontario Inc. A system and method for forwarding a graphics command stream
CN109218731B (zh) * 2017-06-30 2021-06-01 腾讯科技(深圳)有限公司 移动设备的投屏方法、装置及系统
CN109448709A (zh) * 2018-10-16 2019-03-08 华为技术有限公司 一种终端投屏的控制方法和终端
CN110083324A (zh) * 2019-04-30 2019-08-02 华为技术有限公司 图像绘制的方法、装置、电子设备及计算机存储介质
CN110138769B (zh) * 2019-05-09 2021-06-15 深圳市腾讯网域计算机网络有限公司 一种图像传输的方法以及相关装置
CN112968991B (zh) * 2019-06-20 2022-07-29 华为技术有限公司 一种输入方法、电子设备和投屏系统
CN110392047A (zh) * 2019-07-02 2019-10-29 华为技术有限公司 数据传输方法、装置及设备
CN110381345B (zh) * 2019-07-05 2020-12-15 华为技术有限公司 一种投屏显示方法及电子设备
CN110493756B (zh) * 2019-07-26 2022-08-02 维沃移动通信有限公司 投屏方法及5g终端
CN110597474B (zh) * 2019-09-12 2022-03-25 联想(北京)有限公司 信息处理方法及电子设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8355585B2 (en) * 2009-05-12 2013-01-15 Red Hat Israel, Ltd. Data compression of images using a shared dictionary
CN105917382A (zh) * 2014-01-21 2016-08-31 艾丽卡滑翔有限公司 用于交互式图形流传输的方法和系统
CN108323236A (zh) * 2016-12-27 2018-07-24 华为技术有限公司 一种交互方法和终端

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443189A (zh) * 2021-08-20 2022-05-06 荣耀终端有限公司 一种图像处理方法和电子设备
CN114296816A (zh) * 2021-12-16 2022-04-08 珠海豹趣科技有限公司 一种稳定运行的Windows系统主题的更改方法及装置
CN114296816B (zh) * 2021-12-16 2024-05-31 珠海豹趣科技有限公司 一种稳定运行的Windows系统主题的更改方法及装置
CN115278591A (zh) * 2022-05-19 2022-11-01 深圳市航盛电子股份有限公司 投屏传输方法、装置、终端设备以及存储介质

Also Published As

Publication number Publication date
CN113129202B (zh) 2023-05-09
CN113129202A (zh) 2021-07-16

Similar Documents

Publication Publication Date Title
WO2021175213A1 (zh) 刷新率切换方法和电子设备
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
WO2021139630A1 (zh) 数据传输方法、装置及数据处理系统、存储介质
WO2021000807A1 (zh) 一种应用程序中等待场景的处理方法和装置
CN115473957B (zh) 一种图像处理方法和电子设备
CN113885759B (zh) 通知消息处理方法、设备、系统及计算机可读存储介质
WO2020014880A1 (zh) 一种多屏互动方法及设备
WO2020191685A1 (zh) 一种应用于终端的频率调整方法、装置及电子设备
CN113923230B (zh) 数据同步方法、电子设备和计算机可读存储介质
WO2021023035A1 (zh) 一种镜头切换方法及装置
US20230216990A1 (en) Device Interaction Method and Electronic Device
US20230021994A1 (en) Cross-Device Content Projection Method and Electronic Device
WO2021190344A1 (zh) 多屏幕显示电子设备和电子设备的多屏幕显示方法
WO2020173394A1 (zh) 一种录像帧率的控制方法及相关装置
WO2021083128A1 (zh) 一种声音处理方法及其装置
WO2022257474A1 (zh) 图像的预测方法、电子设备和存储介质
WO2022222924A1 (zh) 一种投屏显示参数调节方法
CN114079893A (zh) 蓝牙通信方法、终端设备及计算机可读存储介质
WO2022042637A1 (zh) 一种蓝牙数据传输方法及相关装置
WO2023179123A1 (zh) 蓝牙音频播放方法、电子设备及存储介质
CN115756268A (zh) 跨设备交互的方法、装置、投屏系统及终端
CN110636554A (zh) 数据传输方法及装置
WO2021052388A1 (zh) 一种视频通信方法及视频通信装置
US20230335081A1 (en) Display Synchronization Method, Electronic Device, and Readable Storage Medium
WO2022111529A1 (zh) 一种应用程序的调试方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21738325

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21738325

Country of ref document: EP

Kind code of ref document: A1