Data processing method, device, electronic device and storage medium
By monitoring and suspending the initialization and page creation operations of the application, directly obtaining and passing startup parameters to create and display a specific page, the problem in the prior art that the process of starting an application to a specific page takes a long time is solved, improving efficiency and saving money. System resources.
Patent Information
- Application Number
- CN202111679730.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-12-31
AI Technical Summary
When an application is started according to specific page startup parameters, the process from application startup to displaying a specific page in the prior art takes a long time and requires many operations, resulting in low efficiency and high system resource consumption.
By listening to the initialization and page creation operations of the application, suspending the initialization of the global configuration class and page creation class, obtaining and passing startup parameters to directly create and display specific pages, avoiding the process of creating a default home page.
It reduces the number of pages created, saves system resources, and improves the efficiency of displaying specific pages.
Smart Images

Figure CN114416220B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, device, electronic equipment and storage medium. Background Art
[0002] Currently, applications are widely used. In order to enrich the functions of applications and enable them to provide better services to a wide range of users, applications often include multiple pages, each of which includes different content.
[0003] After the application is started, it is often necessary to display a page. In order to display the page, the global configuration class Application is initialized first. The global configuration class Application has the startup parameters of the application's home page, etc. Then the Activity class in the application is initialized, and then the application page is created based on the Activity class and the startup parameters of the application's home page. The created page is the application's home page, and the application's home page is displayed.
[0004] However, sometimes an application is often started based on the startup parameters of a specific page. For example, the application is started by scanning a QR code. The startup parameters of the specific page can be obtained by scanning the QR code. The startup parameters of the specific page correspond to a non-home page in the application. Starting the application by scanning the QR code often requires the application to display the page corresponding to the startup parameters of the specific page, so that the user can operate or browse information on the page corresponding to the startup parameters of the specific page.
[0005] In this case, after the application is started, the global configuration class Application is initialized first, which has the startup parameters of the application's home page, etc., and then the Activity class in the application is initialized, and then the application's home page is created based on the Activity class and the startup parameters of the application's home page, and the home page is displayed. Then, the startup parameters of a specific page are obtained based on the Activity class, and then a page corresponding to the startup parameters of a specific page is created based on the Activity class and the startup parameters of the specific page, and then the page corresponding to the startup parameters of the specific page is jumped to, so that the user can operate or browse information on the page corresponding to the startup parameters of the specific page.
[0006] However, the inventors have found that in the above method, the process from starting the application to displaying a specific page takes a long time and requires many operations, resulting in low efficiency in displaying the page corresponding to the startup parameters of the specific page and high consumption of system resources. Summary of the invention
[0007] The present application illustrates a data processing method, device, electronic device and storage medium.
[0008] In a first aspect, the present application shows a data processing method, which is applied to a terminal, wherein an application is installed in the terminal, and the method comprises:
[0009] In case of receiving a start operation for starting an application according to a first parameter, monitoring whether the application starts to execute an initialization operation for initializing a global configuration class of the application;
[0010] In the case of monitoring that the application starts to execute the initialization operation, suspending the application to execute the initialization operation of the global configuration class of the application; the page corresponding to the first parameter is different from the homepage of the application;
[0011] Initialize the page creation class of the application;
[0012] Monitoring whether the application starts to execute a creation operation of creating a page based on the page creation class;
[0013] In the case of monitoring that the application starts to execute the creation operation, suspending the creation operation of the application to create a page based on the page creation class;
[0014] Acquire the page creation class to obtain the first parameter according to the startup operation;
[0015] Passing the first parameter to the global configuration class;
[0016] Initializing the global class configuration class with the first parameter;
[0017] Acquire a first parameter in the global class configuration class having the first parameter based on the page creation class;
[0018] A page corresponding to the first parameter is created based on the page creation class and the first parameter, and the page corresponding to the first parameter is displayed.
[0019] In an optional implementation, the method further includes:
[0020] In case of receiving a jump operation for controlling the application to jump to a page corresponding to the second parameter according to the second parameter, acquiring the second parameter according to the jump operation based on the page creation class;
[0021] Creating a page corresponding to the second parameter based on the page creation class and the second parameter;
[0022] Jump the page displayed by the application from the page corresponding to the first parameter to the page corresponding to the second parameter.
[0023] In an optional implementation, the global configuration class includes a sub-configuration class that inherits the global configuration class; the sub-configuration class includes a callback function, and the callback function is used to monitor whether the application calls an initialization function for initializing the global configuration class;
[0024] The monitoring whether the application starts to execute the initialization operation of initializing the global configuration class of the application includes:
[0025] Determining whether a callback event for the callback function in the sub-configuration class is received;
[0026] In case of receiving a callback event for the callback function in the sub-configuration class, it is determined that the application starts to perform an initialization operation of initializing the global configuration class of the application.
[0027] In an optional implementation, the page creation class includes a sub-creation class that inherits the page creation class; the sub-creation class includes a callback function, and the callback function is used to monitor whether the application calls the page creation function for creating a page;
[0028] The monitoring whether the application starts to execute a creation operation of creating a page based on the page creation class includes:
[0029] Determine whether a callback event for the callback function in the sub-creation class is received;
[0030] In the case of receiving a callback event for the callback function in the child creation class, it is determined that the application starts to execute a creation operation of creating a page based on the page creation class.
[0031] In a second aspect, the present application shows a data processing device, which is applied to a terminal, in which an application is installed, and the device includes:
[0032] A first monitoring module is used to monitor whether the application starts to execute an initialization operation of initializing a global configuration class of the application when receiving a startup operation for starting the application according to a first parameter;
[0033] A first suspension module is used to suspend the application program from executing the initialization operation of initializing the global configuration class of the application program when monitoring that the application program starts to execute the initialization operation; the page corresponding to the first parameter is different from the homepage of the application program;
[0034] A first initialization module, used to initialize the page creation class of the application;
[0035] A second monitoring module is used to monitor whether the application starts to execute a creation operation of creating a page based on the page creation class;
[0036] A second suspending module is used to suspend the creation operation of the application program based on the page creation class to create a page when monitoring that the application program starts to execute the creation operation;
[0037] A first acquisition module, used for acquiring the first parameter obtained by the page creation class according to the startup operation;
[0038] A transfer module, used for transferring the first parameter to the global configuration class;
[0039] A second initialization module, used to initialize the global class configuration class with the first parameter;
[0040] A second acquisition module, configured to acquire a first parameter in the global class configuration class having the first parameter based on the page creation class;
[0041] The first creation module is used to create a page corresponding to the first parameter based on the page creation class and the first parameter, and display the page corresponding to the first parameter.
[0042] In an optional implementation, the device further includes:
[0043] A third acquisition module is used to, when receiving a jump operation for controlling the application to jump to a page corresponding to the second parameter according to the second parameter, acquire the second parameter according to the jump operation based on the page creation class;
[0044] A second creation module, used for creating a page corresponding to the second parameter based on the page creation class and the second parameter;
[0045] A jump module is used to jump the page displayed by the application from the page corresponding to the first parameter to the page corresponding to the second parameter.
[0046] In an optional implementation, the global configuration class includes a sub-configuration class that inherits the global configuration class; the sub-configuration class includes a callback function, and the callback function is used to monitor whether the application calls an initialization function for initializing the global configuration class;
[0047] The first monitoring module includes:
[0048] A first determining unit, configured to determine whether a callback event for the callback function in the sub-configuration class is received;
[0049] The second determining unit is configured to determine, when receiving a callback event for the callback function in the sub-configuration class, that the application program starts to perform an initialization operation of initializing a global configuration class of the application program.
[0050] In an optional implementation, the page creation class includes a sub-creation class that inherits the page creation class; the sub-creation class includes a callback function, and the callback function is used to monitor whether the application calls the page creation function for creating a page;
[0051] The second monitoring module includes:
[0052] A third determining unit, configured to determine whether a callback event for the callback function in the sub-created class is received;
[0053] The fourth determining unit is used to determine that the application starts to execute a creation operation of creating a page based on the page creation class when a callback event for the callback function in the sub-creation class is received.
[0054] In a third aspect, the present application shows an electronic device, the electronic device comprising:
[0055] processor;
[0056] a memory for storing processor-executable instructions;
[0057] Wherein, the processor is configured to execute the data processing method as described in the first aspect.
[0058] In a fourth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the data processing method as described in the first aspect.
[0059] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the data processing method as described in the first aspect.
[0060] The technical solution provided by this application may have the following beneficial effects:
[0061] Through the present application, before creating a page based on the page creation class, the page creation class can obtain the first parameter (which can be the homepage of a non-application, etc.). In this way, when creating a page based on the page creation class, the page corresponding to the first parameter can be created based on the page creation class and the first parameter, and the page corresponding to the first parameter can be displayed. In this way, for the application, it is not necessary to follow the process of "first create the homepage of the application, display the homepage of the application, then create the page corresponding to the first parameter, and then jump to the page corresponding to the first parameter". Instead of creating the homepage of the application and displaying the homepage of the application, the page corresponding to the first parameter can be directly created and displayed, thereby reducing the number of pages that need to be created, saving system resources, and because there is no process of "creating the homepage of the application and displaying the homepage of the application", the efficiency of displaying the page corresponding to the first parameter can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a step flow chart of a data processing method of the present application.
[0063] Figure 2 It is a structural block diagram of a data processing device of the present application.
[0064] Figure 3 It is a block diagram of an electronic device of the present application.
[0065] Figure 4 It is a block diagram of an electronic device of the present application. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] Reference Figure 1 , shows a flow chart of the steps of a data processing method of the present application, the method is applied to a terminal, an application is installed in the terminal, and the method may specifically include the following steps:
[0068] In step S101, when a start operation for starting an application according to a first parameter is received, it is monitored whether the application starts to execute an initialization operation for initializing a global configuration class of the application.
[0069] The startup operation for starting the application according to the first parameter includes: scanning the QR code of the application, the QR code includes the page identifier of the page of the application to be displayed and the startup instruction for starting the application, etc. In this way, the page identifier and the startup instruction can be obtained through the scanning operation, and then it is known that the application needs to be started and the page corresponding to the page identifier needs to be displayed on the application.
[0070] The first parameter may include at least a page identifier and the like.
[0071] Page identifiers include URLs (Uniform Resource Locator) and the like.
[0072] There can be one global configuration class in an application, which is often initialized when the application starts. For example, the global configuration class includes the Application class, which is often initialized when the application starts.
[0073] In one embodiment of the present application, the global configuration class includes a sub-configuration class that inherits the global configuration class. The sub-configuration class may include MyApplicaiton, etc. The sub-configuration class includes a callback function, which is used to monitor whether the application calls the initialization function for initializing the global configuration class.
[0074] In this way, in order to monitor whether the application starts to execute the initialization operation of the global configuration class of the initialization application, it can be determined whether a callback event for the callback function in the sub-configuration class is received.
[0075] When the application calls the initialization function for initializing the global configuration class, a callback event is triggered for the callback function.
[0076] In this way, when a callback event to a callback function in a sub-configuration class is received, it is determined that the application starts to perform an initialization operation of initializing the global configuration class of the application.
[0077] In step S102, when it is monitored that the application starts to perform an initialization operation, the application is suspended to perform an initialization operation of the global configuration class of the initialization application. The page corresponding to the first parameter is different from the homepage of the application.
[0078] Suspending the application's execution of the initialization operation of initializing the application's global configuration class can be understood as pausing or preventing the execution of the initialization operation of initializing the application's global configuration class, after which the application can continue to execute operations that are located after the initialization operation in the execution order, such as initializing the application's page creation class, etc.
[0079] In step S103, the page creation class of the application is initialized.
[0080] The page creation class includes the Activity class, etc., which is used to create the page of the application.
[0081] In step S104, it is monitored whether the application starts to execute a creation operation of creating a page based on the page creation class.
[0082] In one embodiment of the present application, the page creation class includes a sub-creation class that inherits the page creation class. The sub-creation class includes a callback function, and the callback function is used to monitor whether the application program calls the page creation function for creating a page.
[0083] Thus, in order to monitor whether the application starts to execute the creation operation of creating a page based on the page creation class, it can be determined whether a callback event for the callback function in the child creation class is received.
[0084] When the application calls a page creation function for creating a page, a callback event is triggered for the callback function.
[0085] In this way, when a callback event to a callback function in a child creation class is received, it is determined that the application starts to execute a creation operation of creating a page based on the page creation class.
[0086] In step S105, when it is monitored that the application starts to execute the creation operation, the application is suspended from executing the creation operation of creating a page based on the page creation class.
[0087] Suspending the application's creation operation of creating a page based on the page creation class can be understood as pausing or preventing the creation operation of creating a page based on the page creation class, and then obtaining the first parameter obtained by the page creation class according to the startup operation.
[0088] In step S106, the first parameter obtained by the page creation class according to the startup operation is obtained.
[0089] After the page creation class is initialized, the page creation class can obtain the first parameter according to the startup operation. In this way, the first parameter obtained by the page creation class according to the startup operation can be obtained.
[0090] For example, the page creation class has a sub-creation class that inherits the page creation class. The first parameter obtained by the page creation class can be obtained through the sub-creation class of the page creation class, and then step S107 is executed.
[0091] In step S107 , the first parameter is passed to the global configuration class.
[0092] For example, a subclass of the page creation class may pass the first parameter to a subconfiguration class in the global configuration class, and so on, to implement passing the first parameter to the global configuration class.
[0093] In step S108 , a global class configuration class having a first parameter is initialized.
[0094] The sub-configuration class in the global configuration class has an initialization function for initializing the global configuration class. In this way, the sub-configuration class in the global configuration class can call the initialization function for initializing the global configuration class, and initialize the global configuration class through the initialization function for initializing the global configuration class and the first parameter.
[0095] In this way, the initialized global configuration class has the first parameter.
[0096] In step S109 , a first parameter in a global class configuration class having a first parameter is obtained based on the page creation class.
[0097] In step S110 , a page corresponding to the first parameter is created based on the page creation class and the first parameter, and the page corresponding to the first parameter is displayed.
[0098] Through the present application, before creating a page based on the page creation class, the page creation class can obtain the first parameter. In this way, when creating a page based on the page creation class, the page corresponding to the first parameter can be created based on the page creation class and the first parameter, and the page corresponding to the first parameter can be displayed. In this way, for the application, there is no need to first create the default homepage of the application, display the default homepage, then create the page corresponding to the first parameter, and then jump to the page corresponding to the first parameter. The page corresponding to the first parameter can be directly created and displayed, thereby reducing the number of pages that need to be created, saving system resources and improving the efficiency of displaying the page corresponding to the first parameter.
[0099] Furthermore, when a jump operation for controlling the application to jump to a page corresponding to the second parameter according to the second parameter is received, it is no longer necessary to suspend the application to perform an initialization operation of initializing the global configuration class of the application and to suspend the application to perform a creation operation of creating a page based on the page creation class. Therefore, the second parameter can be directly obtained according to the jump operation based on the page creation class; a page corresponding to the second parameter can be created based on the page creation class and the second parameter; and the page displayed by the application can be jumped from the page corresponding to the first parameter to the page corresponding to the second parameter, so as to improve the efficiency of jumping to the page corresponding to the second parameter.
[0100] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.
[0101] Reference Figure 2 , shows a structural block diagram of a data processing device of the present application, the device is applied to a terminal, an application is installed in the terminal, and the device includes:
[0102] A first monitoring module 11 is used for monitoring whether the application starts to perform an initialization operation of initializing a global configuration class of the application when receiving a startup operation for starting the application according to a first parameter;
[0103] A first suspension module 12 is used to suspend the application program from executing the initialization operation of initializing the global configuration class of the application program when monitoring that the application program starts to execute the initialization operation; the page corresponding to the first parameter is different from the homepage of the application program;
[0104] A first initialization module 13, used to initialize the page creation class of the application;
[0105] A second monitoring module 14 is used to monitor whether the application starts to execute a creation operation of creating a page based on the page creation class;
[0106] A second suspending module 15 is used to suspend the creation operation of the application program based on the page creation class to create a page when monitoring that the application program starts to execute the creation operation;
[0107] A first acquisition module 16, used for acquiring the first parameter obtained by the page creation class according to the startup operation;
[0108] A transfer module 17, used for transferring the first parameter to the global configuration class;
[0109] A second initialization module 18, used to initialize the global class configuration class with the first parameters;
[0110] A second acquisition module 19, configured to acquire a first parameter in the global class configuration class having the first parameter based on the page creation class;
[0111] The first creation module 20 is used to create a page corresponding to the first parameter based on the page creation class and the first parameter, and display the page corresponding to the first parameter.
[0112] In an optional implementation, the device further includes:
[0113] A third acquisition module is used to, when receiving a jump operation for controlling the application to jump to a page corresponding to the second parameter according to the second parameter, acquire the second parameter according to the jump operation based on the page creation class;
[0114] A second creation module, used for creating a page corresponding to the second parameter based on the page creation class and the second parameter;
[0115] A jump module is used to jump the page displayed by the application from the page corresponding to the first parameter to the page corresponding to the second parameter.
[0116] In an optional implementation, the global configuration class includes a sub-configuration class that inherits the global configuration class; the sub-configuration class includes a callback function, and the callback function is used to monitor whether the application calls an initialization function for initializing the global configuration class;
[0117] The first monitoring module includes:
[0118] A first determining unit, configured to determine whether a callback event for the callback function in the sub-configuration class is received;
[0119] The second determining unit is configured to determine, when receiving a callback event for the callback function in the sub-configuration class, that the application program starts to perform an initialization operation of initializing a global configuration class of the application program.
[0120] In an optional implementation, the page creation class includes a sub-creation class that inherits the page creation class; the sub-creation class includes a callback function, and the callback function is used to monitor whether the application calls the page creation function for creating a page;
[0121] The second monitoring module includes:
[0122] A third determining unit, configured to determine whether a callback event for the callback function in the sub-created class is received;
[0123] The fourth determining unit is used to determine that the application starts to execute a creation operation of creating a page based on the page creation class when a callback event for the callback function in the sub-creation class is received.
[0124] Through the present application, before creating a page based on the page creation class, the page creation class can obtain the first parameter (which can be the homepage of a non-application, etc.). In this way, when creating a page based on the page creation class, the page corresponding to the first parameter can be created based on the page creation class and the first parameter, and the page corresponding to the first parameter can be displayed. In this way, for the application, it is not necessary to follow the process of "first create the homepage of the application, display the homepage of the application, then create the page corresponding to the first parameter, and then jump to the page corresponding to the first parameter". Instead of creating the homepage of the application and displaying the homepage of the application, the page corresponding to the first parameter can be directly created and displayed, thereby reducing the number of pages that need to be created, saving system resources, and because there is no process of "creating the homepage of the application and displaying the homepage of the application", the efficiency of displaying the page corresponding to the first parameter can be improved.
[0125] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0126] Optionally, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0127] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0128] Figure 3 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0129] Reference Figure 3, the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0130] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0131] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0132] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0133] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0134] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0135] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0136] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0137] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0138] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0139] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0140] Figure 4 1 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.
[0141] Reference Figure 4 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0142] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0143] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0145] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0146] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0148] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0151] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0152] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A data processing method, characterized in that: The method is applied to a terminal, in which an application is installed, and the method comprises: In case of receiving a start operation for starting an application according to a first parameter, monitoring whether the application starts to execute an initialization operation for initializing a global configuration class of the application; In the case of monitoring that the application starts to execute the initialization operation, suspending the application to execute the initialization operation of the global configuration class of the application; the page corresponding to the first parameter is different from the homepage of the application; Initialize the page creation class of the application; Monitoring whether the application starts to execute a creation operation of creating a page based on the page creation class; In the case of monitoring that the application starts to execute the creation operation, suspending the creation operation of the application to create a page based on the page creation class; Acquire the page creation class to obtain the first parameter according to the startup operation; Passing the first parameter to the global configuration class; Initializing the global class configuration class with the first parameter; Acquire a first parameter in the global class configuration class having the first parameter based on the page creation class; A page corresponding to the first parameter is created based on the page creation class and the first parameter, and the page corresponding to the first parameter is displayed.
2. The method according to claim 1, characterized in that The method further comprises: In case of receiving a jump operation for controlling the application to jump to a page corresponding to the second parameter according to the second parameter, acquiring the second parameter according to the jump operation based on the page creation class; Creating a page corresponding to the second parameter based on the page creation class and the second parameter; Jump the page displayed by the application from the page corresponding to the first parameter to the page corresponding to the second parameter.
3. The method according to claim 1, characterized in that The global configuration class includes a sub-configuration class that inherits the global configuration class; the sub-configuration class includes a callback function, and the callback function is used to monitor whether the application calls an initialization function for initializing the global configuration class; The monitoring whether the application starts to execute the initialization operation of initializing the global configuration class of the application includes: Determining whether a callback event for the callback function in the sub-configuration class is received; In case of receiving a callback event for the callback function in the sub-configuration class, it is determined that the application starts to perform an initialization operation of initializing the global configuration class of the application.
4. The method according to claim 1, characterized in that: The page creation class includes a sub-creation class that inherits the page creation class; the sub-creation class includes a callback function, and the callback function is used to monitor whether the application calls the page creation function for creating a page; The monitoring whether the application starts to execute a creation operation of creating a page based on the page creation class includes: Determine whether a callback event for the callback function in the sub-creation class is received; In the case of receiving a callback event for the callback function in the child creation class, it is determined that the application starts to execute a creation operation of creating a page based on the page creation class.
5. A data processing device, characterized in that: The device is applied to a terminal, an application is installed in the terminal, and the device includes: A first monitoring module is used to monitor whether the application starts to execute an initialization operation of initializing a global configuration class of the application when receiving a startup operation for starting the application according to a first parameter; A first suspension module is used to suspend the application program from executing the initialization operation of initializing the global configuration class of the application program when monitoring that the application program starts to execute the initialization operation; the page corresponding to the first parameter is different from the homepage of the application program; A first initialization module, used to initialize the page creation class of the application; A second monitoring module is used to monitor whether the application starts to execute a creation operation of creating a page based on the page creation class; A second suspending module is used to suspend the creation operation of the application program based on the page creation class to create a page when monitoring that the application program starts to execute the creation operation; A first acquisition module, used for acquiring the first parameter obtained by the page creation class according to the startup operation; A transfer module, used for transferring the first parameter to the global configuration class; A second initialization module, used to initialize the global class configuration class with the first parameter; A second acquisition module, configured to acquire a first parameter in the global class configuration class having the first parameter based on the page creation class; The first creation module is used to create a page corresponding to the first parameter based on the page creation class and the first parameter, and display the page corresponding to the first parameter.
6. The device according to claim 5, characterized in that The device also includes: A third acquisition module is used to, when receiving a jump operation for controlling the application to jump to a page corresponding to the second parameter according to the second parameter, acquire the second parameter according to the jump operation based on the page creation class; A second creation module, used for creating a page corresponding to the second parameter based on the page creation class and the second parameter; A jump module is used to jump the page displayed by the application from the page corresponding to the first parameter to the page corresponding to the second parameter.
7. The device according to claim 5, characterized in that The global configuration class includes a sub-configuration class that inherits the global configuration class; the sub-configuration class includes a callback function, and the callback function is used to monitor whether the application calls an initialization function for initializing the global configuration class; The first monitoring module includes: A first determining unit, configured to determine whether a callback event for the callback function in the sub-configuration class is received; The second determining unit is configured to determine, when receiving a callback event for the callback function in the sub-configuration class, that the application program starts to perform an initialization operation of initializing a global configuration class of the application program.
8. The device according to claim 5, characterized in that The page creation class includes a sub-creation class that inherits the page creation class; the sub-creation class includes a callback function, and the callback function is used to monitor whether the application calls the page creation function for creating a page; The second monitoring module includes: A third determining unit, configured to determine whether a callback event for the callback function in the sub-created class is received; The fourth determining unit is used to determine that the application starts to execute a creation operation of creating a page based on the page creation class when a callback event for the callback function in the sub-creation class is received.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the data processing method according to any one of claims 1 to 4 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 4 are implemented.
