Function processing method and apparatus, electronic device, storage medium, and program product
Patent Information
- Application Number
- CN202510467518.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]本公开提供功能处理方法、装置、电子设备、存储介质及程序产品,以解决内存占过高导致的问题
Smart Images

Figure HDA0005359339810000011 
Figure HDA0005359339810000021 
Figure HDA0005359339810000031
Abstract
Description
Technical Field
[0001] This disclosure relates to computer technology, and more particularly to functional processing methods, apparatus, electronic devices, storage media, and program products. Background Technology
[0002] With the rapid development of the internet, the application scenarios of live streaming technology have gradually expanded to multiple fields. Live streaming, as a way to transmit video and audio content in real time via the internet, has been deeply integrated into various applications, becoming one of the functions provided by these applications. For example, broadcasters can access the live streaming page through the application's live streaming portal to start their broadcasts.
[0003] However, in implementing functions such as live streaming through the application, there is a problem of excessive memory consumption. Summary of the Invention
[0004] This disclosure provides functional processing methods, apparatus, electronic devices, storage media, and program products to solve problems caused by excessive memory usage.
[0005] In a first aspect, embodiments of this disclosure provide a functional processing method, including:
[0006] The application's main process detects triggered operations for the first functional control.
[0007] Through the first main process, in response to a trigger operation on the first functional control, a sub-process is started;
[0008] The first main process is terminated through the child process;
[0009] The first function corresponding to the first functional control is executed through the second main process.
[0010] Secondly, embodiments of this disclosure also provide a functional processing apparatus, including:
[0011] The detection module is used to detect trigger operations on the first functional control through the first main process and the first functional control of the application.
[0012] The startup module is used to start a subprocess in response to a trigger operation on the first functional control through the first main process;
[0013] A termination module is used to terminate the first main process through the subprocess;
[0014] The execution module is used to execute the first function corresponding to the first functional control through the second main process.
[0015] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0016] One or more processing devices;
[0017] Storage device for storing one or more programs.
[0018] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the methods provided in the embodiments of this disclosure.
[0019] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the methods provided in embodiments of this disclosure.
[0020] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the method provided according to embodiments of this disclosure.
[0021] In this embodiment, a first main process detects trigger operations on a first functional control. Upon detection, a child process is started by the first main process to terminate the first main process of the application, and the first function is executed by a second main process. This disclosure uses a second main process to execute the first function and terminate the first main process, reducing memory usage when the first function is executed by the first main process of the application. This improves the performance of executing the first function. Attached Figure Description
[0022] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0023] Figure 1 This is a flowchart illustrating a functional processing method provided in an embodiment of this disclosure;
[0024] Figure 2 This is a flowchart illustrating another functional processing method provided in an embodiment of this disclosure;
[0025] Figure 3 This is a flowchart illustrating another functional processing method provided in an embodiment of this disclosure;
[0026] Figure 4 This is a schematic diagram of the structure of a functional processing device provided in an embodiment of this disclosure;
[0027] Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0028] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0029] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0030] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "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". Definitions of other terms will be given in the description below.
[0031] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only 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 interdependencies.
[0032] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0033] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0034] Figure 1 This is a flowchart illustrating a functional processing method provided in an embodiment of this disclosure. This embodiment is applicable to the implementation of a first function within an application. The method can be executed by a functional processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.
[0035] like Figure 1 As shown, the method includes:
[0036] S110. Detect trigger operations for the first functional control through the first main process of the application.
[0037] A process is an instance of a running program and is the basic unit for resource allocation and scheduling by the operating system. The main process is an independent execution instance of an application, responsible for starting the entire application and completing a series of initialization tasks. The operating system can create the application's main process when the application starts. The main process is the first process created when the application starts.
[0038] In this disclosure, the first main process and the second main process can be different main processes. The second main process can be a main process used for the first function, such as a main process that is a trimmed-down version of the functions included in the first main process. The first main process and the second main process exist at different times. The first main process can be a main process created after the application starts. The second main process can be a main process created when the application implements the first function. The first main process and the second main process do not exist simultaneously.
[0039] The first functional control can be considered as the control that triggers the application to implement the first function. The first functional control can be the entry point for the first function. After the first functional control is triggered, the application can implement the first function. For example, after the first functional control is clicked, the application can display a page that implements the first function. In this disclosure, the page implementing the first function can be displayed through a second main process, and the detection of the triggering operation of the first functional control can be performed by the first main process.
[0040] A trigger operation can be considered as activating a primary functional control to perform that primary function. The form of the trigger operation is not limited here; it can be a click, etc.
[0041] In this operation, the application's main process detects the first functional control within the application to determine if there is a triggering operation for that control, thus determining whether the first function needs to be implemented. The detection method is not limited here; it can be determined by detecting the state of the first functional control.
[0042] In this operation, the first main process can be initialized after the application is opened. The application can be considered as an application capable of performing multiple functions, including the first function. The first function can be a pre-defined function, which may support the use of the trimmed main process. For example, the first function may not allow for navigation between other functions, such as jumping from the first function to other functions.
[0043] In this embodiment, the application is not limited and can be an application that integrates multiple functions. This disclosure can be applied to the live streaming scenario of large applications. A large application can be considered as having complex functions, such as an application that includes multiple functions. The first function in this disclosure can include a live streaming function and can also include a music playback function.
[0044] Before the main process detects the trigger operation on the first functional control, this operation can execute functions other than the first function corresponding to the first functional control, such as executing the video viewing function. The triggering of the video viewing function is not limited here; it can be displayed after the application starts, or it can be displayed after the control corresponding to the video viewing function is triggered.
[0045] S120. The first main process starts the subprocess in response to the trigger operation of the first functional control.
[0046] A child process can be a process created by the main process. Within the operating system, it can exist as an independent execution unit. The main process creates the child process through specific system calls or functions. During creation, parameters can be passed to the child process so that it can perform specific tasks based on these parameters. In this embodiment, the child process can manage the main process, such as terminating and starting it.
[0047] In this embodiment, after the first main process detects the trigger operation of the first functional control, the first main process starts a subprocess to respond to the trigger operation of the first functional control.
[0048] This operation is initiated through the primary process, also known as launching a child process. For example, it involves starting a new process as a child process.
[0049] S130. Terminate the first main process through the subprocess.
[0050] After starting the child process, this operation can initialize the child process and then terminate the first main process.
[0051] In this disclosure, process initialization, such as initializing a child process, initializing a first main process, and initializing a second main process, can involve allocating resources, setting up the environment, and configuring parameters for the process. For example, in an operating system or application, this involves setting various process-related resources, states, and parameters to initial values to prepare the process for performing a specific task.
[0052] Resource allocation can involve allocating necessary resources, such as memory space, to a process. Environment settings can involve setting environment variables for a process.
[0053] This operation allows for the initialization of child processes, including setting their runtime environment and allocating memory. Then, the primary main process is terminated.
[0054] Terminating a process is the operation that ends a running process. Terminating a process can release resources, allowing the system to better manage resources and run other processes.
[0055] Terminating the first main process in this operation cleans up the current runtime environment, creating conditions for starting the second main process. This ensures the second main process can start and run in a relatively clean environment, such as including functions associated with the first function while removing functions unrelated to the first function, such as long-lived functions (functions whose lifespan exceeds a set duration during application execution). This reduces memory usage.
[0056] In this embodiment, the child process can also display a default page, which is displayed during the termination of the first main process.
[0057] S140. The first function corresponding to the first function control is executed through the second main process.
[0058] The second main process can be a trimmed version of the first main process. This embodiment does not limit the trimming method, as long as the second main process is obtained after trimming the first main process. This embodiment can trim the functions loaded by the first main process. Functions unrelated to the first function can be trimmed to obtain the second main process, making the second main process a dedicated main process for the first function.
[0059] In this operation, the first function is implemented through a second main process, such as by triggering the second main process to implement the first function through a child process. The child process can first start the second main process, and then execute the first function through the second main process. Alternatively, the child process can start a new process to serve as the second main process.
[0060] In this disclosure, starting a process (such as starting a second main process, starting a child process, etc.) can also be called launching a process, which can refer to the operating system creating a new process from scratch. This process includes allocating necessary resources (such as memory, CPU time, etc.) and setting the initial state of the process.
[0061] This disclosure uses a second main process to implement the first function of the application. The first main process can be the main process at the application level, and the second main process can be the main process at the first function level. Compared with the first main process, the second main process occupies less memory, thus improving the performance of implementing the first function. The first main process can detect the triggering operation of the first function control, and the second main process can implement the first function.
[0062] The technical solution of this disclosure detects trigger operations on a first functional control through a first main process. Upon detection, a child process is started through the first main process, so that the first main process of the application can be terminated through the child process, and the first function can be executed through a second main process. This disclosure uses the second main process to execute the first function and terminate the first main process, reducing the memory usage when the first function is executed through the first main process of the application. This improves the performance of executing the first function.
[0063] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0064] In one embodiment, before detecting the triggered operation for the first functional control through the application's first main process, the method further includes:
[0065] The application's main process detects trigger operations on the second functional control and executes the second function corresponding to the second functional control.
[0066] The second function and the first function can be different functions provided by the application. The second function control can be a control that triggers the implementation of the second function.
[0067] In this embodiment, the first main process can detect trigger operations of both the first and second functional controls. Upon detecting a trigger operation of the second functional control, the corresponding second function can be executed. Upon detecting a trigger operation of the first functional control, a child process can be started to terminate the first main process, and the first function can be executed through the second main process. That is, the first function is implemented through the second main process, improving its performance.
[0068] In one embodiment, the first function includes a live streaming start function, the first function control includes a live streaming start function control, the second function includes a video viewing function, and the second function control includes a video viewing function control.
[0069] The application provided in this disclosure includes video viewing and live streaming functionality. The live streaming functionality can be understood as the function to start a live stream in a live streaming scenario. The live streaming functionality control can be a control used to trigger the live streaming functionality; once triggered, the live streaming functionality can be implemented.
[0070] The video viewing function can be considered as the functionality to watch videos within an application. The video viewing function control can be seen as the space used to trigger the video viewing function; once triggered, the video viewing function can be implemented.
[0071] In this embodiment, after the first main process detects the trigger operation of the first functional control (such as the live broadcast entry), it starts a sub-process through the first main process to respond to the trigger operation by starting the sub-process. After starting the sub-process, the sub-process can terminate the first main process and start the second main process to realize the first function, such as the function of displaying the live broadcast page.
[0072] In one embodiment, the function processing method further includes:
[0073] The first page is displayed through the subprocess.
[0074] After starting the subprocess, this embodiment can display the first page through the subprocess. The first page can be considered as a transitional page in the process of implementing the first function. In this embodiment, the first main process detects the triggering operation of the first function control on the page displaying the first function space. After the first function control is triggered, the subprocess is started and the first page is displayed through the subprocess, realizing the jump from the page displaying the first function control to the first page, which is a transition for the subsequent display of the page associated with the first function.
[0075] In one embodiment, executing the first function corresponding to the first functional control through the second main process includes:
[0076] The second main process is started through the subprocess;
[0077] The second main process is initialized through the second main process, and the first function is executed.
[0078] In this embodiment, when using a second main process to execute the first function, the second main process can be started first through a child process. After the second main process starts, it can first complete its initialization. Then, the first function is executed through the second main process.
[0079] The second main process executing the first function can be loading the UI components for that function, such as an activity. UI components are one of the basic components of an application, used to display the interface and handle interactions. Loading the UI components for the first function can involve the application initializing the live streaming page and related resources. For example, the application loads components related to starting the live stream, along with their associated code and resources, into memory to prepare for entering the live stream page. After loading the UI components for the first function, the relevant logic and processes for starting the live stream can be executed.
[0080] In one embodiment, after initializing the second main process through the second main process, the method further includes:
[0081] Terminate the child process.
[0082] In this embodiment, after initializing the second main process, the child process is terminated to reclaim resources. In an operating system, when a process (including its child processes) terminates, the various system resources it occupies (such as memory, CPU time slices, file descriptors, network connections, etc.) need to be reclaimed so that these resources can be used by other processes, thereby improving the system's resource utilization and overall performance.
[0083] In one embodiment, performing the first function includes:
[0084] Load the UI component associated with the first function;
[0085] After the interface components are loaded, a second page is displayed, which includes the start-up page.
[0086] The second page can be a page associated with the first function. The live broadcast page can refer to the page used to set up live broadcast-related parameters and functions, and to preview the live broadcast screen before starting the live broadcast.
[0087] After the child process displays the first page, the second main process loads the UI components and then displays the second page, thus achieving the jump from the first page to the second page.
[0088] Figure 2 This is a flowchart illustrating another functional processing method provided in this embodiment. This embodiment also includes a processing method for responding to and disabling the first function. See [link to relevant documentation]. Figure 2 This embodiment includes the following operations:
[0089] S210. Detect trigger operations for the first functional control through the first main process of the application.
[0090] S220. The first main process starts a subprocess in response to a trigger operation on the first functional control.
[0091] S230. Terminate the first main process through the subprocess.
[0092] S240. Through the second main process, execute the first function corresponding to the first function control.
[0093] S250: By responding to the operation of disabling the first function through the second main process, the child process is triggered to terminate the second main process and start the first main process.
[0094] In this embodiment, the first function is executed through a second main process. During the execution of the first function, it is possible to detect in real time whether there is an operation to disable the first function.
[0095] In this embodiment, the operation to disable the first function can be initiated by the second main process. Upon responding to the operation to disable the first function, a child process can be triggered to terminate the second main process and then restart the first main process. The child process can also display a third page, which may be the same as or different from the first page. The third page can serve as a transitional page.
[0096] In this embodiment, when an operation to disable the first function is detected, it can be considered that the use of the first function has ended, such as ending a live broadcast. The second main process can be dedicated to the first function. To enable the use of other functions of the application, the second main process can be terminated through a child process, and the first main process can be started to use the functions before they were trimmed.
[0097] In this operation, disabling the first function can be triggered by the control that disables the first function. This operation can detect if the option to disable the first function exists on the page displaying the control. If so, it triggers a child process to terminate the second main process and start the first main process. After the child process starts, it can also display a third page, allowing navigation from the page displaying the control to disable the first function to the third page. After the first main process starts, it can display the page corresponding to the video viewing function (e.g., the video playback page), allowing navigation from the third page to the page corresponding to the video viewing function.
[0098] In this embodiment of the technical solution, when the application implements the first function, the first function is implemented through a second main process, which reduces memory usage and ensures the performance of the first function. When the first function is disabled, the second main process is closed and the first main process is started, ensuring the normal use of the functions provided by the application.
[0099] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0100] In one embodiment, the step of triggering the child process to terminate the second main process and start the first main process by responding to the operation of disabling the first function through the second main process includes:
[0101] The existence of the child process is determined by the second main process responding to the operation of disabling the first function;
[0102] If it exists, restore the child process through the second main process; otherwise, start the child process.
[0103] The second main process is terminated by the subprocess and the first main process is started.
[0104] In this embodiment, when the second main process responds to the operation of disabling the first function, it can determine whether a child process exists. If it exists, the second main process restores the child process, such as by waking it up, that is, waking up the child process in a waiting state and making it re-enter the ready state to wait for CPU scheduling and execution. If it does not exist, the child process is started, such as by starting a new process as the child process. The child process is initialized in the child process, and then the second main process is terminated and the first main process is started.
[0105] In this disclosure, restoring a child process can be considered as restoring an existing child process from a background or dormant state to a foreground or UI component state, so that the child process can continue to run.
[0106] In this embodiment, the second main process is terminated by a child process, and the first main process is started to run the application based on the first main process.
[0107] In one embodiment, the second main process is a trimmed process that retains the functions associated with the first function.
[0108] The second main process can retain functions related to the first function. The second main process can remove functions unrelated to the first function to obtain the second main process, thereby reducing memory usage.
[0109] For example, in this embodiment, functions unrelated to the first function are removed from the application to obtain a second main process. The second main process may not load functions unrelated to the first function, thereby reducing memory usage.
[0110] In one embodiment, the functional processing method provided in this disclosure further includes:
[0111] The first main process stores the broadcast-related information into shared memory;
[0112] The subprocess transmits the broadcast association information from the shared memory to the second main process.
[0113] In this embodiment, the broadcast-related information can be considered as information associated with starting a live stream. There is no limitation on the broadcast-related information here. For example, the broadcast-related information may include a link to the live stream page, enabling a targeted redirection to the broadcast page via the second main process.
[0114] In this embodiment, the first main process can store broadcast-related information in shared memory to enable inter-process communication. For example, after detecting the triggering operation of the first functional control, the broadcast-related information is stored in shared memory. Alternatively, after starting a child process, the broadcast-related information is stored in shared memory.
[0115] In this embodiment, the broadcasting association information can be transmitted from the shared memory to the second main process through the subprocess, so that the second main process can start broadcasting based on the broadcasting association information.
[0116] In this embodiment, the first main process and the child process can coexist. After initializing the child process, the child process can terminate the first main process. Then, the second main process is started, at which point the second main process and the child process can coexist.
[0117] The functional processing method disclosed herein can be considered a high-performance client-side broadcasting solution, which optimizes memory usage by removing long-lived objects unrelated to the primary function. For example, pre-loaded business logic may leave residual memory that cannot be cleared. This disclosure solves the performance problem of mobile client broadcasting through a first main process, a child process, and a second main process. It reduces the memory usage during broadcasting and lowers the CPU and GPU usage during the broadcasting process.
[0118] This disclosure introduces an intermediate sub-process that terminates the primary main process and then directly invokes the primary function. Functions unrelated to broadcasting (such as the e-commerce platform) are terminated without affecting broadcasting. This disclosure can clean up memory and irrelevant tasks, reducing memory, CPU, and GPU usage. This disclosure eliminates the need for manual application restarts; high-performance live streaming is achieved through switching between the primary and secondary main processes.
[0119] Figure 3 This is a schematic flowchart illustrating another functional processing method provided in an embodiment of this disclosure. See also... Figure 3 When an application is opened, the first step is to initialize the main process. This prepares the application for subsequent operation, including allocating memory, loading necessary system resources and configurations, etc. Next, the main page components, such as MainActivity, are loaded. MainActivity is the main activity interface in an Android application and the primary window for interaction with the application. Loading the main page components displays the application's main interface, which typically contains the application's main functions and navigation elements. Then, the homepage functionality is loaded. After the main page components are loaded, various homepage functions, such as the various functions required for the homepage, are further loaded; this is not limited here. After loading the homepage functionality, the state of the start-up entry point, i.e., the first functional control, can be checked to determine whether to execute the first function. If the start-up entry point is triggered, a child process can be started.
[0120] Initialize the child process within the child process, allocating resources and setting its initial state. Terminate the primary main process via the child process and start a new secondary main process to continue subsequent processes or tasks.
[0121] The second main process is initialized by loading the interface components for starting the broadcast, thereby enabling the broadcast function.
[0122] After initializing the second main process, resource reclamation can also be performed, such as terminating child processes.
[0123] After detecting a shutdown operation (i.e., disabling the first function) through the second main process, a child process can be started or resumed. After starting the child process, it can be initialized, then the second main process can be terminated, and the first main process can be started.
[0124] After resuming the child process, the second main process can be terminated directly through the child process, and the first main process can be started.
[0125] After starting the first main process, you can continue to initialize the first main process and perform subsequent operations.
[0126] Figure 4 This is a schematic diagram of the structure of a functional processing device provided in an embodiment of this disclosure. The functional processing device can be integrated into an electronic device, such as... Figure 4 As shown, the device includes:
[0127] The detection module 410 is used to detect trigger operations on the first functional control through the first main process of the application.
[0128] The startup module 420 is used to start a subprocess in response to a trigger operation on the first functional control via the first main process;
[0129] Termination module 430 is used to terminate the first main process through the subprocess;
[0130] The execution module 440 is used to execute the first function corresponding to the first functional control through the second main process;
[0131] The second main process is a process that is trimmed down from the first main process.
[0132] The technical solution provided in this disclosure involves a detection module that detects trigger operations on a first functional control via a first main process. Upon detection, a startup module starts a child process via the first main process, a termination module terminates the first main process of the application via the child process, and an execution module executes the first function via a second main process. This disclosure uses a second main process to execute the first function and terminates the first main process, reducing memory usage when executing the first function via the application's first main process and improving the performance of executing the first function.
[0133] In one embodiment, the apparatus further includes a function execution module, configured to detect a trigger operation on a second function control via the first main process of the application before detecting a trigger operation on a first function control via the first main process of the application, and execute a second function corresponding to the second function control.
[0134] In one embodiment, the first function includes a live streaming start function, the first function control includes a live streaming start function control, the second function includes a video viewing function, and the second function control includes a video viewing function control.
[0135] In one embodiment, the device further includes a display module for:
[0136] The first page is displayed through the subprocess.
[0137] In one embodiment, the execution module 440 includes:
[0138] A startup unit is used to start the second main process through the subprocess;
[0139] An execution unit is used to initialize the second main process through the second main process and execute the first function.
[0140] In one embodiment, the execution module 440 further includes a termination unit for terminating the child process after the second main process has been initialized by the second main process.
[0141] In one embodiment, the execution unit is specifically used for:
[0142] Load the UI component associated with the first function;
[0143] After the interface components are loaded, a second page is displayed, which includes the start-up page.
[0144] In one embodiment, the function processing device further includes a trigger module for:
[0145] The second main process responds to the operation of disabling the first function, triggering the child process to terminate the second main process and start the first main process.
[0146] In one embodiment, the triggering module is specifically used for:
[0147] The existence of the child process is determined by the second main process responding to the operation of disabling the first function;
[0148] If it exists, restore the child process through the second main process; otherwise, start the child process.
[0149] The second main process is terminated by the subprocess and the first main process is started.
[0150] In one embodiment, the second main process is a trimmed process that retains the functions associated with the first function.
[0151] In one embodiment, the function processing apparatus further includes a storage module for:
[0152] The first main process stores the broadcast-related information into shared memory;
[0153] The subprocess transmits the broadcast association information from the shared memory to the second main process.
[0154] The functional processing apparatus provided in this disclosure can execute the functional processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the method execution.
[0155] It is worth noting 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 each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0156] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Refer to the following... Figure 5 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 5 A structural diagram of the terminal device or server in the 500.
[0157] Electronic equipment 500, including:
[0158] One or more processing devices 501;
[0159] Storage device 508, for storing one or more programs,
[0160] When the one or more programs are executed by the one or more processing devices 501, the one or more processing devices 501 implement any of the methods provided in this disclosure.
[0161] The terminal devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0162] like Figure 5 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.
[0163] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0164] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0165] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0166] The electronic device provided in this embodiment and the functional processing method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0167] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the functional processing method provided in the above embodiments.
[0168] It should be noted that the computer-readable medium described above in this disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof.
[0169] The computer storage medium may be a storage medium for computer-executable instructions, which, when executed by a computer processor, are used to perform the methods provided in this disclosure.
[0170] Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0171] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0172] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0173] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: detect a trigger operation on a first functional control through a first main process of the application;
[0174] Through the first main process, in response to a trigger operation on the first functional control, a sub-process is started;
[0175] The first main process is terminated through the child process;
[0176] The second main process executes the first function corresponding to the first functional control.
[0177] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0178] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0179] The modules or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of modules or units do not necessarily limit the specific unit; for example, a detection module can also be described as a "trigger operation detection module".
[0180] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0181] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction 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 be, 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 machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0182] A computer program product includes a computer program that, when executed by a processor, implements the functional processing method provided in this disclosure. It possesses the corresponding functional modules and beneficial effects for implementing the method.
[0183] According to one or more embodiments of this disclosure, [Example 1] provides a functional processing method, including:
[0184] The application's main process detects triggered operations for the first functional control.
[0185] Through the first main process, in response to a trigger operation on the first functional control, a sub-process is started;
[0186] The first main process is terminated through the child process;
[0187] The second main process executes the first function corresponding to the first functional control.
[0188] According to one or more embodiments of this disclosure, [Example 2] provides the method of Example 1, which further includes, before detecting the trigger operation for the first functional control through the first main process of the application:
[0189] The application's main process detects trigger operations on the second functional control and executes the second function corresponding to the second functional control.
[0190] According to one or more embodiments of this disclosure, [Example 3] provides the method described in Example 2, wherein the first function includes a live broadcast start function, the first function control includes a live broadcast start function control, the second function includes a video viewing function, and the second function control includes a video viewing function control.
[0191] According to one or more embodiments of this disclosure, Example 4 provides the method described in Example 1, further comprising:
[0192] The first page is displayed through the subprocess.
[0193] According to one or more embodiments of this disclosure, [Example 5] provides the method described in Example 1, wherein executing the first function corresponding to the first functional control through a second main process includes:
[0194] The second main process is started through the subprocess;
[0195] The second main process is initialized through the second main process, and the first function is executed.
[0196] According to one or more embodiments of this disclosure, [Example 6] provides the method described in Example 5, which, after initializing the second main process through the second main process, further includes:
[0197] Terminate the child process.
[0198] According to one or more embodiments of this disclosure, [Example 7] provides the method described in Example 5, wherein performing the first function includes:
[0199] Load the UI component associated with the first function;
[0200] After the interface components are loaded, a second page is displayed, which includes the start-up page.
[0201] According to one or more embodiments of this disclosure, [Example 8] provides the method of Example 1, further comprising:
[0202] The second main process responds to the operation of disabling the first function, triggering the child process to terminate the second main process and start the first main process.
[0203] According to one or more embodiments of this disclosure, [Example 9] provides the method of Example 8, wherein the step of triggering the child process to terminate the second main process and start the first main process by responding to the operation of disabling the first function through the second main process includes:
[0204] The existence of the child process is determined by the second main process responding to the operation of disabling the first function;
[0205] If it exists, restore the child process through the second main process; otherwise, start the child process.
[0206] The second main process is terminated by the subprocess and the first main process is started.
[0207] According to one or more embodiments of this disclosure, Example 10 provides the method described in Example 1.
[0208] The second main process is the trimmed process that retains the functions associated with the first function.
[0209] According to one or more embodiments of this disclosure, Example 11 provides the method of Example 10, further comprising:
[0210] The first main process stores the broadcast-related information into shared memory;
[0211] The subprocess transmits the broadcast association information from the shared memory to the second main process.
[0212] According to one or more embodiments of this disclosure, [Example 12] a functional processing apparatus is provided, comprising:
[0213] The detection module is used to detect trigger operations on the first functional control through the first main process and the first functional control of the application.
[0214] The startup module is used to start a subprocess in response to a trigger operation on the first functional control via the first main process;
[0215] A termination module is used to terminate the first main process through the subprocess;
[0216] The execution module is used to execute the first function corresponding to the first functional control through the second main process.
[0217] According to one or more embodiments of this disclosure, [Example 13] an electronic device is provided, the electronic device comprising:
[0218] One or more processing devices;
[0219] Storage device for storing one or more programs.
[0220] When the one or more programs are executed by the one or more processing devices, the one or more processing devices perform the method as described in any of Examples 1-11.
[0221] According to one or more embodiments of this disclosure, [Example 14] provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform the method described in any of Examples 1-11.
[0222] According to one or more embodiments of this disclosure, [Example 15] provides a computer program product including a computer program that, when executed by a processor, implements the method according to any one of Examples 1-11.
[0223] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0224] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0225] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A functional processing method, characterized in that, include: The application's main process detects triggered operations for the first functional control. Through the first main process, in response to a trigger operation on the first functional control, a sub-process is started; The first main process is terminated through the child process; The first function corresponding to the first functional control is executed through the second main process.
2. The method according to claim 1, characterized in that, Before detecting the triggered operation for the first functional control through the application's first main process, the process also includes: The application's main process detects trigger operations on the second functional control and executes the second function corresponding to the second functional control.
3. The method according to claim 2, characterized in that, The first function includes a live broadcast start function, and the first function control includes a live broadcast start function control. The second function includes a video viewing function, and the second function control includes a video viewing function control.
4. The method according to claim 1, characterized in that, Also includes: The first page is displayed through the subprocess.
5. The method according to claim 1, characterized in that, The step of executing the first function corresponding to the first functional control through the second main process includes: The second main process is started through the subprocess; The second main process is initialized through the second main process, and the first function is executed.
6. The method according to claim 5, characterized in that, After initializing the second main process through the second main process, the process also includes: Terminate the child process.
7. The method according to claim 5, characterized in that, Performing the first function includes: Load the UI component associated with the first function; After the interface components are loaded, a second page is displayed, which includes the start-up page.
8. The method according to claim 1, characterized in that, Also includes: The second main process responds to the operation of disabling the first function, triggering the child process to terminate the second main process and start the first main process.
9. The method according to claim 8, characterized in that, The step of triggering the child process to terminate the second main process and start the first main process by responding to the operation of disabling the first function through the second main process includes: The existence of the child process is determined by the second main process responding to the operation of disabling the first function; If it exists, restore the child process through the second main process; otherwise, start the child process. The second main process is terminated by the subprocess and the first main process is started.
10. The method according to claim 1, characterized in that, The second main process is the trimmed process that retains the functions associated with the first function.
11. The method according to claim 10, characterized in that, Also includes: The first main process stores the broadcast-related information into shared memory; The subprocess transmits the broadcast association information from the shared memory to the second main process.
12. A functional processing device, characterized in that, include: The detection module is used to detect trigger operations on the first functional control through the application's first main process; The startup module is used to start a subprocess in response to a trigger operation on the first functional control via the first main process; A termination module is used to terminate the first main process through the subprocess; The execution module is used to execute the first function corresponding to the first functional control through the second main process.
13. An electronic device, characterized in that, The electronic device includes: One or more processing devices; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processing devices, the one or more processing devices perform the method as described in any one of claims 1-11.
14. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the method as described in any one of claims 1-11.
15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-11.