Data processing method and apparatus, device, computer-readable storage medium, and computer program product
By enabling real-time preview across devices through WebSocket and WebRTC protocols, the problem of cumbersome and time-consuming game integration testing process is solved, improving development efficiency and resource utilization.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2025-10-31
- Publication Date
- 2026-06-25
AI Technical Summary
In existing technologies, the integration and testing process of games on application platforms is cumbersome and time-consuming, resulting in low development efficiency.
A connection is established between the first and second devices using WebSocket and WebRTC protocols. The second device generates and sends application media content to the first device. The first device simulates the trigger operation and calls the business function, enabling real-time preview without converting the application to be integrated into a business application mini-program.
It reduced the operating load of the equipment, improved the utilization of hardware resources, shortened the development iteration time, and improved development efficiency.
Smart Images

Figure CN2025131782_25062026_PF_FP_ABST
Abstract
Description
Data processing methods, apparatus, equipment, computer-readable storage media, and computer program products
[0001] Cross-reference to related applications
[0002] This application is based on and claims priority to Chinese Patent Application No. 2024118920562, filed on December 19, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, computer-readable storage medium, and computer program product. Background Technology
[0004] To improve the game's portability and ease of use, the developers chose to develop an embedded application integrated into the application platform. Developers need to export the game from the development environment and adapt it to the specific application platform to ensure smooth operation. To provide deep integration between the game and the application platform's business functions, features such as social sharing and payment need to be implemented using the application platform's Software Development Kit (SDK).
[0005] In existing technologies, in order to test the integration effect and output performance of a game on an application platform, it is necessary to build the game in the development environment into code that can run on the application platform through the adaptation components before testing and previewing can be performed. This process is not only cumbersome but also time-consuming, reducing development efficiency. Summary of the Invention
[0006] This application provides a data processing method, apparatus, device, computer-readable storage medium, and computer program product, which can reduce the operating load of the device and improve the resource utilization of the device.
[0007] One embodiment of this application provides a data processing method, which is executed by a first device and includes:
[0008] The first device responds to the preview operation for the application to be integrated and displays the preview page of the application to be integrated in the business application; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed.
[0009] The preview page displays the application media content sent by the second device; the application media content is generated when the second device runs the application to be integrated.
[0010] In response to a trigger action on the preview page, the trigger information of the trigger action is sent to the second device;
[0011] If the second device detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the business content corresponding to the business function will be output in the preview page; the business content is the content obtained by the first device after executing the business function through the business application.
[0012] This application provides another data processing method, which is executed by a second device and includes:
[0013] The second device displays data connection information; the data connection information is used to instruct the first device to establish a device connection relationship with the second device.
[0014] If a device connection has been established with the first device, the application to be integrated is run in the application development platform, and the application media content of the running application to be integrated is sent to the first device so that the first device displays the preview page of the application to be integrated in the business application and outputs the application media content in the preview page; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed; the business application is the application in the first device;
[0015] Obtain the trigger information sent by the first device for the trigger operation on the preview page;
[0016] If the trigger information is detected to be associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the first device is notified to execute the business function through the business application; the preview page is also used to display the business content obtained after the first device executes the business function through the business application.
[0017] One embodiment of this application provides a data processing apparatus, which is applied to a first device. The data processing apparatus includes:
[0018] The preview page display module is configured to respond to preview operations for the application to be integrated and display the preview page of the application to be integrated in the business application; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed;
[0019] The media content output module is configured to output application media content sent by the second device to the preview page; the application media content is generated when the second device runs the application to be integrated.
[0020] The trigger processing module is configured to respond to trigger operations on the preview page and send the trigger information of the trigger operation to the second device;
[0021] The business function processing module is configured to output the business content corresponding to the business function in the preview page if the second device detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated; the business content is the content obtained by the first device after executing the business function through the business application.
[0022] One embodiment of this application provides another data processing apparatus, which is applied to a second device, and the data processing apparatus includes:
[0023] The data connection information display module is configured to display data connection information; the data connection information is used to instruct the first device to establish a device connection relationship with the second device.
[0024] The media content sending module is configured to, if a device connection has been established with the first device, run the application to be integrated in the application development platform and send the application media content of the running application to be integrated to the first device, so that the first device displays a preview page of the application to be integrated in the business application and outputs the application media content in the preview page; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed; the business application is the application in the first device;
[0025] The trigger information acquisition module is configured to acquire trigger information sent by the first device for triggering operations on the preview page;
[0026] The interface information processing module is configured to notify the first device to execute the business function through the business application if it detects that the trigger information is associated with the first control and the first control is a control used to call the business function of the business application in the application to be integrated; the preview page is also used to display the business content obtained by the first device after executing the business function through the business application.
[0027] One embodiment of this application provides a computer device, including: a processor, a memory, and a network interface;
[0028] The processor is connected to a memory and a network interface. The network interface is configured to provide data communication functions, and the memory is configured to store computer programs. When the computer program is executed by the processor, the computer device performs the method provided in the embodiments of this application.
[0029] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided in this application.
[0030] One embodiment of this application provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method provided in this application embodiment.
[0031] This application embodiment generates application media content by running the application to be integrated on a second device and sending the application media content to the first device. This eliminates the need for the first device to run the code of the application to be integrated itself. During preview, there is no need to convert the application to be integrated into a mini-program within the business application. The output performance of the application to be integrated in relation to the application media content within the business application can be previewed in real-time on the preview interface. This reduces the load on the first device to parse and run the complete application code, improving hardware resource utilization. By sending the trigger information corresponding to the trigger operation in the first device to the second device, the second device detects the controls associated with the trigger information in the application to be integrated, thereby simulating the interaction process between the trigger operation and the controls. Since the first device itself can run the business application, it can execute business functions through the business application and display them on the preview page. This eliminates the need to convert the application to be integrated into a mini-program within the business application, allowing for real-time preview of the integration effect of the application to be integrated in relation to business functions within the business application. This reduces the device's operating load, improves device resource utilization, and accelerates development iteration efficiency. Attached Figure Description
[0032] Figure 1 is a schematic diagram of a network architecture provided in an embodiment of this application;
[0033] Figure 2 is a schematic diagram of a data processing scenario provided in an embodiment of this application;
[0034] Figure 3 is a schematic flowchart of a data processing method provided in an embodiment of this application;
[0035] Figure 4 is a schematic diagram of a data processing scenario provided in an embodiment of this application;
[0036] Figure 5 is a schematic flowchart of a data processing method provided in an embodiment of this application;
[0037] Figure 6 is a schematic diagram of a data processing scenario provided in an embodiment of this application;
[0038] Figure 7 is a schematic flowchart of a data processing method provided in an embodiment of this application;
[0039] Figure 8 is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0040] Figure 9 is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0041] Figure 10 is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0043] Please refer to Figure 1, which is a schematic diagram of a network architecture provided in an embodiment of this application. As shown in Figure 1, the network architecture may include a first device 100 and a second device 200. There may be a communication connection between the first device 100 and the second device 200. The communication connection is not limited to a specific method. It may be directly or indirectly connected via wired communication, or directly or indirectly connected via wireless communication, or through other methods. This embodiment of the application does not impose any limitations on this.
[0044] Both the first device 100 and the second device 200 can include: smartphones, tablets, laptops, desktop computers, intelligent voice interaction devices, smart home appliances (e.g., smart TVs), wearable devices, vehicle terminals, aircraft, and other intelligent terminals with data processing capabilities. The vehicle terminal can be a terminal device for intelligent transportation scenarios and assisted driving scenarios.
[0045] As shown in Figure 1, the user can develop and test the application to be integrated on the application development platform of the second device 200. Once the application development is complete, it can be converted into a mini-program that can be integrated into business applications. The application development platform can include cross-platform game development engines such as Unity, Unreal Engine, Cocos Engine, and Laya Engine. Business applications can include: in-vehicle clients, smart home clients, entertainment clients (e.g., game clients), multimedia clients (e.g., video clients), social clients, and information clients (e.g., news clients). A mini-program can be a lightweight application packaged in a specific client, which can run on the integrated client without downloading or installing. Mini-programs can include mini-games; mini-games are small in size, load quickly, and are suitable for rapid startup and play.
[0046] To test the integration effect and output performance of the application to be integrated in the business application, a business server can be established on the second device 200. The business server can be a virtual server deployed on the second device 200. Optionally, the business server can be an independent physical server, or any server that can be jointly connected to by both the first device 100 and the second device 200. This embodiment of the application does not impose any restrictions here.
[0047] The second device 200 can generate data connection information for connecting to the business server. The first device 100 can establish a device connection relationship with the second device 200 through the aforementioned data connection information in the business application. After establishing the device connection relationship, the first device 100 can enter the preview page of the application to be integrated. The device connection relationship can refer to a WebSocket connection relationship; WebSocket is a bidirectional network communication protocol. The data connection information can refer to communication information (IP (Internet Protocol) address and port number) or a QR code containing such communication information. A QR code containing the aforementioned communication information can also be referred to as the mini-program code corresponding to the application to be integrated.
[0048] Based on the aforementioned device connectivity, the first device 100 can send terminal initialization information to the second device 200. This terminal initialization information may include device information, such as the device model and screen size of the first device 100. The second device 200 uses the received terminal initialization information to adapt the output performance of the application to be integrated on the first device 100, generating a preview output format. The second device 200 can also send host initialization information to the first device 100. This host initialization information may include a connection ID and the preview output format of the application to be integrated on the first device 100.
[0049] The first device 100 can establish a media content connection with the second device based on the connection ID in the received host initialization information. This media content connection can be a WebRTC (Web Real-Time Communication) connection, which is a real-time peer-to-peer network communication protocol.
[0050] The second device 200 can record media content of the application to be integrated running in the application development platform based on the preview output format, and obtain application media content. The second device 200 can send the application media content to the first device 100 for preview testing through the above-mentioned media content connection relationship. The specific implementation process of the preview test can be found in the specific content of the embodiment corresponding to Figure 2 below.
[0051] This application embodiment establishes a device connection between a first device and a second device through the WebSocket protocol. A business server established through the WebSocket protocol provides a signaling channel between the first and second devices, thereby enabling the establishment of a media content connection between them via the WebRTC protocol. This allows for the transmission of application media content and WebRTC control information (such as trigger information and interface information mentioned below). The WebRTC technology achieves efficient data synchronization, reducing the overall latency of previewing the application to be integrated in the business application. The second device can send application media content to the first device for preview testing through the aforementioned media content connection. The application media content can be output on the preview page of the first device without the first device running the code of the application to be integrated. Therefore, during previewing, there is no need to convert the application to be integrated into a mini-program within the business application; the output performance of the application to be integrated in the business application for application media content can be previewed in real time, helping developers quickly preview the actual effect of the application to be integrated on the first device.
[0052] Please refer to Figure 2, which is a schematic diagram of a data processing scenario provided in an embodiment of this application. As shown in Figure 2, the object (user) can develop and test the application to be integrated in the application development platform of the second device 200. When the application to be integrated is developed, it can be converted into a mini-program that can be integrated into the business application. The application development platform can be the Unity engine, the application to be integrated can be Unity content (Unity project), and the mini-program can be a lightweight application packaged in a specific client, which can run on the integrated client without downloading and installing. The mini-program can include mini-games; mini-games are small in size, load quickly, and are suitable for quick startup and play.
[0053] To test the integration effect and output performance of the application to be integrated in the business application, a business server can be established on the second device 200. The business server can be a virtual server deployed on the second device 200. Optionally, the business server can be an independent physical server, or any server that can be jointly connected to by both the first device 100 and the second device 200. This embodiment of the application does not impose any restrictions. The business server established via the WebSocket protocol provides a signaling channel between the first device and the second device.
[0054] The second device 200 can generate data connection information for connecting to the business server. As shown on page 201, the data connection information can be displayed in the application development platform. The data connection information can refer to communication information (IP address and port number) or a QR code containing the communication information. For example, the IP address can be "AAAAA" and the port number can be "BBBBB".
[0055] As shown on page 101a, the object can establish a device connection with the second device 200 by recognizing a QR code through a business application on the first device, such as scanning the mini-program code displayed on page 201. Alternatively, as shown on page 101b, the object can launch a preview mini-program in the business application and enter the IP address and port number displayed on page 201 in input window A of the preview mini-program on page 101b to establish a device connection with the second device 200. The preview mini-program can be a pre-integrated mini-program in the business application, used to establish a device connection with the second device 200 by entering the IP address and port number. The preview mini-program can be a local area network video player that supports interaction with the second device. The device connection can refer to a WebSocket connection; WebSocket is a bidirectional network communication protocol.
[0056] Based on the aforementioned device connection relationship, the first device 100 can establish a media content connection relationship with the second device. This media content connection relationship can be a WebRTC connection relationship; WebRTC is a real-time peer-to-peer network communication protocol. The second device 200 can run the application to be integrated in the application development platform. The output content of the application running can be shown on page 202. The second device 200 can record media content from the application running in the application development platform, obtaining application media content. This application media content is then sent to the first device 100 through the aforementioned media content connection relationship. The first device 100 can then output the application media content sent by the second device on a preview page using the aforementioned preview applet. The output effect of the application media content on the preview page can be shown on page 102. The application media content can be data containing both audio and video.
[0057] Page 102 may include the display screen corresponding to the first control B and the display screen corresponding to the second control C. The first device 100 may respond to the trigger operation of the object on the preview page, determine the clicked position of the object as the trigger information of the trigger operation, and send the trigger information of the trigger operation to the second device 200 through the media content connection relationship.
[0058] Taking the association between the clicked location of an object and the display screen corresponding to the first control B as an example, if the second device 200 detects that the trigger information is associated with the first control B, and the first control B is a control used to call the business function of the business application in the application to be integrated, then the second device 200 can obtain the interface information corresponding to the business function in the application to be integrated through the trigger information, and send the interface information to the first device 100 through the signaling connection established by the aforementioned business server. The business function could be, for example, sharing the currently displayed page to the business application. The interface information could be an API (Application Programming Interface) used to call the business function.
[0059] The first device 100 can use this interface information to call the aforementioned business functions in the business application, execute the business functions, obtain the business content, and output the corresponding business content in the preview page. The output effect of the business content in the preview page can be shown in the sharing window D on page 103a.
[0060] It is understood that the application development platform does not need to integrate business applications. The second device 200 can directly obtain the interface information corresponding to the business function in the application to be integrated, without running the business application on the application development platform. Therefore, after the object clicks the display screen corresponding to the first control B on the first device 100, the output content of the application to be integrated running on the second device 200 can be as shown on page 203a, and the output content of page 203a can be the same as the output content of page 202. This application embodiment does not limit whether the application development platform can integrate business applications or whether business content is output in the application development platform.
[0061] Taking the association between the clicked object location and the display screen corresponding to the second control C as an example, if the second device 200 detects that the trigger information is associated with the second control C, and the second control C is a control used in the application to be integrated to call the function to be integrated, then as shown on page 203b, the second device 200 can execute the function to be integrated corresponding to the second control C in the application to be integrated through the trigger information. The function to be integrated could be moving the vehicle upwards in the application to be integrated.
[0062] The second device 200 can continue recording media content for the application to be integrated after executing the integrated function, obtaining updated media content. The second device 200 can send the updated application media content to the first device 100 through the aforementioned media content connection relationship. The first device 100 can output the updated application media content corresponding to the integrated function sent by the second device 200 in the preview page. The output effect of the updated application media content in the preview page can be shown on page 103b.
[0063] This application embodiment utilizes WebRTC technology to directly establish point-to-point communication between the first device and the second device running the application to be integrated. The application media content generated by the application running on the second device is sent to the first device, and this content can be output on the first device's preview page without the first device running the application's code. Therefore, during previewing, there's no need to convert the application to be integrated into a mini-program within the business application; the application's output behavior for the application media content can be previewed in real-time within the business application. Furthermore, the trigger information corresponding to the first device's trigger operation is returned to the second device for simulated input. This allows the application to obtain interface information corresponding to the business function, send this interface information to the first device, call the business function through the interface information, execute the business function through the business application, obtain the business content, and output the corresponding business content on the preview page. Therefore, there's no need to convert the application to be integrated into a mini-program within the business application; the integration effect of the application to be integrated within the business application can be previewed in real-time, efficiently achieving the integration preview effect of the application to be integrated within the business application. WebRTC technology provides a low-latency, high-quality real-time interactive experience. Developers can directly verify the interactivity and functionality of the application to be integrated during the preview process, enabling them to iterate and optimize the code more quickly. In game development scenarios, this embodiment can flexibly adapt to different types of Unity mini-game projects, supporting multiple configuration options to meet the needs of different developers. This adaptability allows the tool to be widely used in various game development scenarios, enhancing its market competitiveness.
[0064] Please refer to Figure 3, which is a schematic flowchart of a data processing method provided in an embodiment of this application. This data processing method can be executed by a first device, which can be the first device 100 shown in Figure 1. The following description will use the execution of this data processing method by the first device as an example. The data processing method may include at least the following steps S101-S106:
[0065] Step S101: The first device responds to the preview operation for the application to be integrated and displays the preview page of the application to be integrated in the business application.
[0066] In some embodiments, the user can develop and test the application to be integrated on an application development platform on a second device. The application to be integrated is used to convert into a mini-program that can be integrated into the business application upon completion of its development. The application development platform may include cross-platform game development engines such as Unity, Unreal Engine, Cocos Engine, and Laya Engine. Business applications may include: in-vehicle clients, smart home clients, entertainment clients (e.g., game clients), multimedia clients (e.g., video clients), social clients, and information clients (e.g., news clients). A mini-program can be a lightweight application packaged in a specific client, which can run on the integrated client without downloading and installing. Mini-programs may include mini-games; mini-games are small in size, load quickly, and are suitable for quick startup and play. The application platform of the application to be integrated differs from that of the business application. For example, the application development platform may be the Unity engine, the application to be integrated may be Unity content (a Unity project), and the business application may be an application that has been converted to be compatible with the Android operating system and may be an application installed on the first device.
[0067] Among them, the application to be integrated refers to a third-party application that is under development and has not yet been integrated into the business application. After the application to be integrated is developed, it can be converted into a mini-program that runs in the business application. During the development process of the application to be integrated, it needs to be run through a second device (development device) to generate real-time application media content, such as interface screen and functional interaction effects, to verify the compatibility, functional completeness and user experience of the application to be integrated in the business application environment.
[0068] It should be noted that the first device and the second device mentioned in the embodiments of this application both refer to computer devices.
[0069] To test the integration effect and output performance of the application to be integrated in the business application, a business server can be established on the second device. The business server can be a virtual server deployed on the second device, or optionally, it can be an independent physical server, or any server that can be connected to by both the first and second devices. This embodiment of the application does not impose any restrictions. The business server established via the WebSocket protocol provides a signaling channel between the first and second devices.
[0070] The second device can generate data connection information for connecting to the service server. The first device can obtain the data connection information through a preview operation, and then establish a device connection relationship with the second device through the data connection information. The data connection information can refer to communication information (IP address and port number) or a QR code containing such communication information; the QR code containing the aforementioned communication information can also be called the mini-program code corresponding to the application to be integrated. The device connection relationship can refer to a WebSocket connection relationship; WebSocket is a bidirectional network communication protocol.
[0071] Please also refer to Figure 4, which is a schematic diagram of a data processing scenario provided in an embodiment of this application. As shown in Figure 4, the first device can respond to a preview operation for the application to be integrated, and establish a device connection with the second device through this preview operation. As shown on page 301, the first device can respond to a QR code scanning operation for the business application. If the first device detects that the application code obtained by the QR code scanning operation is associated with the application to be integrated, then the preview page of the application to be integrated is displayed in the business application. Here, the application code is a QR code containing the aforementioned communication information, and the application code is generated and displayed by the second device running the application to be integrated.
[0072] In this way, the first device displays a preview page based on the correlation between the application code generated by the second device and the application to be integrated, through the scanning operation of the business application. This simplifies the device connection process and improves the efficiency of cross-device data connection. At the same time, correlation verification avoids the accidental access of unrelated devices or applications, improving the accuracy and security of interaction. Furthermore, launching the preview page directly within the business application reduces the resource consumption caused by process switching, improves device resource utilization, and ensures the consistency between the preview environment and the final running environment of the application to be integrated. This reduces preview deviations caused by environmental differences and enhances the reliability of the preview function.
[0073] The first device can also respond to the startup operation and display an initial connection page in the business application. This initial connection page can be a preview mini-program, also known as a preview box, which is a mini-program pre-integrated into the business application. It is used to establish a device connection with the second device by inputting an IP address and port number. The initial connection page can be as shown on page 302. The first device can respond to input operations on the initial connection page. If the input information obtained by the input operation matches the corresponding communication information of the second device, then a preview page of the application to be integrated is displayed in the business application. The communication information is generated by the second device and is used to establish a device connection with the second device.
[0074] In this way, by matching and verifying the input information with the communication information, the accuracy of the device connection is ensured and erroneous connections are avoided; and the connection process is completed within the business application, reducing the resource consumption of switching across applications, while enhancing the adaptability to complex network environments and improving the applicability and reliability of the preview function.
[0075] In actual implementation, the first device's business application enables Near Field Communication (NFC) and responds to a NFC touch operation with the second device. It reads the connection information stored in the second device's NFC module, such as the IP address, and initiates a network connection with the second device based on the read connection information, displaying a preview page of the application to be integrated in the business application; or the business application scans for Bluetooth signals broadcast by the second device that contain the identifier of the application to be integrated, responds to a selection operation for the target signal, parses the connection information in the Bluetooth signal, and establishes a connection based on the connection information, displaying a preview page of the application to be integrated in the business application; or the business application has a preset list of associated applications to be integrated, and responds to a selection operation for a target application based on the list, automatically calls the locally stored connection information of the second device corresponding to the target application, establishes a connection based on the connection information, and displays a preview page of the application to be integrated in the business application.
[0076] The process of establishing a device connection between the first device and the second device can be as follows: obtaining data connection information based on the preview operation of the application to be integrated; establishing a device connection relationship with the second device through the data connection information; sending the device information of the first device to the second device through the device connection relationship; the device information is used to instruct the second device to generate application media content that matches the device information.
[0077] In this way, by obtaining data connection information and establishing device connection based on the preview operation, and sending the device information of the first device to the second device, the accuracy and stability of the device connection can be ensured, and invalid connections can be avoided from consuming resources. The second device generates matching application media content based on the device information, which can reduce display abnormalities or performance loss caused by the mismatch between content and device characteristics, improve the adaptability of application media content, enhance the smoothness and display effect of the preview screen, and improve the targeting and efficiency of cross-device data interaction.
[0078] In some embodiments, the first device can obtain data connection information based on a preview operation of the application to be integrated, establish a device connection relationship with the second device through the data connection information, and send its device information to the second device through the device connection relationship. The second device can then adapt the output performance of the application to be integrated on the first device based on the received device information. The device information may include the device model and screen size of the first device, etc. The device information is used to instruct the second device to generate application media content that matches the device information.
[0079] It is understood that pages 302 and 303 are both pages within a preview mini-program. The preview mini-program can be used to establish a device connection with the second device and to output application media content sent by the second device. The preview mini-program can be a local area network video player that supports interaction with the second device, and the page displaying the application media content output by the preview mini-program is also the preview page. That is, the preview mini-program is responsible for outputting the application media content of the application to be integrated, but does not execute the application logic of the application itself. Therefore, the application to be integrated, which previews the integration effect through the preview mini-program, does not need to be converted into a mini-program within the business application. The preview mini-program can be a mini-program pre-integrated into the business application, or it can be a functional component of the business application; this embodiment does not impose any limitations here.
[0080] It should be noted that the preview interface of the application to be integrated is an interactive page used in the business application to display the real-time running status of the application to be integrated, and it is the core carrier for data interaction between the first device and the second device. The preview interface can not only output the application media content transmitted by the second device, such as the interface and animations of the application to be integrated, but also receive user trigger operations on the interface and feed back the operation information to the second device; at the same time, when the application to be integrated calls the business function of the business application, the preview interface will synchronously display the execution result of the business function, realizing real-time preview and functional verification during the development phase.
[0081] Step S102: Output the application media content sent by the second device to the preview page; the application media content is generated when the second device runs the application to be integrated;
[0082] In some embodiments, as shown in Figure 4, the second device can adapt the output performance of the application to be integrated on the first device using device information, generating a preview output format that includes format parameters matching the device information. The preview output format and user configuration information are determined as host initialization information. The user configuration information may include whether to display trigger feedback prompts, whether the preview page displays the frame rate of the output media content, etc. The second device can send the host initialization information to the first device. The host initialization information may include user configuration information, connection ID, and the preview output format of the application to be integrated on the first device. The first device can establish a media content connection relationship with the second device based on the connection ID in the received host initialization information. This media content connection relationship can be a WebRTC connection relationship; WebRTC is a real-time peer-to-peer network communication protocol.
[0083] It should be noted that device information refers to the hardware and operating environment parameters of the first device, such as screen size, operating system version, and application version, to ensure that the application media content generated by the second device matches the operating capabilities of the first device. The preview output format is a set of application media content parameters determined by the second device based on the information from the first device, including video frame rate, resolution, and audio encoding, used to standardize the format of the application media content so that it can be displayed appropriately on the preview page of the first device. User configuration information consists of personalized parameters set by the developer or user, such as whether to display trigger feedback and preview frame rate, used to customize the display effects and interactive details of the preview page to meet different preview needs.
[0084] In a WebRTC connection, the service server can act as a relay server for relaying WebRTC control information between the first and second devices. The relay server can simultaneously function as a signaling server and a session server (Stun Server, Session Traversal Utilities for NAT Server). In this case, the first device can be Peer A (Client A) in the WebRTC connection, and the second device can be Peer B (Client B). The session server helps both the first and second devices discover their public IP addresses and ports within the NAT (Network Address Translation) environment.
[0085] It should be noted that Peer A (Client A) is one of the peer-to-peer communication endpoints in the WebRTC peer-to-peer communication architecture, and is a client device participating in real-time interaction. Peer A and the other endpoint (Peer B) are equal in status, establishing a connection through signaling interaction. Peer A is primarily responsible for receiving or sending multimedia data and is one of the core participants in realizing WebRTC real-time communication. It can flexibly act as a data receiver, sender, or bidirectional interaction endpoint. Peer B (Client B) is the other peer-to-peer communication endpoint corresponding to Peer A in the WebRTC peer-to-peer communication architecture, and is also a client device participating in real-time interaction. Peer B follows the same communication protocol specifications as Peer A. By exchanging session parameters and network connection information with Peer A, it establishes a direct media transmission link, undertaking the tasks of sending, receiving, or bidirectionally transmitting multimedia data. Together with Peer A, Peer B constitutes the two main ends of WebRTC real-time communication.
[0086] The second device can create a Peer object (Peer Connection) for application media content. The Peer object can include video and audio tracks. The application media content is added to the Peer object, generating session description information (Offer SDP, Offer Session Description Protocol) for the Peer object. This Offer SDP is sent to the first device via a relay server. The second device can generate corresponding session response information (Answer SDP) for the session description information and return the Answer SDP to the first device via the relay server. SDP is a protocol used to describe multimedia sessions and exchange parameters between communicating parties. The first device can generate corresponding ICE candidate information (Interactive Connectivity Establishment Candidate) using the Answer SDP, and the second device can generate corresponding ICE candidate information using the Offer SDP. The ICE candidate information is used to establish a peer-to-peer connection in NAT (Network Address Translation). The first and second devices can exchange ICE candidate information again via the relay server to establish a media content connection relationship, initiating communication and interaction with Peer objects based on this media content connection relationship.
[0087] The Peer object (Peer Connection) is the core logical object in the WebRTC protocol used to establish and manage peer-to-peer media connections, and is a key carrier for realizing real-time audio and video transmission. The Peer object can encapsulate multimedia tracks to be transmitted (such as video and audio tracks), supports the generation and parsing of Session Description Information (SDP) to negotiate media transmission parameters, participates in the processing of ICE candidate information to achieve NAT traversal, maintains connection state, manages the transmission and interruption of media streams, and provides a stable peer-to-peer multimedia data interaction channel for both ends of the device.
[0088] The second device can record media content from the application to be integrated running on the application development platform based on the preview output format, obtaining application media content in the preview output format. This application media content can be data containing both audio and video. The application media content is then sent to the first device through the aforementioned media content connection relationships. The first device can output the application media content sent by the second device on the preview page. The output effect of the application media content on the preview page can be as shown on page 303.
[0089] The application media content on page 303 may include a rotation control E, a jump control, a forwarding control, a virtual payment control F, and a subscription message control corresponding to the application to be integrated. The rotation control E and the jump control indicate functions within the application to be integrated; for example, the rotation control E rotates the display screen of the application to be integrated, and the jump control jumps to other pages within the application. The forwarding control, the virtual payment control F, and the subscription message control all indicate functions that invoke functions within the business application; for example, the forwarding control forwards the currently displayed page to the business application, the virtual payment control F launches a payment window in the business application for virtual payment, and the subscription message control subscribes to message notifications from the application to be integrated within the business application.
[0090] Thus, establishing media content connections based on point-to-point real-time communication protocols reduces intermediate forwarding steps in data transmission, lowers transmission latency of application media content, and improves real-time performance. Recording media content for integration into applications using preview output formats ensures compatibility between the content format and the first device, avoiding display anomalies or performance degradation due to format incompatibility and improving content display adaptability. Sending content through media content connections enhances the stability and relevance of data transmission, reduces bandwidth consumption by invalid data, and improves the efficiency of cross-device data interaction.
[0091] Step S103: In response to the trigger operation for the preview page, the trigger feedback information corresponding to the trigger operation is displayed in the trigger information of the trigger operation; the trigger feedback information is used to indicate the position of the trigger operation performed by the object on the screen of the first device.
[0092] In some embodiments, as shown in FIG4, the first device can respond to a trigger operation by an object on a preview page, determine the location clicked by the object on the preview page as the trigger information of the trigger operation, and the first device can display trigger feedback information corresponding to the trigger operation in the trigger information. As shown on page 304, when the object clicks the rotation control E, the first device can display trigger feedback information G. As shown on page 305, when the object clicks the virtual payment control E, the first device can display trigger feedback information H. The trigger feedback information is used to indicate the location of the trigger operation performed by the object on the screen of the first device.
[0093] Among them, the trigger feedback information is a dynamic identifier displayed on the screen in real time after the first device detects a trigger operation on the preview page. It can be a semi-transparent dot or a short trajectory line. The display position of the trigger feedback information corresponds to the screen position where the object performs the trigger operation. It is used to intuitively indicate that the operation has been captured by the device, help the object confirm the validity of the operation and the specific interaction position, and improve the operation perception and interaction accuracy during the preview process.
[0094] Step S104: Respond to the trigger operation for the preview page, obtain the M preview page frames corresponding to the trigger operation, and obtain the interaction positions corresponding to the M preview page frames respectively; M is a positive integer, and the preview page frame is the screen information output by the preview page at different times; generate the trigger information of the trigger operation based on the M interaction positions, and send the trigger information of the trigger operation to the second device.
[0095] In some embodiments, the triggering operation can be an operation actively triggered by an object or an operation automatically triggered by a business application. Operations actively triggered by an object can include click operations, swipe operations, or long-press operations. Operations automatically triggered by a business application can include save operations (e.g., automatically triggering the saving of obtained APIs every minute) and pop-up operations (e.g., triggering a pop-up notification object when the network environment changes). Taking a swipe operation as an example, the first device can acquire M preview page frames corresponding to the triggering operation. These preview page frames represent the screen information output by the preview page at different times, and the time range of the M preview page frames is the duration of the triggering operation. The first device can acquire the interaction positions corresponding to the M preview page frames and generate trigger information for the triggering operation based on these M interaction positions. For example, it can construct the corresponding TouchEvents in the image container (canvas) of the M preview page frames into a Touch structure conforming to the input format of a Unity project to obtain the trigger information. The trigger information for the triggering operation is then sent to the second device. The sending of application media content and the return of trigger information can be asynchronous, meaning that the second device's sending of application media content and receiving of trigger information are not bound together.
[0096] In practice, the first device collects preview page frames through a screen refresh synchronization mechanism. The sampling frequency (the frequency at which preview page frames are collected) is consistent with the refresh rate of the preview page (e.g., 30fps or 60fps), that is, one frame is collected every 1 / 30th or 1 / 60th of a second. The specific value of M is determined by the duration of the triggering operation: for example, a click operation lasts about 0.2 seconds, corresponding to M=6 (at 30fps); a swipe operation lasts 1 second, corresponding to M=30. During collection, the generation time of each frame is marked with a timestamp to ensure the temporal continuity of subsequent coordinate sequences.
[0097] The second device can establish a screen display coordinate system based on the screen display information of the application to be integrated running on the application development platform, such as the screen display size. It generates coordinate deviation coefficients based on device information and screen display information, and maps the trigger information to the screen display coordinate system using these coefficients (width deviation ratio and height deviation ratio) to obtain the coordinate information. For example, if the screen display size is 1080p, the screen size in the device information is 720p (720p resolution is 1280×720), and the resolution of 1080p is 1920×1080, then the width deviation ratio between 1080p and 720p is 1920 / 1280 = 1.5, and the height deviation ratio is 1080 / 720 = 1.5. If the coordinates corresponding to the trigger information at 720p resolution are (x, y), then the coordinates at 1080p resolution will be (1.5x, 1.5y). The second device can then match and detect the coordinate information with the display area in the screen display coordinate system to determine the functional control triggered by the trigger operation.
[0098] It should be noted that establishing a screen display coordinate system based on the screen display information of the application to be integrated running in the application development platform can be achieved in the following way: Obtain the screen display information of the application to be integrated from the application development platform, including the actual display width and height; establish a two-dimensional coordinate system with the top left corner of the screen as the origin, the horizontal direction to the right as the x-axis, and the vertical direction downward as the y-axis, in pixels, so that each pixel in the screen can be uniquely identified by (x, y) coordinates (where the value of x ranges from 0 to the width of the screen, and the value of y ranges from 0 to the height of the screen), thereby forming a screen display coordinate system that precisely corresponds to the screen of the application to be integrated.
[0099] Optionally, in this embodiment of the application, the process of obtaining coordinate information by mapping the trigger information can be performed by the first device. That is, the first device can obtain the screen display information of the application to be integrated, and generate the coordinate information corresponding to the trigger information based on the device information and the screen display information. This embodiment of the application does not impose any restrictions on this.
[0100] In this way, the operation trajectory is completely recorded by the interaction position of consecutive frames, avoiding sampling errors caused by single frame information and improving the accuracy and completeness of trigger information; at the same time, the dynamic process of trigger operation can be accurately restored, enabling the second device to more accurately identify the operation intention, reducing the false triggering of functions due to missing information, and improving the response accuracy and reliability of cross-device interaction.
[0101] Step S105: If the second device detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the business content corresponding to the business function is output in the preview page; the business content is the content obtained by the first device after executing the business function through the business application.
[0102] In some embodiments, as shown in Figure 4, taking a virtual payment control F as an example, if the second device detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the second device can obtain the interface information corresponding to the business function in the application to be integrated through the trigger information, and send the interface information to the first device through the signaling connection established by the aforementioned business server. The interface information is obtained by the second device based on the trigger information in the application to be integrated, and the interface information can be an API used to call the business function.
[0103] The first device can obtain the interface information sent by the second device, and through this interface information, call the aforementioned business function in the business application, execute the business function, obtain the corresponding business content, and output the corresponding business content in the preview page. The output effect of the business content in the preview page can be shown as payment window L on page 307. The business content is the content obtained by the first device after executing the business function through the business application.
[0104] It should be noted that interface information refers to standardized instruction data sent by the second device to the first device to trigger the business application to call specific business functions. It may include the unique identifier of the business function, the parameters required for the call, the data format specifications, and the permission verification information. It is the instruction carrier for function calls between the first device and the business application.
[0105] Step S106: If the second device detects that the trigger information is associated with the second control, and the second control is a control used in the application to be integrated to call the function to be integrated in the application to be integrated, then the updated application media content corresponding to the function to be integrated sent by the second device is output in the preview page; the updated application media content is the content obtained by the second device after executing the function to be integrated through the application to be integrated.
[0106] In some embodiments, as shown in FIG4, taking a rotation control E as an example, if the second device detects that trigger information is associated with the second control, and the second control is a control used in the application to be integrated to call the function to be integrated in the application, then the second device can execute the function to be integrated corresponding to the rotation control E in the application to be integrated through the trigger information. The function to be integrated may be rotating the output content in the application to be integrated.
[0107] The second device can continue recording media content for the application to be integrated after executing the integrated function, obtaining updated media content. The second device can then send the updated application media content to the first device through the aforementioned media content connection relationship. The first device can output the updated application media content corresponding to the integrated function sent by the second device in the preview page. The output effect of the updated application media content in the preview page can be shown on page 306.
[0108] This application embodiment generates application media content by running the application to be integrated on a second device. This application media content is then sent to a first device, where it can be output on the preview page of the first device without the first device running the code of the application to be integrated. Therefore, during previewing, there is no need to convert the application to be integrated into a mini-program within the business application; the output performance of the application to be integrated in the business application for the application media content can be previewed in real time. By sending the trigger information corresponding to the trigger operation in the first device to the second device, the second device detects the controls associated with the trigger information in the application to be integrated, thereby simulating the interaction process between the trigger operation and the controls. Since the first device itself can run a business application, the simulated interaction process allows the first device to execute business functions through the business application. The business content obtained from executing the business function can be displayed on the preview page. Therefore, there is no need to convert the application to be integrated into a mini-program within the business application; the integration effect of the application to be integrated in the business application for the business function can be previewed in real time, efficiently achieving the integration preview effect of the application to be integrated in the business application. Furthermore, this application embodiment can also preview the interactivity and functionality of the functions to be integrated in the application in real time, while avoiding the cumbersome construction and deployment process for the application to be integrated. By reducing build and testing time, developers can accomplish more work in the same amount of time, thereby lowering the overall development cost of the project. Furthermore, the ability to preview in real-time also reduces the costs associated with later modifications and fixes due to insufficient testing.
[0109] Please refer to Figure 5, which is a schematic flowchart of a data processing method provided in an embodiment of this application. This data processing method can be executed by a second device, which can be the second device 200 shown in Figure 1. The following description will take the execution of this data processing method by a second device as an example. The data processing method may include at least the following steps S201-S205:
[0110] Step S201: The second device displays data connection information; the data connection information is used to instruct the first device to establish a device connection relationship with the second device;
[0111] In some embodiments, the user can develop and test the application to be integrated on an application development platform in the second device. The application to be integrated is used to convert into a mini-program that can be integrated into the business application upon completion of its development. The application development platform may include the Unity engine and Unreal Engine. Business applications may include: in-vehicle clients, smart home clients, entertainment clients (e.g., game clients), multimedia clients (e.g., video clients), social clients, and information clients (e.g., news clients), etc. A mini-program can be a lightweight application packaged in a specific client, which can run on the integrated client without downloading and installing. Mini-programs may include mini-games; mini-games are small in size, load quickly, and are suitable for quick startup and play. The application platform of the application to be integrated differs from that of the business application. For example, the application development platform may be the Unity engine, the application to be integrated may be Unity content (a Unity project), and the business application may be an application that has been converted to be compatible with the Android operating system and may be an application installed on the first device.
[0112] Please also refer to Figure 6, which is a schematic diagram of a data processing scenario provided in an embodiment of this application. As shown in Figure 6, in order to test the integration effect and output performance of the application to be integrated in the business application, the user can start the mini-program project for the application to be integrated in the application development platform. As shown on page 401, the main menu of the application development platform may have a "Develop Mini-Program" function component. In the sub-menu of the "Develop Mini-Program" function component, there may be a "Convert Mini-Program" function component and a "Preview Mini-Program" function component. "Convert Mini-Program" can convert (build) the developed application to be integrated into a mini-program that can be integrated into the business application. "Preview Mini-Program" can preview and test the application to be integrated in the business application of the first device. The user can start the "Preview Mini-Program" project process through the "Preview Mini-Program" function.
[0113] The second device can asynchronously initialize the synchronous functions corresponding to the application development platform. The asynchronous initialization process of the synchronous function is used to asynchronously transmit the return value information of some synchronous interfaces (initial interface information) of the business application to the cache of the application to be integrated in advance. The initial interface information of the business application may refer to the software development kit (SDK) of the business application, which can provide developers with a series of interfaces and tools to facilitate the integration of business function calling capabilities.
[0114] It's understandable that the initialization of the SDK calls by synchronous functions doesn't affect subsequent project workflows. Therefore, asynchronous initialization of synchronous functions can be performed, ensuring their normal operation as much as possible through real-time updates and caching of synchronization results. If the asynchronous initialization of the synchronous function is detected to be successful or timed out, the communication address and port of the second device can be obtained. Based on the bidirectional communication protocol (WebSocket), communication address (IP), and communication port, data connection information can be generated. This data connection information can be as shown on page 402, and can refer to communication information (IP address and port number) or a QR code containing that communication information. A QR code containing communication information can also be called a mini-program code.
[0115] The first device can establish a business server on the second device. This business server can be a virtual server deployed on the second device. It can be used to establish a device connection relationship through the aforementioned data connection information, which may refer to a WebSocket connection. The first device can establish a device connection relationship with the second device through the aforementioned data connection information in its business application. For example, it can scan the QR code in page 402, or fill in the IP address "AAAAA" and port number "BBBBB" in page 402 to establish a device connection relationship with the business server on the second device.
[0116] Step S202: If a device connection has been established with the first device, the application to be integrated is run in the application development platform, and the application media content of the running application to be integrated is sent to the first device so that the first device displays a preview page of the application to be integrated in the business application and outputs the application media content in the preview page; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed; the business application is the application in the first device;
[0117] In some embodiments, as shown in Figure 6, after establishing a device relationship, as shown on page 403, the second device displays a data configuration page in the application development platform. The data configuration page displays a settings window containing N data items. These N data items may include orientation, frame rate, video bitrate, audio source type, and audio bitrate. The second device can respond to settings operations for these N data items, displaying the format parameters set by the object for each data item in the settings window. For example, the object can be set to portrait orientation, a frame rate of 30 frames per second, a video bitrate of 720p, and an audio source type of type 1, such as APIOnly, meaning an audio resource controlled and accessed only through an API. The audio bitrate is 24kbits.
[0118] The data items are the specific parameter entries that constitute the preview output format. Each item corresponds to a dimension of the application's media content generation and is the basic unit that developers can set. N is a positive integer representing the number of data items. It is dynamically determined based on factors such as the type of application to be integrated (e.g., video applications require more image quality parameters, audio applications require more sound effect parameters) and the preview scenario requirements (e.g., high-definition previews require refined bitrate parameters, while fast previews can simplify parameters), ensuring that the format parameters can fully cover the application's media content generation needs.
[0119] It should be noted that when the second device has obtained the device information of the first device, the data configuration page is displayed, and the format parameters are automatically filled in based on the device information. For example, if the screen resolution of the first device is 720p and the operating system is Android 14, the settings window will automatically set the default video resolution to 720p and the default video encoding format to H.264, which is supported by Android 14. This reduces the operational cost for developers to manually configure parameters and improves the configuration efficiency of the preview output format.
[0120] Optionally, the second device can also obtain device information sent by the first device and display format parameters that match the device information on the data configuration page. For example, if the device information indicates that the first device supports 60 frames per second video output, the frame rate can be set to 60 frames per second on the data configuration page.
[0121] The object can further modify or adjust the data configuration page based on preview and testing needs. The second device can respond to the confirmation operation on the data configuration page and determine the format parameters displayed on the data configuration page as the preview output format. The preview output format is used to instruct the second device to generate application media content that matches the preview output format.
[0122] In this way, after obtaining the device information of the first device, the matching format parameters are displayed on the data configuration page. After confirmation, they are used as the preview output format, so that the format parameters accurately correspond to the characteristics of the first device. This avoids abnormal display of application media content or performance loss due to mismatch between parameters and device, while improving the accuracy and efficiency of parameter settings. It ensures that the generated application media content can adapt to the operating environment of the first device and enhances the stability and adaptation effect of cross-device preview.
[0123] The second device can send host initialization information to the first device. This host initialization information may include user configuration information, a first connection ID, and a preview output format. The user configuration information may include whether to display trigger feedback prompts and whether the preview page displays the frame rate of the output media content. The first connection identifier (ID) can be generated by the first device based on the WebRTC (Web-RTC) protocol. The second device can establish a media content connection with the first device based on the WebRTC protocol and the first connection ID. This media content connection can be a WebRTC connection, where WebRTC is a real-time peer-to-peer network communication protocol. The process of establishing a WebRTC connection can be found in step S102 of the embodiment corresponding to Figure 3 above; it will not be repeated here.
[0124] Optionally, the second device may also send the second connection ID generated locally based on the peer-to-peer real-time communication protocol to the first device. The first device may establish a media content connection relationship with the second device based on the second connection ID and the peer-to-peer real-time communication protocol. This application embodiment does not impose any limitations on this.
[0125] The second device can run the application to be integrated in the application development platform. The output effect of the running application to be integrated can be as shown on page 404. Page 404 can include a first control B and a second control C corresponding to the application to be integrated. The first control B can be used to execute business functions in the business application, such as sharing the currently displayed page to the business application. The second control C can be used to execute the function to be integrated in the application to be integrated, such as moving the vehicle upward in the application to be integrated. The SDK called by the above initial interface information can include the interface information corresponding to the business function executed by the first control B.
[0126] The second device can record media content from the running application to be integrated based on the preview output format, obtaining application media content, which can be data containing both audio and video. This application media content is then sent to the first device via media content connection relationships. The first device can then display a preview page of the application to be integrated within its business application, outputting the application media content within the preview page.
[0127] Thus, establishing media content connections based on point-to-point real-time communication protocols reduces intermediate forwarding steps in data transmission, lowers latency, and improves the real-time transmission performance of application media content. Recording and sending application media content based on the preview output format ensures precise matching between the content format and the characteristics of the first device, avoiding decoding failures or display anomalies caused by format incompatibility, and improving the adaptability of cross-device content transmission. At the same time, dedicated connections can optimize data transmission paths, reduce unnecessary bandwidth usage, and improve the stability and efficiency of media content transmission.
[0128] Step S203: Obtain trigger information from the first device regarding the trigger operation on the preview page;
[0129] In some embodiments, the second device can generate coordinate information based on the trigger information. The process of generating coordinate information can be referred to the specific content of step S103 in the embodiment corresponding to FIG3 above, and will not be repeated here. Optionally, in the embodiments of this application, the process of obtaining coordinate information by mapping the trigger information can be performed by the first device. That is, the first device can obtain the screen display information of the application to be integrated, and generate the coordinate information corresponding to the trigger information based on the device information and the screen display information. This embodiment of the application does not limit this.
[0130] As shown in Figure 6, if the coordinate information matches the display area of the first control B in the screen display coordinate system of the application to be integrated, it is determined that the trigger information is associated with the first control B. If the coordinate information matches the display area of the second control C in the screen display coordinate system of the application to be integrated, it is determined that the trigger information is associated with the second control C.
[0131] In step S204, if the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the interface information corresponding to the business function is obtained in the functional interaction code through the trigger information, and the interface information is sent to the first device through the signaling connection method, so that the first device can call the business function through the interface information in the business application, execute the business function, and obtain the business content corresponding to the business function.
[0132] In some embodiments, as shown in Figure 6, the application to be integrated includes functional interaction code (C++), and the preview applet includes page interaction code (JavaScript) corresponding to the preview page. During the preview of the application to be integrated, there are cross-language calls between the functional interaction code and the page interaction code. Since this embodiment does not build the application to be integrated, the cross-language calls can be achieved using the bidirectional call method of JSLIB (JavaScript Library) and SendMessage provided by Unity WebGL (Unity Web Graphics Library). Unity WebGL is a build option provided by Unity that can publish Unity content as a JavaScript program that can run in a web browser. The bidirectional call method of JSLIB and SendMessage allows developers to embed custom JavaScript code in a Unity project, thereby enabling interaction between Unity content and the web page. The web page is also the preview page on the first device.
[0133] It should be noted that the trigger information being associated with the first control means that the trigger information generated by the first device (including the location coordinates of the user operation, the operation type, etc.), after coordinate mapping (based on the display size deviation coefficient between the first device and the application to be integrated), the corresponding operation position falls within the preset display area of the first control in the application to be integrated; or, the operation object identifier carried in the trigger information matches the unique identifier of the first control predefined in the application to be integrated, thereby determining that the user is operating the first control.
[0134] In this application embodiment, the preview application to be integrated does not need to be built using Unity WebGL. Instead, it can use a signaling connection to transmit SDK call information or callback information (e.g., interface information and call information) that would normally be transmitted in JSLIB and SendMessage. This signaling connection method establishes and coordinates a communication session between Unity content (i.e., functional interaction code) and the Web page (i.e., page interaction code). The Web page is also the preview page on the first device.
[0135] The second device can simulate input in the running application to be integrated using the aforementioned coordinate information to determine if the coordinate information matches the first control in the application. If the trigger information is associated with the first control, and the first control is a control in the application to be integrated used to call the business function of the business application, then the second device can obtain the interface information corresponding to the business function in the functional interaction code using the trigger information, and send the interface information to the first device through the signaling connection established by the aforementioned business server. The interface information is obtained by the second device based on the trigger information in the application to be integrated, and the interface information can be an API used to call the business function. For example, the first device can send the trigger information to the second device, the second device can generate coordinate information based on the trigger information, input the coordinate information to Unity's RenderStreaming, and Unity's RenderStreaming can simulate the input of an Input System, obtain the interface information or call information in the functional interaction code of the application to be integrated, and send the interface information or call information to the first device through the signaling connection.
[0136] The first device can obtain the interface information sent by the second device, and through this interface information, call the above-mentioned business functions in the business application, execute the business functions, obtain the business content corresponding to the business functions, and output the business content corresponding to the business functions in the preview page.
[0137] It is understood that the application development platform may not integrate business applications. The second device can directly obtain the interface information corresponding to the business function in the application to be integrated, without running the business application on the application development platform. Therefore, after the object clicks the display screen corresponding to the first control B on the first device, the output content of the application to be integrated running on the second device can be as shown on page 405, and the output content of page 405 can be the same as the output content of page 404. This application embodiment does not limit whether the application development platform integrates business applications or whether the business content is output on the application development platform. Please also refer to Figure 2. As shown in Figure 2, after the object clicks the first control B in the preview page on the first device, the output content of the preview page on the first device can be as shown on page 103a of Figure 2. Developers can understand the integration effect of the business function corresponding to the interface information through the output content of the preview screen on the first device.
[0138] Thus, when the trigger information is detected as being associated with the first control in the application to be integrated to call a business function, the interface information of the corresponding business function is accurately obtained from the functional interaction code of the application to be integrated and sent to the first device through a signaling connection. This ensures that the interface information and the triggered business function are accurately matched, avoiding business function call failures caused by interface information mismatch. The signaling connection ensures the reliability of interface information transmission and reduces data loss or corruption during transmission. At the same time, directly associating interface information through functional interaction code simplifies the chain logic of business function calls, improves call response efficiency, and only initiates calls for the trigger information of the associated target control, reducing the probability of false triggering of business functions.
[0139] Optionally, the first device can generate execution result information for the business function after outputting the business content. The second device can obtain the execution result information for the business function sent by the first device, call the target function associated with the business function in the application to be integrated based on the execution result information, execute the target function in the application to be integrated, obtain the target application media content, and send the target application media content to the first device. The first device can output the target application media content in the preview business. For example, if the business function corresponding to the first control is a virtual payment function, then the first device can call the virtual payment function through interface information, pull up the payment window in the preview page to perform virtual payment, and generate execution result information. The second device can update the digital resources corresponding to the virtual payment function based on the execution result information, generate the target application media content based on the updated digital resources, and send the target application media content to the first device.
[0140] In this way, after obtaining the business function execution result information of the first device, the target function associated in the application to be integrated is called and executed based on the information, and the target application media content is generated and sent to the first device. The real-time generation and transmission of the target application media content can ensure the continuity of the preview page content of the first device, reduce the delay of cross-device function interaction, and enhance the smoothness and reliability of the entire business process.
[0141] In step S205, if the trigger information is associated with the second control, and the second control is a control used in the application to be integrated to call the function to be integrated, then the call information corresponding to the function to be integrated is obtained in the function interaction code through the trigger information, the call information is processed through the function interaction code to obtain the updated application media content corresponding to the function to be integrated, and the updated application media content is sent to the first device.
[0142] In some embodiments, as shown in FIG6, the second device can simulate input in the running application to be integrated using the aforementioned coordinate information to determine that the coordinate information matches the second control in the application to be integrated. If the trigger information is associated with the second control, and the second control is a control in the application to be integrated used to call the function to be integrated, then the second device can obtain the call information corresponding to the function to be integrated in the function interaction code through the trigger information. By processing the call information through the function interaction code, the updated application media content corresponding to the function to be integrated is obtained. The output content of the application to be integrated when processing the call information can be as shown on page 406. The second device can send the updated application media content to the first device. The first device can output the updated application media content corresponding to the function to be integrated sent by the second device in the preview page.
[0143] When the trigger information is associated with the second control, meaning the user's operation precisely points to the second control, and the second control is a control in the application to be integrated that is used to call its own integrated function (distinct from controls that call external business application functions, rather than external payment functions), the function interaction code can quickly retrieve the call information required to call the integrated function because the correspondence between the second control and the integrated function is pre-stored in the function interaction code. Furthermore, since the integrated function is an application's own function and does not depend on external applications, this call information can be directly processed through the function interaction code, thereby generating updated application media content reflecting the state after the function execution. Because the first device needs to display the running effect of the integrated application in real time, this updated content will be sent to the first device promptly, ensuring that the preview page can synchronously present the latest state after the function execution. For example, when a user clicks the "Submit Form" button (i.e., the second control) in the application to be integrated, this button is associated with the application's own form data validation and submission function (i.e. the function to be integrated). The form data fields, submission path and other calling information are obtained from the function interaction code, processed and executed to execute the form submission logic, generate a "Submission Successful" prompt page (i.e. update the application media content), and send it to the first device so that the preview page can display this result synchronously.
[0144] This application embodiment generates application media content by running the application to be integrated on a second device. This application media content is then sent to a first device, where it can be output on the preview page of the first device without the first device running the code of the application to be integrated. Therefore, during previewing, there is no need to convert the application to be integrated into a mini-program within the business application; the output performance of the application to be integrated in the business application for the application media content can be previewed in real time. By sending the trigger information corresponding to the trigger operation in the first device to the second device, the second device detects the controls associated with the trigger information in the application to be integrated, thereby simulating the interaction process between the trigger operation and the controls. Since the first device itself can run a business application, the simulated interaction process can notify the first device to execute business functions through the business application. The business content obtained from executing the business function can be displayed on the preview page. Therefore, there is no need to convert the application to be integrated into a mini-program within the business application; the integration effect of the application to be integrated in the business application for the business function can be previewed in real time, efficiently achieving the integration preview effect of the application to be integrated in the business application.
[0145] On the other hand, the embodiments of this application can also preview the interactivity and functionality of the functions to be integrated into the application in real time, while avoiding the cumbersome build and deployment process for the application to be integrated. With a simplified user interface and clear configuration options, developers can focus more on application design and function implementation, rather than being bogged down by complex technical details. By reducing build and testing time, developers can complete more work in the same amount of time, thereby reducing the overall development cost of the project. Furthermore, the ability to preview in real time also reduces the cost of later modifications and fixes due to insufficient testing.
[0146] Please refer to Figure 7, which is a schematic flowchart of a data processing method provided in an embodiment of this application. This data processing method can be executed jointly by a first device and a second device. The first device can be the first device 100 shown in Figure 1. The second device can be the second device 200 shown in Figure 1. The following description will use the example of this data processing method being executed jointly by the first device and the second device. The data processing method may include at least the following steps S301-S321:
[0147] Step S301: The second device displays data connection information through the preview component;
[0148] In some embodiments, the user can develop and test the application to be integrated on an application development platform in a second device. The application to be integrated is then converted into a mini-program that can be integrated into the business application upon completion of its development. The application development platform may include cross-platform game development engines such as Unity, Unreal Engine, Cocos Engine, and Laya Engine. The mini-program can be a lightweight application packaged in a specific client, which can run on the integrated client without downloading or installing. Mini-programs may include mini-games; mini-games are small in size, load quickly, and are suitable for rapid startup and play.
[0149] The application development platform can include quick adaptation components, editor components, preview components, and render streaming components. Quick adaptation components are tools used to quickly adapt the application to be integrated from the application development platform to the corresponding business application platform of the first device; for example, it can convert Unity game code into mini-game code. Editor components are tools used to run the media content output by the application to be integrated; these are essentially the Editor environment in Unity, providing the ability to directly preview Unity content without constructing the Unity content. Preview components are tools used to quickly preview the real-device effect of the application to be integrated after being converted by quick adaptation components. Render streaming components are components used based on WebRTC technology to perform high-quality rendering of the application to be integrated through a browser and create a real-time application stream (media data) for transmission to the first device, thereby enabling remote interaction and real-time experience.
[0150] The object can establish a business server on the second device. The business server can be a virtual server deployed on the second device, generating data connection information based on a bidirectional communication protocol (WebSocket), a communication address (IP address), and a communication port (port number). The data connection information can refer to communication information (IP address and port number) or a QR code containing such communication information; a QR code containing communication information can also be called a mini-program code. The business server can be used to establish device connection relationships through the aforementioned data connection information, and the device connection relationship can refer to a WebSocket connection relationship. For the specific process of displaying data connection information on the second device, please refer to the detailed description of step S201 in the embodiment corresponding to Figure 5 above; this application embodiment will not repeat it here.
[0151] In step S302, the first device responds to the preview operation via the preview applet;
[0152] Step S303: The first device establishes a device connection with the second device through the preview applet;
[0153] In some embodiments, the first device may have a business application installed, which may integrate a preview applet. The preview applet may be a local area network video player that supports interaction with the preview component and the streaming component. The first device may perform preview operations in the business application through the aforementioned data connection information. For example, it may scan the applet code displayed by the second device, or fill in the IP address and port number generated by the second device. For the specific process of the first device responding to the preview operation, please refer to the detailed description of step S101 in the embodiment corresponding to Figure 3 above. This application embodiment will not repeat it here.
[0154] The first device can establish a device connection with the business server in the second device by responding to the preview operation through the preview applet. The specific process of the first device establishing a device connection with the second device can be found in the detailed description of step S101 in the embodiment corresponding to Figure 3 above, and will not be repeated here in this application embodiment.
[0155] Step S304: The second device sends host initialization information to the preview applet in the first device;
[0156] In some embodiments, the second device can initialize and configure the basic operating environment for each component. Taking a game as an example, the second device can configure Unity project settings, Unity package settings, Unity object settings, etc., to generate host initialization information. The second device can send the host initialization information to the first device via WebSocket and register SDK call-related events for the current WebSocket. The host initialization information may also include user configuration information (information pre-set during object initialization), connection ID, etc. The user configuration information may include whether to display trigger feedback prompts, whether the preview page displays the frame rate of the output media content, etc.
[0157] Step S305: The first device initializes via the preview applet.
[0158] In some embodiments, the first device initializes the preview applet using host initialization information;
[0159] Step S306: The first device returns terminal initialization information to the preview component in the second device;
[0160] In some embodiments, the first device can perform a series of adaptation operations on the preview applet using host initialization information, and then send terminal initialization information to the preview component in the second device. The terminal initialization information may include device information, such as device model and screen size.
[0161] Step S307: The second device initializes the preview component using terminal initialization information;
[0162] Step S308: The second device starts the streaming component;
[0163] In some embodiments, the second device initializes the preview component using terminal initialization information, such as asynchronously initializing SDK calls and initializing the preview output format corresponding to the application media content. The second device can asynchronously initialize the synchronous functions corresponding to the application development platform. The asynchronous initialization process of the synchronous functions is used to asynchronously transmit the return values of some synchronous interfaces (initial interface information) of the business application to the cache of the application to be integrated. The initial interface information of the business application may refer to the SDK of the business application, which provides developers with a series of interfaces and tools to integrate the business functions of the business application into their developed application to be integrated. The return value information of the aforementioned cached partial synchronous interfaces may include information that changes relatively little, such as device model and screen size. If the asynchronous initialization of the synchronous function is detected to be successful or times out, the second device can start the editing component to run the application to be integrated and start the streaming component to establish media content connection relationships.
[0164] It should be noted that the streaming component is a core functional component on the second device used to realize real-time transmission of media content across devices. The startup of the streaming component depends on the successful asynchronous initialization or timeout of the synchronous function. After the streaming component starts, it first establishes a connection with the business server created by the preview component, and then establishes a WebRTC connection with the first device through the connection ID in the terminal initialization information (as Peer B in this connection, corresponding to Peer A of the preview applet on the first device). With the help of the business server to relay WebRTC control information, the application media content of the application to be integrated is finally stably transmitted from the second device to the first device, providing underlying connection support for the real-time preview of the first device.
[0165] Step S309: The second device establishes a media content connection with the first device through the streaming component;
[0166] In some embodiments, the streaming component can connect to the service server created by the preview component after startup, and establish a media content connection relationship with the first device through the connection ID in the terminal initialization, i.e., a WebRTC connection. The service server can then become a relay server for relaying WebRTC control information between the preview component and the preview applet. At this time, the preview applet can be Peer A (Client A) in the WebRTC connection, and the streaming component can be Peer B (Client B) in the WebRTC connection. The specific process of the second device establishing a media content connection relationship with the first device can be referred to the specific description in step S102 of the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0167] In step S310, the second device sends the application media content to the preview applet in the first device through the streaming component;
[0168] Step S311: The first device outputs the application media content through the preview applet;
[0169] In some embodiments, after a WebRTC connection is successfully established, the streaming component can automatically create a media content track. The established media content track can send the application media content output by the editing component to the first device, and the first device outputs the application media content through a preview applet. The specific process of the first device outputting the application media content can be found in the detailed description of step S102 in the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0170] Step S312: The first device responds to the triggered operation through the preview applet;
[0171] Step S313: The first device sends trigger information to the streaming component in the second device;
[0172] In some embodiments, the first device can respond to the trigger operation through the preview applet. The specific process of the first device responding to the trigger operation can be referred to the specific description in step S103 of the embodiment corresponding to Figure 3 above. This application embodiment will not repeat it here.
[0173] After the first device detects the trigger operation in the image container (canvas) of the preview box, the first device can construct the trigger information corresponding to the current frame based on the trigger events (TouchEvent) of the current frame and the previous frame in the canvas. The trigger information can be a Touch structure conforming to the Unity Input System format.
[0174] Step S314: The second device detects the control associated with the trigger information through the preview component;
[0175] In some embodiments, the second device can establish a screen display coordinate system based on device information and screen display information in the editing component, such as screen display size. It then generates a coordinate deviation coefficient based on the device information and screen display information, and maps the trigger information to the screen display coordinate system using the coordinate deviation coefficient to obtain coordinate information. The specific process by which the second device determines the coordinate information can be found in the detailed description of step S203 in the embodiment corresponding to Figure 5 above, and will not be repeated here. Optionally, in this embodiment, the process of obtaining coordinate information by mapping the trigger information can be performed by the first device. That is, the first device can obtain the screen display information of the application to be integrated, and generate the coordinate information corresponding to the trigger information based on the device information and screen display information. This embodiment does not impose any limitations on this.
[0176] The second device can package the coordinate information into TouchState for processing by the Unity Input System. The second device can transmit the data to the streaming component via an Input data channel established through a WebRTC connection. The streaming component can then simulate input using the Input System interface. This allows for the detection of controls associated with the trigger information. If the coordinate information matches the display area of the first control in the application to be integrated within the screen's coordinate system, it is determined that the trigger information is associated with the first control. If the coordinate information matches the display area of the second control in the application to be integrated within the screen's coordinate system, it is determined that the trigger information is associated with the second control.
[0177] Optionally, if the input system of the application to be integrated is Input Manager, the preview component can provide a script corresponding to Input Manager to simulate input to the GUI (Graphical User Interface) part of Input Manager.
[0178] Step S315: If the second device detects that the trigger information is associated with the first control;
[0179] Step S316: The second device sends interface information to the first device through the preview component;
[0180] In some embodiments, the application to be integrated includes functional interaction code, and the preview mini-program includes page interaction code corresponding to the preview page. During the previewing of the application to be integrated, there are cross-language calls between the functional interaction code and the page interaction code. Call information or callback information that should be transmitted in JSLIB and SendMessage can be transmitted via a signaling connection. The signaling connection method can establish and coordinate a communication session between Unity content (functional interaction code) and the Web page (page interaction code). The Web page is also the preview page in the first device. If the trigger information is associated with a first control, and the first control is a control in the application to be integrated used to call the business function of the business application, then the second device can obtain the interface information corresponding to the business function in the functional interaction code through the trigger information, and send the interface information to the first device through the signaling connection established by the aforementioned business server. The interface information is obtained by the second device based on the trigger information in the application to be integrated, and the interface information can be an API used to call the business function.
[0181] For example, on a computer acting as a second device, the developer establishes a media content connection with a mobile phone acting as a first device through the streaming component of the application development platform. The developer then sends the product list page (i.e., the application media content) of the e-commerce application to be integrated to a preview mini-program on the mobile phone (first device) via the streaming component. The mobile phone displays the product list in real time through this preview mini-program. When the user clicks the "Pay Now" button below a product in the preview mini-program (triggering an operation), the mobile phone sends the trigger information corresponding to the click to the streaming component on the computer. The preview component on the computer receives and detects that the "Pay Now" button associated with the trigger information is the first control in the application to be integrated, used to call the payment function of an external payment application (business application). Therefore, the preview component on the computer sends the interface information corresponding to the payment function (such as payment parameters, interface address, etc.) to the mobile phone, preparing for the mobile phone to perform the payment operation through the payment application.
[0182] Step S317: The first device executes business functions by previewing the mini-program and interface information;
[0183] Step S318: The first device outputs the business content through the preview mini-program;
[0184] In some embodiments, the first device can obtain interface information sent by the second device, and through this interface information, call the aforementioned business function in the business application, execute the business function, obtain the business content corresponding to the business function, and output the business content corresponding to the business function in the preview page through the preview applet. The specific process of the first device executing the business function and outputting the business content through the interface information can be referred to the detailed description in step S105 of the embodiment corresponding to Figure 3 above, and will not be repeated here in this application embodiment.
[0185] Step S319: If the second device detects that the trigger information is associated with the second control;
[0186] Step S320: The second device sends updated application media content to the first device;
[0187] Step S321: The first device outputs updated application media content through the preview applet.
[0188] For example, a developer runs the e-commerce mini-program to be integrated on a computer (actually a second device) through an application development platform. This mini-program has established a media content connection with the mobile preview mini-program (actually a first device) through a streaming component. When a user clicks the "Add to Cart" button on the product details page in the mobile preview mini-program (i.e., the second control associated with the trigger information, which is used to call the e-commerce mini-program's own shopping cart addition function), the mobile phone sends the trigger information corresponding to the click to the streaming component on the computer. After the computer's preview component detects that the trigger information is associated with the second control, it immediately processes the operation through the functional interaction code of the e-commerce mini-program, generating an interface that includes a "Product added to cart" prompt and an updated shopping cart icon number (i.e., updating the application media content), and sends the updated content to the mobile phone through the streaming component. The mobile phone finally displays this updated interface effect in real time through the preview mini-program.
[0189] In some embodiments, if the trigger information is associated with a second control, and the second control is a control used in the application to be integrated to call the function to be integrated, the second device can obtain the call information corresponding to the function to be integrated in the function interaction code through the trigger information, process the call information through the function interaction code to obtain the updated application media content corresponding to the function to be integrated, and the second device can send the updated application media content to the first device. The first device can output the updated application media content corresponding to the function to be integrated sent by the second device in the preview page through the preview applet. The specific process of the first device outputting the updated media content can be referred to the specific description in step S106 in the embodiment corresponding to Figure 3 above, and will not be repeated here in this embodiment.
[0190] This application embodiment generates application media content by running the application to be integrated on a second device. This application media content is then sent to a first device, where it can be output on the preview page of the first device without the first device running the code of the application to be integrated. Therefore, during previewing, there is no need to convert the application to be integrated into a mini-program within the business application; the output performance of the application to be integrated in the business application for the application media content can be previewed in real time. By sending the trigger information corresponding to the trigger operation in the first device to the second device, the second device detects the controls associated with the trigger information in the application to be integrated, thereby simulating the interaction process between the trigger operation and the controls. Since the first device itself can run a business application, the simulated interaction process allows the first device to execute business functions through the business application. The business content obtained from executing the business function can be displayed on the preview page. Therefore, there is no need to convert the application to be integrated into a mini-program within the business application; the integration effect of the application to be integrated in the business application for the business function can be previewed in real time, efficiently achieving the integration preview effect of the application to be integrated in the business application.
[0191] On the other hand, the embodiments of this application can also preview the interactivity and functionality of the functions to be integrated into the application in real time, while avoiding the cumbersome build and deployment process for the application to be integrated. By reducing build and testing time, developers can complete more work in the same amount of time, thereby reducing the overall development cost of the project. In addition, the ability to preview in real time also reduces the cost of later modifications and fixes caused by insufficient testing.
[0192] Please refer to Figure 8, which is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. As shown in Figure 8, the data processing device 1 is applied to a first device. The data processing device 1 includes a preview page display module 810, a media content output module 820, a trigger processing module 830, a business function processing module 840, and a function to be integrated processing module 850.
[0193] The preview page display module 810 is configured to respond to preview operations for the application to be integrated and display the preview page of the application to be integrated in the business application; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed.
[0194] The media content output module 820 is configured to output application media content sent by the second device to the preview page; the application media content is generated when the second device runs the application to be integrated.
[0195] The trigger processing module 830 is configured to respond to trigger operations on the preview page and send the trigger information of the trigger operation to the second device;
[0196] The business function processing module 840 is configured to output the business content corresponding to the business function in the preview page if the second device detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated; the business content is the content obtained by the first device after executing the business function through the business application.
[0197] In one possible implementation, the data processing device 1 further includes a function processing module 850 to be integrated, which is further configured to perform the following operations:
[0198] If the second device detects that the trigger information is associated with the second control, and the second control is a control used in the application to be integrated to call the function to be integrated, then the updated application media content corresponding to the function to be integrated sent by the second device is output in the preview page; the updated application media content is the content obtained by the second device after executing the function to be integrated through the application to be integrated. The specific implementation of the function to be integrated processing module 850 can be found in the specific content of step S106 of the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0199] In one possible implementation, the trigger processing module 830 is also configured to perform the following operations:
[0200] The trigger information displays the trigger feedback information corresponding to the trigger operation; the trigger feedback information is used to indicate the position of the trigger operation performed by the object on the screen of the first device. The specific implementation of the trigger processing module 830 can be found in step S102 of the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0201] In one possible implementation, the preview page display module 810 is configured to respond to a preview operation for the application to be integrated, and when displaying the preview page of the application to be integrated in the business application, it is also configured to perform the following operations:
[0202] In response to a QR code scanning operation for a business application, if the application code obtained from the scanning operation is detected to be associated with the application to be integrated, a preview page of the application to be integrated is displayed in the business application; the application code is generated and displayed by the second device. The specific implementation of the preview page display module 810 can be found in step S101 of the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0203] In one possible implementation, the preview page display module 810 is configured to respond to a preview operation for the application to be integrated, and when displaying the preview page of the application to be integrated in the business application, it is also configured to perform the following operations:
[0204] In response to the startup operation, the initial connection page is displayed in the business application;
[0205] In response to an input operation on the initial connection page, if the object input information obtained by the input operation matches the communication information corresponding to the second device, a preview page of the application to be integrated is displayed in the business application. The communication information is generated by the second device and is used to establish a device connection relationship with the second device. The specific implementation of the preview page display module 810 can be found in step S101 of the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0206] In one possible implementation, the preview page display module 810 is also configured to perform the following operations:
[0207] Data connection information is obtained based on the preview operation of the application to be integrated;
[0208] A device connection relationship is established between the first device and the second device through data connection information. The device information of the first device is sent to the second device through the device connection relationship. The device information is used to instruct the second device to generate application media content that matches the device information. The specific implementation of the preview page display module 810 can be found in the specific content of step S101 of the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0209] In one possible implementation, the trigger processing module 830 is configured to respond to a trigger operation on the preview page and, when sending the trigger information of the trigger operation to the second device, also perform the following operations:
[0210] Respond to the trigger operation on the preview page, obtain the M preview page frames corresponding to the trigger operation, and obtain the interaction positions corresponding to the M preview page frames respectively; M is a positive integer, and the preview page frames are the screen information output by the preview page at different times;
[0211] Trigger information for the trigger operation is generated based on M interaction locations, and the trigger information is sent to the second device. The specific implementation of the trigger processing module 830 can be found in step S102 of the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0212] In one possible implementation, the business function processing module 840 is also configured to perform the following operations:
[0213] The interface information sent by the second device is obtained, and the business function is invoked and executed in the business application through the interface information to obtain the business content corresponding to the business function. The interface information is obtained by the second device based on the trigger information in the application to be integrated. The specific implementation of the business function processing module 840 can be found in the specific content of step S105 of the embodiment corresponding to Figure 3 above, and will not be repeated here.
[0214] This application embodiment generates application media content by running the application to be integrated on a second device. This application media content is then sent to a first device, where it can be output on the preview page of the first device without the first device running the code of the application to be integrated. Therefore, during previewing, there is no need to convert the application to be integrated into a mini-program within the business application; the output performance of the application to be integrated in the business application for the application media content can be previewed in real time. By sending the trigger information corresponding to the trigger operation in the first device to the second device, the second device detects the controls associated with the trigger information in the application to be integrated, thereby simulating the interaction process between the trigger operation and the controls. Since the first device itself can run a business application, the simulated interaction process allows the first device to execute business functions through the business application. The business content obtained from executing the business function can be displayed on the preview page. Therefore, there is no need to convert the application to be integrated into a mini-program within the business application; the integration effect of the application to be integrated in the business application for the business function can be previewed in real time, efficiently achieving the integration preview effect of the application to be integrated in the business application.
[0215] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0216] Please refer to Figure 9, which is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. As shown in Figure 9, the data processing device 2 is applied to a second device. The data processing device 2 includes a data connection information display module 910, a media content sending module 920, a trigger information acquisition module 930, an interface information processing module 940, and a call information processing module 950.
[0217] The data connection information display module 910 is configured to display data connection information; the data connection information is used to instruct the first device to establish a device connection relationship with the second device.
[0218] The media content sending module 920 is configured to, if a device connection has been established with the first device, run the application to be integrated in the application development platform and send the application media content of the running application to be integrated to the first device, so that the first device displays a preview page of the application to be integrated in the business application and outputs the application media content in the preview page; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed; the business application is the application in the first device;
[0219] The trigger information acquisition module 930 is configured to acquire trigger information sent by the first device for triggering operations on the preview page;
[0220] The interface information processing module 940 is configured to, if it detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then notify the first device to execute the business function through the business application; the preview page is also used to display the business content obtained by the first device after executing the business function through the business application.
[0221] In one possible implementation, the data connection information display module 910 is also configured to perform the following operations:
[0222] Display the data configuration page in the application development platform; the data configuration page displays a settings window containing N data items; N is a positive integer.
[0223] In response to a setting operation for N data items, display the format parameters set for the object for the N data items in the settings window;
[0224] In response to the confirmation operation on the data configuration page, the format parameters displayed in the settings window are determined as the preview output format; the preview output format is used to instruct the second device to generate application media content that matches the preview output format. The specific implementation of the data connection information display module 910 can be found in step S201 of the embodiment corresponding to Figure 5 above, and will not be repeated here.
[0225] In one possible implementation, the data connection information display module 910 is also configured to perform the following operations:
[0226] Obtain the device information sent by the first device and display the format parameters that match the device information on the data configuration page;
[0227] In response to the confirmation operation on the data configuration page, the format parameters displayed in the settings window are determined as the preview output format; the preview output format is used to instruct the second device to generate application media content that matches the preview output format. The specific implementation of the data connection information display module 910 can be found in step S201 of the embodiment corresponding to Figure 5 above, and will not be repeated here.
[0228] In one possible implementation, the media content sending module 920 is configured to run the application to be integrated in the application development platform, and when sending the application media content of the running application to be integrated to the first device, it is also configured to perform the following operations:
[0229] Establish a media content connection with the first device based on a point-to-point real-time communication protocol;
[0230] The application to be integrated is run on the application development platform. Media content is recorded on the running application based on the preview output format to obtain application media content. The application media content is then sent to the first device through the media content connection relationship. The specific implementation of the media content sending module 920 can be found in step S202 of the embodiment corresponding to Figure 5 above, and will not be repeated here.
[0231] In one possible implementation, the trigger information acquisition module 930 is also configured to perform the following operations:
[0232] Based on the screen display information of the application to be integrated running in the application development platform, a screen display coordinate system is established. Based on the device information and screen display information, a coordinate deviation coefficient is generated. The trigger information is then mapped to the screen display coordinate system through the coordinate deviation coefficient to obtain the coordinate information.
[0233] If the coordinate information matches the display area of the first control in the screen display coordinate system of the application to be integrated, it is determined that the trigger information is associated with the first control. The specific implementation of the trigger information acquisition module 930 can be found in step S203 of the embodiment corresponding to Figure 5 above, and will not be repeated here.
[0234] In one possible implementation, the application to be integrated includes functional interaction code; the interface information processing module 940 is configured to detect that trigger information is associated with a first control, and the first control is a control in the application to be integrated used to call the business function of the business application, and when notifying the first device to execute the business function through the business application, it is also configured to perform the following operations:
[0235] If the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the interface information corresponding to the business function is obtained in the functional interaction code through the trigger information, and the interface information is sent to the first device through a signaling connection, so that the first device can call the business function through the interface information in the business application, execute the business function, and obtain the business content corresponding to the business function. The specific implementation of the interface information processing module 940 can be found in the specific content of step S204 of the embodiment corresponding to Figure 5 above, and will not be repeated here.
[0236] In one possible implementation, the interface information processing module 940 is also configured to perform the following operations:
[0237] Asynchronous initialization is performed on the synchronous functions corresponding to the application development platform; the synchronous functions are used to asynchronously transmit the initial interface information of the business application to the application to be integrated; the initial interface information includes the interface information corresponding to the first control;
[0238] If the asynchronous initialization of the synchronization function is detected to be successful or timed out, the communication address and communication port of the second device are obtained. Based on the bidirectional communication protocol, communication address, and communication port, data connection information is generated. The specific implementation of the interface information processing module 940 can be found in step S201 of the embodiment corresponding to Figure 5 above, and will not be repeated here.
[0239] In one possible implementation, the data processing device 2 further includes an information processing module 950, wherein the application to be integrated includes functional interaction code; the information processing module 950 is also configured to perform the following operations:
[0240] If the trigger information is associated with the second control, and the second control is a control used in the application to be integrated to call the function to be integrated, then the call information corresponding to the function to be integrated is obtained in the function interaction code through the trigger information. The call information is processed through the function interaction code to obtain the updated application media content corresponding to the function to be integrated, and the updated application media content is sent to the first device. The specific implementation of the call information processing module 950 can be found in the specific content of step S205 of the embodiment corresponding to Figure 5 above, and will not be repeated here.
[0241] In one possible implementation, the interface information processing module 940 is also configured to perform the following operations:
[0242] The system obtains the execution result information for the business function sent by the first device, calls the target function associated with the business function in the application to be integrated based on the execution result information, executes the target function in the application to be integrated, obtains the target application media content, and sends the target application media content to the first device. The specific implementation of the interface information processing module 940 can be found in step S204 of the embodiment corresponding to Figure 5 above, and will not be repeated here.
[0243] This application embodiment generates application media content by running the application to be integrated on a second device. This application media content is then sent to a first device, where it can be output on the preview page of the first device without the first device running the application's code. Therefore, during previewing, there's no need to convert the application to be integrated into a mini-program within the business application; the output performance of the application to be integrated in the business application for the application media content can be previewed in real time. By sending trigger information corresponding to a trigger operation in the first device to the second device, the second device detects the controls associated with the trigger information in the application to be integrated, thus simulating the interaction between the trigger operation and the controls. Since the first device itself can run a business application, the simulated interaction process can notify the first device to execute business functions through the business application. The business content obtained from executing the business function can be displayed on the preview page. Therefore, there's no need to convert the application to be integrated into a mini-program within the business application; the integration effect of the application to be integrated in the business application for the business function can be previewed in real time, efficiently achieving the integration preview effect of the application to be integrated in the business application. Furthermore, this application embodiment can also preview the interactivity and functionality of the integrated function in the application to be integrated in real time, while avoiding the cumbersome construction and deployment process for the application to be integrated. With a simplified user interface and clear configuration options, developers can focus more on application design and feature implementation rather than getting bogged down in complex technical details. By reducing build and testing time, developers can accomplish more in the same amount of time, thus lowering the overall development cost of the project. Furthermore, the ability to preview in real-time reduces the costs associated with later modifications and fixes due to insufficient testing.
[0244] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0245] Please refer to Figure 10, which is a schematic diagram of the structure of a computer device provided in an embodiment of this application. As shown in Figure 10, the computer device 1000 may include: a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is configured to enable communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. As shown in Figure 10, the memory 1005, as a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.
[0246] In the computer device 1000 shown in Figure 10, the network interface 1004 provides network communication elements; the user interface 1003 is mainly configured to provide an input interface for users; and the processor 1001 can be configured to call the device control application stored in the memory 1005.
[0247] When the computer device 1000 is configured to execute the data processing device 1, it achieves the following:
[0248] The first device responds to the preview operation for the application to be integrated and displays the preview page of the application to be integrated in the business application; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed.
[0249] The preview page displays the application media content sent by the second device; the application media content is generated when the second device runs the application to be integrated.
[0250] In response to a trigger action on the preview page, the trigger information of the trigger action is sent to the second device;
[0251] If the second device detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the business content corresponding to the business function will be output in the preview page; the business content is the content obtained by the first device after executing the business function through the business application.
[0252] When the computer device 1000 is configured to execute the data processing device 2, it achieves the following:
[0253] The second device displays data connection information; the data connection information is used to instruct the first device to establish a device connection relationship with the second device.
[0254] If a device connection has been established with the first device, the application to be integrated is run in the application development platform, and the application media content of the running application to be integrated is sent to the first device so that the first device displays the preview page of the application to be integrated in the business application and outputs the application media content in the preview page; the application to be integrated is used to be converted into a mini-program that can be integrated into the business application when the application to be integrated is developed; the business application is the application in the first device;
[0255] Obtain the trigger information sent by the first device for the trigger operation on the preview page;
[0256] If the trigger information is detected to be associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the first device is notified to execute the business function through the business application; the preview page is also used to display the business content obtained after the first device executes the business function through the business application.
[0257] It should be understood that the computer device 1000 described in the embodiments of this application can execute the data processing method described in any of the embodiments corresponding to Figures 3, 5, and 7 above, and will not be repeated here. In addition, the beneficial effects of using the same method will not be repeated here either.
[0258] Furthermore, it should be noted that this application also provides a computer-readable storage medium storing a computer program. When the processor executes the computer program, it can perform the data processing method described in any of the embodiments corresponding to Figures 3, 5, and 7 above. Therefore, it will not be repeated here. Additionally, the beneficial effects of using the same method will not be repeated here either. For technical details not disclosed in the embodiments of the computer-readable storage medium involved in this application, please refer to the description of the method embodiments of this application.
[0259] The aforementioned computer-readable storage medium may be an internal storage unit of the data processing apparatus or computer device provided in any of the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. In some embodiments, the computer-readable storage medium may include both internal and external storage units of the computer device. The computer-readable storage medium is configured to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be configured to temporarily store data that has been displayed or will be displayed.
[0260] Furthermore, it should be noted that this application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method provided in any of the embodiments corresponding to Figures 3, 5, and 7 above.
[0261] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0262] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the foregoing description as a network element. Whether these network elements are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can implement the described network elements using different methods for each specific application, but such implementation should not be considered beyond the scope of this application.
[0263] The methods and related apparatus provided in this application are described with reference to at least one of the method flowcharts and structural diagrams provided in this application. Specifically, each of the at least one of the processes and blocks in the at least one of the method flowcharts and structural diagrams, as well as combinations of at least one of the processes and blocks in the at least one of the flowcharts and block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to produce a machine, such that the instructions, which execute through the processor of the computer or other programmable device, create means for implementing the functions specified in at least one of the following: the means specified in one or more flowcharts and one or more structural diagram blocks. These computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in at least one of the following: the means specified in one or more flowcharts and one or more structural diagram blocks. These computer program instructions may also be loaded onto a computer or other programmable device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable device, provide steps for implementing a function specified in at least one of the following: a flowchart of one or more processes, or a structural diagram of one or more blocks.
[0264] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.
[0265] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.
[0266] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method, the method being executed by a first device, comprising: The first device responds to the preview operation for the application to be integrated and displays the preview page of the application to be integrated in the business application; The application media content sent by the second device is output on the preview page; The application media content is generated when the second device runs the application to be integrated; In response to a trigger operation on the preview page, the trigger information of the trigger operation is sent to the second device; If the second device detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the business content corresponding to the business function is output in the preview page; the business content is the content obtained by the first device after executing the business function through the business application.
2. The method of claim 1, wherein, Also includes: If the second device detects that the trigger information is associated with the second control, and the second control is a control used to call the integrated function of the application to be integrated in the application to be integrated, then the updated application media content corresponding to the integrated function sent by the second device is output in the preview page; the updated application media content is the content obtained by the second device after executing the integrated function through the application to be integrated.
3. The method of claim 1 or 2, wherein, Also includes: The trigger information of the triggering operation displays the trigger feedback information corresponding to the triggering operation; The trigger feedback information is used to indicate the location of the trigger operation performed by the object on the screen of the first device.
4. The method according to any one of claims 1 to 3, wherein, The first device responds to a preview operation for the application to be integrated, and displays a preview page of the application to be integrated in the business application, including: The first device responds to a QR code scanning operation for a business application. If it detects that the application code obtained by the scanning operation is associated with the application to be integrated, it displays a preview page of the application to be integrated in the business application. The application code is generated and displayed by the second device.
5. The method according to any one of claims 1 to 3, wherein, The first device responds to a preview operation for the application to be integrated, and displays a preview page of the application to be integrated in the business application, including: The first device responds to the startup operation and displays the initial connection page in the business application; In response to an input operation on the initial connection page, if the object input information obtained by the input operation matches the communication information corresponding to the second device, then a preview page of the application to be integrated is displayed in the business application; the communication information is generated by the second device and is used to establish a device connection relationship with the second device.
6. The method according to any one of claims 1 to 5, wherein, Also includes: Data connection information is obtained based on the preview operation of the application to be integrated; A device connection relationship is established between the first device and the second device through the data connection information, and the device information of the first device is sent to the second device through the device connection relationship; The device information is used to instruct the second device to generate application media content that matches the device information.
7. The method according to any one of claims 1 to 6, wherein, The response to the triggering operation of the preview page includes sending the triggering information of the triggering operation to the second device, comprising: In response to a trigger operation on the preview page, obtain M preview page frames corresponding to the trigger operation, and obtain the interaction positions corresponding to the M preview page frames respectively; M is a positive integer, and the preview page frames are the screen information output by the preview page at different times; Trigger information for the triggering operation is generated based on M interaction locations, and the trigger information for the triggering operation is sent to the second device.
8. The method according to any one of claims 1 to 7, wherein, Also includes: The interface information sent by the second device is obtained, and the business function is called through the interface information in the business application to execute the business function and obtain the business content corresponding to the business function; the interface information is obtained by the second device based on the trigger information in the application to be integrated.
9. A data processing method, the method being executed by a second device, comprising: The second device displays data connection information; The data connection information is used to instruct the first device to establish a device connection relationship with the second device; If a device connection relationship has been established with the first device, the application to be integrated is run in the application development platform, and the application media content of the running application to be integrated is sent to the first device so that the first device displays a preview page of the application to be integrated in the business application and outputs the application media content in the preview page. The application to be integrated is used to be converted into a mini-program that can be integrated into a business application when the application to be integrated is developed; the business application is an application in the first device. Obtain trigger information from the first device regarding the trigger operation on the preview page; If the triggering information is detected to be associated with a first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the first device is notified to execute the business function through the business application; the preview page is also used to display the business content obtained by the first device after executing the business function through the business application.
10. The method according to claim 9, wherein, Also includes: Display a data configuration page in the application development platform; the data configuration page displays a settings window containing N data items; N is a positive integer. In response to the setting operation for the N data items, the format parameters set by the object for the N data items are displayed in the setting window; In response to the confirmation operation on the data configuration page, the format parameters displayed in the settings window are determined as the preview output format; the preview output format is used to instruct the second device to generate application media content that matches the preview output format.
11. The method according to claim 9 or 10, wherein, Also includes: Obtain the device information sent by the first device, and display the format parameters that match the device information on the data configuration page; In response to the confirmation operation on the data configuration page, the format parameters displayed in the settings window are determined as the preview output format; the preview output format is used to instruct the second device to generate application media content that matches the preview output format.
12. The method according to claim 10 or 11, wherein, The step of running the application to be integrated in the application development platform and sending the application media content of the running application to be integrated to the first device includes: A media content connection relationship with the first device is established based on a point-to-point real-time communication protocol. The application to be integrated is run in the application development platform. Media content is recorded on the running application based on the preview output format to obtain application media content. The application media content is then sent to the first device through the media content connection relationship.
13. The method according to claim 12, wherein, Before establishing a media content connection with the first device based on a point-to-point real-time communication protocol, the process includes: A second connection identifier is generated based on a point-to-point real-time communication protocol. The second connection identifier is sent to the first device, and the second connection identifier is used to instruct the first device to establish a media content connection relationship with the second device based on the second connection identifier and the point-to-point real-time communication protocol.
14. The method according to any one of claims 9 to 13, wherein, Also includes: Based on the screen display information of the application to be integrated running in the application development platform, a screen display coordinate system is established. Based on the device information and the screen display information, a coordinate deviation coefficient is generated. The trigger information is mapped to the screen display coordinate system through the coordinate deviation coefficient to obtain coordinate information. If the coordinate information matches the display area of the first control in the application to be integrated in the screen display coordinate system, then it is determined that the trigger information is associated with the first control.
15. The method according to any one of claims 9 to 14, wherein, The application to be integrated includes functional interaction code; if the triggering information is detected to be associated with a first control, and the first control is a control in the application to be integrated used to call the business function of the business application, then the first device is notified to execute the business function through the business application, including: If the triggering information is associated with a first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then the interface information corresponding to the business function is obtained in the functional interaction code through the triggering information, and the interface information is sent to the first device through a signaling connection, so that the first device calls the business function through the interface information in the business application, executes the business function, and obtains the business content corresponding to the business function.
16. The method according to claim 14 or 15, wherein, Also includes: The synchronous function corresponding to the application development platform is asynchronously initialized; the synchronous function is used to asynchronously transmit the initial interface information of the business application to the application to be integrated; the initial interface information includes the interface information corresponding to the first control; If the asynchronous initialization of the synchronization function is detected to be successful or timed out, the communication address and communication port of the second device are obtained, and data connection information is generated based on the bidirectional communication protocol, the communication address and the communication port.
17. The method according to any one of claims 9 to 16, wherein, The application to be integrated includes functional interaction code; the method further includes: If the triggering information is associated with the second control, and the second control is a control used to call the integrated function of the application to be integrated, then the call information corresponding to the integrated function is obtained in the function interaction code through the triggering information, the call information is processed through the function interaction code to obtain the updated application media content corresponding to the integrated function, and the updated application media content is sent to the first device.
18. The method according to any one of claims 9 to 17, wherein, Also includes: Obtain the execution result information for the service function sent by the first device, call the target function associated with the service function in the application to be integrated based on the execution result information, execute the target function in the application to be integrated, obtain the target application media content, and send the target application media content to the first device.
19. A data processing apparatus, wherein the data processing apparatus is applied to a first device, the data processing apparatus comprising: The preview page display module is configured to respond to preview operations for the application to be integrated and display the preview page of the application to be integrated in the business application. The media content output module is configured to output application media content sent by the second device to the preview page; the application media content is generated when the second device runs the application to be integrated. The trigger processing module is configured to respond to a trigger operation on the preview page and send the trigger information of the trigger operation to the second device; The business function processing module is configured to output the business content corresponding to the business function in the preview page if the second device detects that the trigger information is associated with the first control, and the first control is a control used to call the business function of the business application in the application to be integrated; the business content is the content obtained by the first device after executing the business function through the business application.
20. A data processing apparatus, applied to a second device, the data processing apparatus comprising: The data connection information display module is configured to display data connection information. The data connection information is used to instruct the first device to establish a device connection relationship with the second device; The media content sending module is configured to, if a device connection relationship has been established with the first device, run the application to be integrated in the application development platform and send the application media content of the running application to be integrated to the first device, so that the first device displays a preview page of the application to be integrated in the business application and outputs the application media content in the preview page; The application to be integrated is used to be converted into a mini-program that can be integrated into a business application when the application to be integrated is developed; the business application is an application in the first device. The trigger information acquisition module is configured to acquire trigger information sent by the first device for a trigger operation on the preview page; The interface information processing module is configured to, if it detects that the trigger information is associated with a first control, and the first control is a control used to call the business function of the business application in the application to be integrated, then notify the first device to execute the business function through the business application; the preview page is also used to display the business content obtained by the first device after executing the business function through the business application.
21. A computer device, comprising: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is configured to provide data communication functions, the memory is configured to store computer programs, and the processor is configured to invoke the computer programs to cause the computer device to perform the method according to any one of claims 1-18.
22. A computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-18.
23. A computer program product comprising a computer program stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-18.