Data processing method and device, electronic equipment and storage medium
By integrating running programs and compiling environment data in the live broadcast plug-in, the problem of live broadcast code not adapting to the application compilation environment is solved, and the normal access and stability of live broadcast are improved.
Patent Information
- Application Number
- CN202410027807.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, the live broadcast code does not match the compilation environment of the application, resulting in the problem of not being able to broadcast normally.
By integrating the running program data and compiling environment data in the live broadcast plug-in, the live broadcast interface layer is initialized, and when receiving instructions to call the live broadcast plug-in, the preloaded live broadcast plug-in is called to realize the independent compilation and operation of the live broadcast function.
Ensure normal access to live streaming, reduce the cost of live streaming access, improve the fluency and stability of live streaming, and avoid the need for environmental adaptation.
Smart Images

Figure CN120276785A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technologies, and particularly to a data processing method, apparatus, electronic device, and storage medium. Background Art
[0002] With the development of computer technologies, more and more users will watch live broadcasts on applications. At this time, it is necessary to access the live broadcast room to implement the live broadcast function on the application.
[0003] Currently, the common way to access a live broadcast is to first package the code for implementing the live broadcast function into a file, load the file into the application program, compile and run the live broadcast code in the environment of the application program. After the compilation is completed, the live broadcast is accessed on the application. However, this method has a problem that the live broadcast cannot be carried out due to the incompatibility between the compilation environments of the live broadcast code and the application program. Summary of the Invention
[0004] The present disclosure provides a data processing method, apparatus, electronic device, and storage medium to ensure normal access to the live broadcast while reducing the cost of live broadcast access and improving the efficiency of live broadcast access, achieving the effects of improving the fluency and stability of the live broadcast.
[0005] In a first aspect, an embodiment of the present disclosure provides a data processing method, which includes:
[0006] Initializing a live broadcast interface layer of a host program when receiving an instruction to call a live broadcast plugin;
[0007] Invoking a pre-loaded live broadcast plugin based on the live broadcast interface layer;
[0008] Performing a live broadcast on the host program based on the running program data and compilation environment data integrated in the live broadcast plugin.
[0009] In a second aspect, an embodiment of the present disclosure further provides a data processing apparatus, which includes:
[0010] A live broadcast interface layer initialization module, configured to initialize a live broadcast interface layer of a host program when receiving an instruction to call a live broadcast plugin;
[0011] A live broadcast plugin invocation module, configured to invoke a pre-loaded live broadcast plugin based on the live broadcast interface layer;
[0012] A live broadcast module, configured to perform a live broadcast on the host program based on the running program data and compilation environment data integrated in the live broadcast plugin.
[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, which includes:
[0014] One or more processors;
[0015] A storage device for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method described in any one of the embodiments of the present disclosure.
[0017] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, they are used to execute the data processing method described in any one of the embodiments of the present disclosure.
[0018] The technical solution of the embodiment of the present disclosure initializes the live interface layer of the host program when receiving an instruction to call the live plugin; calls the pre-loaded live plugin based on the live interface layer; and performs live broadcast on the host program based on the running program data and compilation environment data integrated in the live plugin. This solves the problem in the related art that when compiling and running live function code in an application program, the compilation environment is not compatible, resulting in the inability to perform live broadcast. By integrating the running program data and compilation environment data used for live broadcast into the live plugin in advance, when receiving an instruction to call the live plugin, the initialized live interface layer is used to call the pre-loaded live plugin, realizing the compilation and running of the program data using the compilation environment data of the live plugin itself, implementing the live broadcast function on the host program, being independent of the compilation environment of the host program, ensuring the correctness of code compilation and running while ensuring normal live access, eliminating the need for environment adaptation, reducing the cost of live access, and improving the efficiency of live access, achieving the effect of improving the fluency and stability of live broadcast. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In combination with the accompanying drawings and referring to the following specific embodiments, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the original components and elements are not necessarily drawn to scale.
[0020] Figure 1 It is a schematic flowchart of a data processing method provided by an embodiment of the present disclosure;
[0021] Figure 2 It is a schematic diagram of the data processing method provided by an embodiment of the present disclosure;
[0022] Figure 3 It is a schematic diagram of the data processing method provided by an embodiment of the present disclosure;
[0023] Figure 4 It is a schematic flowchart of another data processing method provided by an embodiment of the present disclosure;
[0024] Figure 5 Schematic diagram of the data processing method provided by an embodiment of the present disclosure;
[0025] Figure 6 Flow schematic diagram of another data processing method provided by an embodiment of the present disclosure;
[0026] Figure 7 Schematic diagram of the data processing method provided by an embodiment of the present disclosure;
[0027] Figure 8 Schematic diagram of the structure of a data processing apparatus provided by an embodiment of the present disclosure;
[0028] Figure 9 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0030] It should be understood that the steps recited in the method embodiments of the present disclosure can be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0031] The term "including" and its variations used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.
[0033] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly specified in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.
[0035] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0036] For example, when responding to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that executes the operation of the technical solution of the present disclosure according to the prompt message.
[0037] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0038] It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative and does not constitute a limitation on the implementation manner of the present disclosure. Other manners that meet relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0039] It can be understood that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related provisions.
[0040] Before introducing the present technical solution, an exemplary description of the application scenario can be given first. This technical solution can be applied to any scenario that needs to access a live broadcast. For example, when using a certain application, it is necessary to access a live broadcast in the application, and the access to the live broadcast can be realized based on the technical solution of the embodiments of the present disclosure.
[0041] Figure 1 It is a schematic flowchart of a data processing method provided by an embodiment of the present disclosure. The embodiments of the present disclosure are applicable to any scenario that needs to access a live broadcast. This method can be executed by a data processing device, and the device can be implemented in the form of software and / or hardware. Optionally, it is implemented by an electronic device, and the electronic device can be a mobile terminal, a PC terminal or a server, etc.
[0042] As Figure 1 shown, the method of this embodiment may specifically include:
[0043] S110. When receiving an instruction to call the live broadcast plugin, initialize the live broadcast interface layer of the host program.
[0044] Among them, the live broadcast plugin can be an executable file for implementing the live broadcast function, and it can be files in different formats. Optionally, the live broadcast plugin is an Apk format file. The live broadcast required running program data, resource data, and compilation environment data are integrated in the live broadcast plugin. The running program data can include the implementation code data of the live broadcast software development kit. The compilation environment data can refer to the software environment data on which the live broadcast software depends. For example, it can be the first running environment or the second running environment different from the first running environment. The host program can be an application program to be connected to the live broadcast. For example, it can be a news application program, a game application program, a teaching application program, a management application program, an e-commerce application program, an Internet of Things application program, and so on. The live broadcast interface layer is used to provide an interface for initializing the live broadcast and an interface for entering the live broadcast room.
[0045] In this embodiment, a live broadcast control can be developed in advance on the host program application. When the user clicks on this control, it is considered that an instruction to call the live broadcast plugin is received. At this time, the live broadcast interface layer in the host program can be initialized through a script or a command. During the process of initializing the live broadcast interface layer, some testing and debugging work can be carried out, such as checking whether the interface is normal and detecting performance indicators, etc., to ensure that the live broadcast interface layer can work properly and successfully call the live broadcast plugin. Or, it can also be that when the host program application is started, the live broadcast interface layer of the host program is automatically initialized.
[0046] Exemplarily, refer to Figure 2 , the host application can be started, and then the live broadcast interface layer in the host program of the host application can be initialized to call the interface for initializing the live broadcast in the live broadcast interface layer.
[0047] S120. Based on the live broadcast interface layer, call the pre-loaded live broadcast plugin.
[0048] In this embodiment, after the live broadcast interface layer is initialized, the pre-loaded live broadcast plugin can be called through the interface for calling the live broadcast plugin in the live broadcast interface layer. Exemplarily, refer to Figure 3 , the live broadcast plugin can be called by reflection using the live broadcast interface layer.
[0049] In this embodiment, after calling the pre-loaded live broadcast plugin based on the live broadcast interface layer, it further includes: installing the live broadcast plugin and initializing the live broadcast plugin to load the running program data and compilation environment data integrated in the live broadcast plugin; after the initialization is completed, call the interface for entering the live broadcast room based on the live broadcast interface layer to enter the live broadcast room.
[0050] Specifically, after calling the pre-loaded live plugin, the live plugin can be loaded and installed to obtain the integrated program running data and compilation environment data in the live plugin. Furthermore, initialize the live plugin. For example, it includes initializing the internal state of the plugin, allocating resources, starting threads, etc. The advantage of initialization is that it enables the live plugin to work properly and be ready to receive and process live-related requests. After the initialization is completed, an interface to enter the live room can be called based on the live interface layer, so as to enter the live room through the interface.
[0051] Exemplarily, continue to refer to Figure 2 , call the interface for initializing the live broadcast to call the live plugin, then download the live plugin, load the live plugin, install the live plugin, and initialize the live plugin to initialize the live function. After the live initialization is completed, call the interface to enter the live room and enter the live room.
[0052] S130. Perform live broadcast on the host program based on the integrated program running data and compilation environment data in the live plugin.
[0053] In this embodiment, the integrated program running data in the live plugin can be compiled and run in the compilation environment data, which is independent of the compilation and running of the host program, realizing live broadcast in the host program through the live plugin and providing a live viewing experience for the application users of the host program.
[0054] The technical solution of the embodiments of the present disclosure initializes the live interface layer of the host program when receiving an instruction to call the live plugin; calls the pre-loaded live plugin based on the live interface layer; performs live broadcast on the host program based on the integrated program running data and compilation environment data in the live plugin, solving the problem in the related art that when compiling and running live function code on an application program, the compilation environment is not compatible, resulting in the inability to perform live broadcast. It realizes that by first integrating the program running data and compilation environment data used for live broadcast in the live plugin, when receiving an instruction to call the live plugin, the initialized live interface layer is used to call the pre-loaded live plugin, realizing the compilation and running of the program data using the compilation environment data of the live plugin itself, implementing the live function on the host program, decoupling from the compilation environment of the host program, ensuring the correctness of code compilation and running while ensuring the normal access of the live broadcast, eliminating the need for environment adaptation, reducing the cost of live broadcast access, and improving the efficiency of live broadcast access, achieving the effect of improving the fluency and stability of the live broadcast.
[0055] Figure 4 FIG. is a schematic flowchart of another data processing method provided by the embodiments of the present disclosure. Based on the above embodiments, the technical solution of this embodiment can also pre-package the live plugin for future calls. The same or similar technical features as those in the foregoing embodiments will not be described in detail here.
[0056] As Figure 4 shown, the method of this embodiment may specifically include:
[0057] S210. Determine the operating program data used for the live broadcast.
[0058] In this embodiment, the operating program data used for the live broadcast can be determined according to various information such as the protocol, encoding, interactive function, and data transmission of the live broadcast platform. Optionally, the operating program data includes, but is not limited to, the live stream protocol that the data used for the live broadcast needs to follow, audio and video encoding, interfaces of interactive functions (such as sending bullet screens, liking, etc.), network connection, and bandwidth, etc.
[0059] S220. Determine the compilation environment data used for the live broadcast.
[0060] In this embodiment, the compilation environment data used for the live broadcast can be determined according to the operating program data used for the live broadcast. For example, the compilation environment data may include a compiler, dependency libraries, configuration files, etc., for use when compiling the operating program data.
[0061] In this embodiment, it further includes: determining the resource data used for the live broadcast. For example, the resource data includes audio and video resources, interactive resources, storage and cache resources (such as storing live videos, caching interactive information, etc.), rendering resources (such as a rendering engine and processing logic to implement the presentation of special effects and animations), and second-party libraries, third-party libraries, etc. used for the live broadcast.
[0062] S230. Package the operating program data and the compilation environment data through a packaging tool to obtain a live broadcast plugin.
[0063] In this embodiment, the operating program data, compilation environment data, and resource data used for the live broadcast can be packaged through a packaging tool to obtain a live broadcast plugin.
[0064] Exemplarily, when packaging the live broadcast plugin, the compilation environment data, second-party libraries, third-party libraries, and operating program data used for the live broadcast service can be packaged in the plugin through a packaging tool to obtain the live broadcast plugin. It should be noted that when the compilation environment data is selected to be packaged in the plugin during the packaging of the live broadcast plugin, each host application can load and use the packaged plugin to implement the live broadcast function. Exemplarily, reference can be made to Figure 5 , the hosts in the first operating environment include Application 1, Application 2, and Application 3. The hosts in the second operating environment include Application 4, Application 5, and Application 6. Each host application can load and use the live broadcast plugin with the built-in second operating environment. The live broadcast plugin will only use the second operating environment in its own package, which means that the plugin will not depend on the compilation environment of the host program or other external libraries, realizing the isolation of the compilation environment.
[0065] The technical solution of the embodiment of the present disclosure decouples the packaging process of the live plugin from the packaging process of the host program to achieve isolation during compilation. At the same time, the compilation environment data is packaged in the live plugin, so that the live plugin only uses the compilation environment data in its own package. Regardless of the compilation environment of the host program, it has nothing to do with the live plugin, achieving isolation during runtime, solving the problem of environment adaptation during access, reducing the live access cost, and reducing the running time. At the same time, by packaging the resource data into the live plugin, the functions in the live plugin only use the second-party libraries and third-party library classes in the plugin and do not use the class libraries in the host, and the host program cannot call the class libraries in the plugin either, thus solving the problem of adaptation of the second-party libraries and third-party libraries during access and solving the problem of resource conflicts, achieving the effect of reducing the access workload, and further improving the stability and fluency of the live broadcast.
[0066] Figure 6 It is a schematic flowchart of another data processing method provided by the embodiment of the present disclosure. The technical solution of this embodiment further refines S130 on the basis of the above embodiment. Among them, the same or similar technical features as those in the foregoing embodiments will not be described in detail here.
[0067] As Figure 6 shown, the method of this embodiment may specifically include:
[0068] S310. When receiving an instruction to call the live plugin, initialize the live interface layer of the host program.
[0069] S320. Call the pre-loaded live plugin based on the live interface layer.
[0070] S330. Load the running program data based on the plugin class loader in the live plugin, and load the resource data in the live plugin based on the plugin resource loader in the live plugin.
[0071] Among them, the plugin class loader may be a class loader for loading the running program data in the plugin. The plugin resource loader may be a class loader for loading the resource data in the plugin. The running program data and the resource data are the data required during the live broadcast.
[0072] In this embodiment, the plugin class loader can be used in the live plugin to load the running program data in the live plugin, and the plugin resource loader can be used to load the resource data in the live plugin. Implement isolation between the code and resources of the plugin and the code and resources of the host program to avoid conflicts and interference.
[0073] In this embodiment, the data processing method further includes: when detecting the use of the program code in the host program, calling the host class loader based on the plugin class loader corresponding to the live plugin to load the program code in the host program based on the host class loader.
[0074] In practical applications, if it is detected that the program code in the host program needs to be used, the host class loader can be used through the plug-in class loader corresponding to the live broadcast plug-in to load the program code in the host program.
[0075] Exemplarily, referring to Figure 7 , the host class loader is held by the plug-in class loader. When the plug-in class loader holds the host class loader, it means that the plug-in class loader uses the host class loader to load the program code that it cannot handle itself. By delegating to the host class loader to load the program code in the host program. The advantage of this setting is that while ensuring that the program code of the plug-in can be correctly loaded, the program code of the application can be used.
[0076] In this embodiment, the data processing method further includes: when it is detected that the resource data in the host program is used, the host resource loader is called based on the plug-in resource loader corresponding to the live broadcast plug-in, so as to load the resource data in the host program based on the host resource loader.
[0077] In practical applications, if it is detected that the resource data in the host program needs to be used, the plug-in resource loader corresponding to the live broadcast plug-in can be used to call the host resource loader to load the resource data in the host program, so as to use the resource data in the host program. The advantage of this setting is that while ensuring that the resource data of the plug-in can be correctly loaded, the resource data of the application can be used.
[0078] Exemplarily, continue to refer to Figure 7 , when the plug-in resource loader is used to load the plug-in resources, the resources in the host program are loaded through the host resource loader, so that the live broadcast plug-in can use the resources in the host program.
[0079] It should be noted that the host class loader does not hold the plug-in class loader, and the host resource loader does not have the resources in the live broadcast plug-in, and does not invade the host program. Isolation from the host program is achieved at the code and resource levels, so that the host program and the live broadcast plug-in do not affect each other during operation.
[0080] S340. Load the compilation environment data to perform a live broadcast on the host program under the compilation environment data.
[0081] Specifically, the compilation environment data in the live broadcast plug-in can be read and loaded. After the compilation environment data is loaded, in the state where the host program is running normally, a live broadcast can be performed on the host program under the compilation environment data. The function of the live broadcast plug-in can be ensured to be correctly used through the compilation environment data.
[0082] In the technical solution of the embodiment of the present disclosure, the plugin class loader in the live plugin is used to load the program running data in the live plugin, and the plugin resource loader in the live plugin is used to load the resource data in the live plugin, so as to isolate the code and resources of the plugin from the code and resources of the host program, avoiding conflicts and interference. By loading the compilation environment data in the live plugin, live broadcast can be performed on the host program under the compilation environment data, ensuring that the functions of the live plugin can be used correctly.
[0083] Figure 8 FIG. is a schematic structural diagram of a data processing device provided by an embodiment of the present disclosure, as Figure 8 shown, the device includes: a live interface layer initialization module 410, a live plugin retrieval module 420, and a live module 430.
[0084] Among them, the live interface layer initialization module 410 is configured to initialize the live interface layer of the host program when receiving an instruction to call the live plugin; the live plugin retrieval module 420 is configured to call the pre-loaded live plugin based on the live interface layer; the live module 430 is configured to perform live broadcast on the host program based on the program running data and compilation environment data integrated in the live plugin.
[0085] Based on the above optional technical solutions, optionally, the device further includes: a live plugin encapsulation module, and the live plugin encapsulation module includes
[0086] a program running data determination unit, configured to determine the program running data used for live broadcast;
[0087] a determination unit, configured to determine the compilation environment data used for live broadcast;
[0088] a determination unit, configured to perform packaging processing on the program running data and the compilation environment data through a packaging tool to obtain the live plugin.
[0089] Based on the above optional technical solutions, optionally, the live module 430 includes: a data loading unit and a live unit; among them, the data loading unit is configured to load the program running data based on the plugin class loader in the live plugin, and load the resource data in the live plugin based on the plugin resource loader in the live plugin; the live unit is configured to load the compilation environment data to perform live broadcast on the host program under the compilation environment data; where the program running data and the resource data are the data required during the live broadcast process.
[0090] Based on the above optional technical solutions, the device further includes a program code detection unit.
[0091] A program code detection unit, configured to, when detecting the use of program code in the host program, call a host class loader based on a plugin class loader corresponding to the live plugin, so as to load the program code in the host program based on the host class loader.
[0092] Based on each of the above optional technical solutions, the device further includes a resource data detection unit.
[0093] The resource data detection unit is configured to, when detecting the use of resource data in the host program, call a host resource loader based on a plugin resource loader corresponding to the live plugin, so as to load the resource data in the host program based on the host resource loader.
[0094] Based on each of the above optional technical solutions, the device further includes a live plugin installation unit and a live room entry unit.
[0095] The live plugin installation unit is configured to install the live plugin and initialize the live plugin, so as to load the integrated running program data and compilation environment data in the live plugin;
[0096] The live room entry unit is configured to, after the initialization is completed, call an interface for entering the live room based on the live interface layer, so as to enter the live room.
[0097] The technical solution of the embodiment of the present disclosure, by initializing the live interface layer of the host program when receiving an instruction to call the live plugin; calling the pre-loaded live plugin based on the live interface layer; performing live broadcast on the host program based on the integrated running program data and compilation environment data in the live plugin, solves the problem in the related art that when compiling and running live function code on an application program, there is an inadaptation of the compilation environment, resulting in the inability to perform live broadcast. It realizes that by first integrating the running program data and compilation environment data used for live broadcast in the live plugin, when receiving an instruction to call the live plugin, using the initialized live interface layer to call the pre-loaded live plugin, realizing the compilation and running of program data using the compilation environment data of the live plugin itself, implementing the live function on the host program, decoupling from the compilation environment of the host program, ensuring the correctness of code compilation and operation while ensuring normal access to the live broadcast, eliminating the need for environment adaptation, reducing the cost of live broadcast access, improving the efficiency of live broadcast access, and achieving the effect of improving the fluency and stability of the live broadcast.
[0098] The data processing device provided by the embodiment of the present disclosure can execute the data processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the method.
[0099] It should be noted that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present disclosure.
[0100] Figure 9 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. The following refers to Figure 9 , which shows a schematic structural diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure (such as Figure 9 in the terminal device or server). The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 9 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0101] As Figure 9 shown, the electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An editing / output (I / O) interface 505 is also connected to the bus 504.
[0102] Generally, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 9 shows the electronic device 500 having various devices, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0103] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product that includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0104] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0105] The electronic device provided in the embodiments of the present disclosure and the data processing method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in the embodiments of the present disclosure may be referred to in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0106] Embodiments of the present disclosure provide a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the data processing method provided in the above embodiments is implemented.
[0107] It should be noted that the computer-readable medium described above in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0108] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0109] The above computer-readable medium can be included in the above electronic device; or it can exist separately and not be assembled into the electronic device.
[0110] The above computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: initialize the live interface layer of the host program when receiving an instruction to call the live plugin; call the pre-loaded live plugin based on the live interface layer; and perform a live broadcast on the host program based on the program running data and compilation environment data integrated in the live plugin.
[0111] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0112] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the block may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0113] The units involved in the embodiments described in the present disclosure may be implemented in software or in hardware. Among them, the name of the unit does not constitute a limitation to the unit itself in some cases. For example, the first acquisition unit may also be described as "the unit for acquiring at least two Internet protocol addresses".
[0114] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0115] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM or Flash Memory), an optical fiber, a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] According to one or more embodiments of this disclosure, [Example 1] provides a data processing method, which includes:
[0117] When receiving an instruction to call a live plugin, initialize the live interface layer of the host program;
[0118] Call the pre-loaded live plugin based on the live interface layer;
[0119] Perform live streaming on the host program based on the program running data and compilation environment data integrated in the live plugin.
[0120] According to one or more embodiments of this disclosure, [Example 2] provides a data processing method, which further includes:
[0121] Package to obtain the live plugin;
[0122] According to one or more embodiments of this disclosure, [Example 3] provides a data processing method, which further includes:
[0123] Determine the program running data used for live streaming;
[0124] Determine the compilation environment data used for live streaming;
[0125] Package and process the program running data and the compilation environment data through a packaging tool to obtain the live plugin.
[0126] According to one or more embodiments of the present disclosure, [Example Four] provides a data processing method, further including:
[0127] Loading the running program data based on the plugin class loader in the live broadcast plugin, and loading the resource data in the live broadcast plugin based on the plugin resource loader in the live broadcast plugin;
[0128] Loading the compilation environment data to perform a live broadcast on the host program under the compilation environment data;
[0129] Wherein, the running program data and the resource data are the data required during the live broadcast process.
[0130] According to one or more embodiments of the present disclosure, [Example Five] provides a data processing method, further including:
[0131] When detecting the use of the program code in the host program, calling the host class loader based on the plugin class loader corresponding to the live broadcast plugin to load the program code in the host program based on the host class loader.
[0132] According to one or more embodiments of the present disclosure, [Example Six] provides a data processing method, further including:
[0133] When detecting the use of the resource data in the host program, calling the host resource loader based on the plugin resource loader corresponding to the live broadcast plugin to load the resource data in the host program based on the host resource loader.
[0134] According to one or more embodiments of the present disclosure, [Example Seven] provides a data processing method, further including:
[0135] Installing the live broadcast plugin and initializing the live broadcast plugin to load the running program data and compilation environment data integrated in the live broadcast plugin;
[0136] After the initialization is completed, calling the interface to enter the live broadcast room based on the live broadcast interface layer to enter the live broadcast room.
[0137] According to one or more embodiments of the present disclosure, [Example Eight] provides a data processing device, including:
[0138] A live broadcast interface layer initialization module, configured to initialize the live broadcast interface layer of the host program when receiving an instruction to call the live broadcast plugin;
[0139] A live broadcast plugin retrieval module, configured to call a pre-loaded live broadcast plugin based on the live broadcast interface layer;
[0140] A live broadcast module, configured to perform live broadcast on the host program based on the operation program data and compilation environment data integrated in the live broadcast plugin.
[0141] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.
[0142] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although a number of specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments may also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0143] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms for implementing the claims.
Claims
1. A data processing method, characterized in that, including: When receiving an instruction to call the live plugin, initialize the live interface layer of the host program; Call the pre-loaded live plugin based on the live interface layer; Conduct live streaming on the host program based on the runtime program data and compilation environment data integrated in the live plugin.
2. The method according to claim 1, wherein It also includes: Encapsulate to obtain the live plugin; The encapsulating to obtain the live plugin includes: Determine the runtime program data used for live streaming; Determine the compilation environment data used for live streaming; Use a packaging tool to package the runtime program data and the compilation environment data to obtain the live plugin.
3. The method according to claim 1, characterized in that, The conducting live streaming on the host program based on the runtime program data and compilation environment data integrated in the live plugin includes: Load the runtime program data based on the plugin class loader in the live plugin, and load the resource data in the live plugin based on the plugin resource loader in the live plugin; Load the compilation environment data to conduct live streaming on the host program under the compilation environment data; wherein, the runtime program data and the resource data are the data required during the live streaming process.
4. The method according to claim 1, wherein It also includes: When detecting the use of the program code in the host program, call the host class loader based on the plugin class loader corresponding to the live plugin, so as to load the program code in the host program based on the host class loader.
5. The method according to claim 1, wherein It also includes: When detecting the use of the resource data in the host program, call the host resource loader based on the plugin resource loader corresponding to the live plugin, so as to load the resource data in the host program based on the host resource loader.
6. The method according to claim 1, wherein After the calling the pre-loaded live plugin based on the live interface layer, the method further includes: Install the live plugin and initialize the live plugin to load the runtime program data and compilation environment data integrated in the live plugin; After the initialization is completed, call the interface to enter the live room based on the live interface layer to enter the live room.
7. A data processing device, characterized in that, including: A live interface layer initialization module, configured to initialize the live interface layer of the host program when receiving an instruction to call the live plugin; A live plugin retrieval module, configured to call the pre-loaded live plugin based on the live interface layer; A live module, configured to conduct live streaming on the host program based on the runtime program data and compilation environment data integrated in the live plugin.
8. The device according to claim 7, characterized in that, The live module includes: a data loading unit and a live streaming unit; wherein, The data loading unit is configured to load the runtime program data based on the plugin class loader in the live plugin, and load the resource data in the live plugin based on the plugin resource loader in the live plugin; The live streaming unit is configured to load the compilation environment data to conduct live streaming on the host program under the compilation environment data; wherein, the runtime program data and the resource data are the data required during the live streaming process.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method according to any one of claims 1-6.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the data processing method according to any one of claims 1-6 when executed by a computer processor.