CN114489641A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114489641A
CN114489641A CN202111679741.3A CN202111679741A CN114489641A CN 114489641 A CN114489641 A CN 114489641A CN 202111679741 A CN202111679741 A CN 202111679741A CN 114489641 A CN114489641 A CN 114489641A
Authority
CN
China
Prior art keywords
image
class
image control
default
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111679741.3A
Other languages
Chinese (zh)
Other versions
CN114489641B (en
Inventor
荆东伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202111679741.3A priority Critical patent/CN114489641B/en
Publication of CN114489641A publication Critical patent/CN114489641A/en
Application granted granted Critical
Publication of CN114489641B publication Critical patent/CN114489641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a data processing method, a data processing device, electronic equipment and a storage medium. In the case that a default image set in an application program is required to be displayed in the image control in the process of downloading the image for displaying in the image control, a developer can set a proxy child creation class in a creation class for creating the image control in a global configuration class in the application program, that is, the application program can set the default image in the image control in the page in the case of creating the page, so that the application program can display the default image in the image control in the page first, and after downloading a service image required to be displayed in the image control, the service image is used on the image control to replace the default image. Therefore, through the application, the workload of developers can be reduced, and the labor cost is reduced.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
Currently, applications are widely used, and in order to enrich the functions of the applications and enable the applications to better provide services for a large number of users, the applications often include a plurality of pages, and each page includes different contents.
The page in the application program often includes many controls, including an image control that needs to display an image, and the like, and the page often needs to display an image based on the image control, for example, an icon of a button, and the like.
However, after the application is installed on the terminal, for any page in the application, after the application enters the page for the first time, it is necessary to download data for display on the page from the server, and then render the page based on the downloaded data.
Wherein the data for display on the page includes: images for display in image controls in the page, and the like. In a case where the network of the terminal is not unobstructed, it takes a long time to download data for display on the page, for example, it takes a long time to download an image for display in an image control, resulting in that the image cannot be displayed on the image control in the page for a long time after entering the page. Thus, for the user, the image is not visible on the image control of the page for a long time, resulting in a low user experience.
Disclosure of Invention
The application discloses a data processing method, a data processing device, electronic equipment and a storage medium.
In a first aspect, the present application shows a data processing method applied to a terminal, where an application program is installed in the terminal, the method including:
monitoring whether the application program creates a page or not based on a global configuration class in the application program;
under the condition that the application program is monitored to create a page, a creation class used for creating an image control is called in the global configuration class;
calling an agent sub creation class for creating an image control in the creation class, wherein the agent sub creation class is obtained by rewriting a default sub creation class for creating the image control in the creation class in advance, and the agent sub creation class comprises the default sub creation class and an image setting sub class;
creating an image control based on the default child creation class for creating an image control in the proxy child creation class;
setting a default image in the image control based on the image setting subclass in the agent subclass creation class;
rendering the created page based on the image control with the default image set.
In an optional implementation manner, the global configuration class includes a sub-configuration class inheriting the global configuration class; the sub-configuration classes include: a child callback class that inherits a page lifecycle callback class in the global configuration class; the sub callback class comprises a callback function onactive created (), which is used for monitoring whether the application program creates a page or not;
the monitoring whether the application program creates a page or not based on the global configuration class in the application program comprises the following steps:
determining whether a callback event to a callback function onactive created () in the sub callback class is received;
determining that the application created a page in a case where a callback event to the callback function onactive created () in the sub callback class is received.
In an optional implementation manner, the setting a default image in the image control based on the image setting subclass in the agent child creation class includes:
determining a created page based on the image setting subclass;
acquiring a default image suitable for the created page based on the image setting subclass;
setting a default image suitable for the created page in the image control based on the image setting subclass.
In an optional implementation manner, the setting a default image in the image control based on the image setting subclass in the agent child creation class includes:
acquiring the control type of the image control based on the image setting subclass;
acquiring a default image of a control type suitable for the image control based on the image setting subclass;
and setting a default image of the control type suitable for the image control in the image control based on the image setting subclass.
In a second aspect, the present application shows a data processing apparatus, which is applied to a terminal in which an application is installed, the apparatus including:
the monitoring module is used for monitoring whether the application program creates a page or not based on the global configuration class in the application program;
the first calling module is used for calling a creation class for creating an image control in the global configuration class under the condition that the application program creates a page is monitored;
a second calling module, configured to call, in the creation class, an agent child creation class for creating an image control, where the agent child creation class is obtained by rewriting a default child creation class for creating an image control in the creation class in advance, and the agent child creation class includes the default child creation class and an image setting subclass;
a creating module for creating an image control based on the default child creation class for creating an image control in the proxy child creation class;
a setting module, configured to set a default image in the image control based on the image setting subclass in the agent child creation class;
a rendering module to render the created page based on the image control with the default image set.
In an optional implementation manner, the global configuration class includes a sub-configuration class inheriting the global configuration class; the sub-configuration classes include: a child callback class that inherits a page lifecycle callback class in the global configuration class; the sub callback class comprises a callback function onactive created (), which is used for monitoring whether the application program creates a page or not;
the monitoring module comprises:
a first determining unit, configured to determine whether a callback event to a callback function onactivetycreated () in the child callback class is received;
a second determining unit configured to determine that the application created a page, in a case where a callback event to the callback function onactiycreated () in the sub callback class is received.
In an optional implementation manner, the setting module includes:
a third determining unit configured to determine a created page based on the image setting subclass;
a first obtaining unit configured to obtain a default image suitable for the created page based on the image setting subclass;
a first setting unit, configured to set a default image applicable to the created page in the image control based on the image setting subclass.
In an optional implementation manner, the setting module includes:
a second obtaining unit, configured to obtain a control type of the image control based on the image setting subclass;
a third obtaining unit, configured to obtain, based on the image setting subclass, a default image of a control type applicable to the image control;
and the second setting unit is used for setting a default image of the control type suitable for the image control in the image control based on the image setting subclass.
In a third aspect, the present application shows an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the data processing method of the first aspect.
In a fourth aspect, the present application shows a non-transitory computer readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the data processing method of the first aspect.
In a fifth aspect, the present application shows a computer program product, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the data processing method according to the first aspect.
The technical scheme provided by the application can comprise the following beneficial effects:
in the application, whether the application program creates the page is monitored based on the global configuration class in the application program. And in the case that the application program is monitored to create the page, calling a creation class for creating the image control in the global configuration class. And calling a proxy child creation class for creating the image control in the creation class, wherein the proxy child creation class is obtained by rewriting a default child creation class for creating the image control in the creation class in advance, and the proxy child creation class comprises the default child creation class and an image setting subclass for creating the image control in the creation class. And creating an image control based on a default child creation class used for creating the image control in the proxy child creation class, and setting a default image in the created image control based on an image setting subclass in the proxy child creation class. And rendering the created page based on the image control with the default image set.
Thus, according to the application, under the condition that 'the default image set in the application program can be displayed in the image control in the process of downloading the image used for displaying in the image control', developers do not need to respectively optimize the computer program code of each image control in each page in the application program, and can set the proxy child creation class in the creation class used for creating the image control in the global configuration class in the application program, so that the application program can set the default image in the image control in the page under the condition of creating the page, so that the application program can display the default image in the image control in the page first, and then the default image is replaced by the service image on the image control after the service image required to be displayed on the image control is downloaded later.
Therefore, through the application, the workload of developers can be reduced, and the labor cost is reduced.
Drawings
FIG. 1 is a flow chart of the steps of a data processing method of the present application.
Fig. 2 is a block diagram of a data processing apparatus according to the present application.
Fig. 3 is a block diagram of an electronic device of the present application.
Fig. 4 is a block diagram of an electronic device of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to improve user experience, in one mode, a default image may be set in an application program, so that in a process of downloading an image for displaying in an image control, the default image set in the application program in advance may be displayed in the image control, and after the image for displaying in the image control is downloaded from a server, the image displayed on the image control is replaced from the default image to the image for displaying in the image control.
Thus, in the process of downloading the image for display in the image control, the user can see the image (default image) on the image control in the page without seeing the image for a long time, so that the user experience can be improved.
However, applications often include a large number of pages, each page often having a large number of image controls, and images need to be displayed on each image control.
When a developer of an application program develops the application program in advance, the developer needs to develop computer program codes of each page, and the computer program codes of the pages comprise computer program codes of all image controls in the pages.
In this manner, in order that a default image previously set in the application program may be displayed in the image control in advance in the process of downloading the image for display in the image control, the developer optimizes the computer program code of each image control in each page in the application program so that the computer program code of each image control in each page in the application program has a function of "a default image previously set in the application program may be displayed in the image control in advance in the process of downloading the image for display in the image control".
However, the operation of the developer for optimizing the computer program code of each image control in each page of the application program is cumbersome, and the labor cost is high.
Therefore, in order to simplify the operation and reduce the labor cost, referring to fig. 1, a flowchart of steps of a data processing method according to the present application is shown, where the method is applied to a terminal, and an application program is installed in the terminal, and the method may specifically include the following steps:
in step S101, whether the application creates a page is monitored based on the global configuration class in the application.
There may be one global configuration class in an application that is executed when the application is started. For example, an Application class or the like executes the Application class when an Application program is started.
In one embodiment of the present application, the global configuration class includes a child configuration class that inherits the global configuration class of the application.
The sub-configuration classes include MyApplicaiton, et al.
The sub-configuration classes include: child callback classes of the page lifecycle callback class in the global configuration class are inherited.
The page life cycle callback class includes ActivityLifecyccleCallbacks, and the like.
The sub callback class includes registeraactivitylifecycclecallbacks, etc.
The child callback class includes a callback function onactive created () for listening whether the application creates a page.
In this way, in order to monitor whether the application creates a page based on the global configuration class in the application (the created page is an event of loading a page during the running of the application, for example, the application includes a plurality of pages, after the application is started, the page of the application often needs to be displayed, and in order to display the page, the page needs to be created and then can be displayed), it may be determined whether a callback event to the callback function onvinycreated () in the sub-callback class is received, and in the case of receiving the callback event to the callback function onvinycreated () in the sub-callback class, it may be determined that the application creates the page.
The image control creation function is also included in the child callback class. In this manner, in the case where the application creates a page, the image control creation function is executed for the created page.
The specific functions of the image control creating function can be described in steps S102 to S105, and are not described in detail here.
In step S102, in a case where it is monitored that the application creates a page, a creation class for creating an image control is called in the global configuration class.
The global configuration class is configured with a creation class for creating the image control, so that the application program can create the image control in the page according to the creation class.
A create class, etc. may be invoked in the global configuration class based on the from () function.
In step S103, a proxy child creation class for creating the image control is called in the creation class, where the proxy child creation class is obtained by rewriting a default child creation class for creating the image control in the creation class in advance, and the proxy child creation class includes the default child creation class for creating the image control and the image setting subclass in the creation class.
The agent child creation class is set by a developer in a creation class for creating an image control in a global configuration class in the application program in the process of optimizing the developed application program.
The creation class for creating the image control in the global configuration class in the application program is originally provided with a default child creation class for creating the image control, for example, a default child creation class oldField and the like.
In the creation class for creating the image control in the global configuration class in the application program, a developer obtains the proxy child creation class after rewriting the default child creation class for creating the image control in the creation class in the application program. The proxy child creation class includes a default child creation class and an image setting subclass in the creation class for creating an image control.
In this way, in the application program, the image control can be created according to the proxy child creation class, instead of creating the image control according to the original idea of "only according to the default child creation class originally in the creation class for creating the image control".
The creating manner of creating the image control according to the agent child creation class may refer to the description of step S104, and is not described in detail here.
In step S104, an image control is created based on a default child creation class for creating an image control in the proxy child creation class.
In an embodiment of the present application, a parameter named as a preset name (the preset name may be set by a developer in an application program in the process of developing the application program in advance) and the like may be searched for in the creation class, and the parameter named as the preset name is used to call a default child creation class used for creating the image control in the creation class.
For example, a default child creation class may be called in the creation class according to a parameter of the preset name mfactor 2, then an image control may be created based on the default child creation class, for example, an image control may be created based on the default child creation class based on an invoke () function, and after the base image control is created, a default image may be set in the created image control based on an image setting subclass in the proxy child creation class. See step S105 and the like.
The default image may include a background image or the like.
In step S105, a default image is set in the created image control based on the image setting subclass in the agent child creation class.
In one embodiment of the application, there are often multiple pages in an application, and if the default image displayed on each image control on each page is the same, a discourse impression can be generated for the user, which results in a low user experience.
Therefore, in order to avoid the above situation, in another embodiment of the present application, when a default image is set in the created image control based on the image setting subclass in the proxy child creation class, the created page may be determined based on the image setting subclass, then the default image applicable to the created page is acquired based on the image setting subclass, and then the default image applicable to the created page is set in the created image control based on the image setting subclass. The default images suitable for different pages are different, so that the default images seen by the user on the image controls on different pages in the application program are different, and the reduction of user experience is avoided.
In one embodiment of the present application, there may be many control types of image controls created based on a default child creation class in the proxy child creation class, for example, a system-provided control type ImageView and other self-developed control types. Image controls of different control types often correspond to different services or businesses.
If the default image displayed on each image control is the same, a discordant impression may appear to the user, resulting in a low user experience.
Therefore, in order to avoid the above situation, in another embodiment of the present application, when a default image is set in the created image control based on the image setting subclass in the proxy sub creation class, a control type of the created image control may be acquired based on the image setting subclass, then a default image of the control type applicable to the created image control may be acquired based on the image setting subclass, and then a default image of the control type applicable to the created image control may be set in the created image control based on the image setting subclass. The default images suitable for different control types are different, so that the default images seen by the user on different types of image controls in the application program are different, and the reduction of user experience is avoided.
In step S106, the created page is rendered based on the image control in which the default image is set.
In this manner, the user can see the rendered default image on the image control in the page.
In the application, whether the application program creates the page is monitored based on the global configuration class in the application program. And in the case that the application program is monitored to create the page, calling a creation class for creating the image control in the global configuration class. And calling a proxy child creation class for creating the image control in the creation class, wherein the proxy child creation class is obtained by rewriting a default child creation class for creating the image control in the creation class in advance, and the proxy child creation class comprises the default child creation class and an image setting subclass for creating the image control in the creation class. And creating an image control based on a default child creation class used for creating the image control in the proxy child creation class, and setting a default image in the created image control based on an image setting subclass in the proxy child creation class. And rendering the created page based on the image control with the default image set.
Thus, according to the application, under the condition that 'the default image set in the application program can be displayed in the image control in the process of downloading the image used for displaying in the image control', developers do not need to respectively optimize the computer program code of each image control in each page in the application program, and can set the proxy child creation class in the creation class used for creating the image control in the global configuration class in the application program, so that the application program can set the default image in the image control in the page under the condition of creating the page, so that the application program can display the default image in the image control in the page first, and then the default image is replaced by the service image on the image control after the service image required to be displayed on the image control is downloaded later.
Therefore, through the application, the workload of developers can be reduced, and the labor cost is reduced.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are exemplary and that no action is necessarily required in this application.
Referring to fig. 2, a block diagram of a data processing apparatus according to the present application, the apparatus being applied to a terminal in which an application is installed, the apparatus including:
the monitoring module 11 is configured to monitor whether the application creates a page based on a global configuration class in the application;
a first calling module 12, configured to, in a case that it is monitored that the application creates a page, call, in the global configuration class, a creation class for creating an image control;
a second retrieving module 13, configured to retrieve, in the creation class, an agent child creation class used for creating an image control, where the agent child creation class is obtained by rewriting a default child creation class used for creating an image control in the creation class in advance, and the agent child creation class includes the default child creation class and an image setting subclass;
a creating module 14, configured to create an image control based on the default child creation class for creating an image control in the proxy child creation class;
a setting module 15, configured to set a default image in the image control based on the image setting subclass in the agent child creation class;
a rendering module 16 for rendering the created page based on the image control with the default image set.
In an optional implementation manner, the global configuration class includes a sub-configuration class inheriting the global configuration class; the sub-configuration classes include: a child callback class that inherits a page lifecycle callback class in the global configuration class; the sub callback class comprises a callback function onactive created (), which is used for monitoring whether the application program creates a page or not;
the monitoring module comprises:
a first determining unit, configured to determine whether a callback event to a callback function onactivetycreated () in the child callback class is received;
a second determining unit, configured to determine that the application creates a page in a case where a callback event for the callback function onactiyCreated () in the child callback class is received.
In an optional implementation manner, the setting module includes:
a third determining unit configured to determine a created page based on the image setting subclass;
a first obtaining unit configured to obtain a default image suitable for the created page based on the image setting subclass;
a first setting unit, configured to set a default image applicable to the created page in the image control based on the image setting subclass.
In an optional implementation manner, the setting module includes:
a second obtaining unit, configured to obtain a control type of the image control based on the image setting subclass;
a third obtaining unit, configured to obtain a default image of a control type applicable to the image control based on the image setting subclass;
and the second setting unit is used for setting a default image of the control type suitable for the image control in the image control based on the image setting subclass.
In the application, whether the application program creates the page is monitored based on the global configuration class in the application program. And in the case that the application program is monitored to create the page, calling a creation class for creating the image control in the global configuration class. And calling a proxy child creation class for creating the image control in the creation class, wherein the proxy child creation class is obtained by rewriting a default child creation class for creating the image control in the creation class in advance, and the proxy child creation class comprises the default child creation class and an image setting subclass for creating the image control in the creation class. And creating an image control based on a default child creation class used for creating the image control in the proxy child creation class, and setting a default image in the created image control based on an image setting subclass in the proxy child creation class. And rendering the created page based on the image control with the default image set.
Thus, according to the application, under the condition that 'the default image set in the application program can be displayed in the image control in the process of downloading the image used for displaying in the image control', developers do not need to respectively optimize the computer program code of each image control in each page in the application program, and can set the proxy child creation class in the creation class used for creating the image control in the global configuration class in the application program, so that the application program can set the default image in the image control in the page under the condition of creating the page, so that the application program can display the default image in the image control in the page first, and then the default image is replaced by the service image on the image control after the service image required to be displayed on the image control is downloaded later.
Therefore, through the application, the workload of developers can be reduced, and the labor cost is reduced.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Optionally, an embodiment of the present invention further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when executed by the processor, implement the processes of the data processing method embodiments described above, and can achieve the same technical effects, and in order to avoid repetition, details are not described here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the data processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Fig. 3 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, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, 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.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile and non-volatile memory devices 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 or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a 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 an input signal from a 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 boundary of a 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 facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light 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 acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may 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 broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 4 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.
Referring to fig. 4, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power 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 memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A data processing method, wherein the method is applied to a terminal in which an application program is installed, and the method comprises:
monitoring whether the application program creates a page or not based on a global configuration class in the application program;
under the condition that the application program is monitored to create a page, a creation class used for creating an image control is called in the global configuration class;
calling an agent sub creation class for creating an image control in the creation class, wherein the agent sub creation class is obtained by rewriting a default sub creation class for creating the image control in the creation class in advance, and the agent sub creation class comprises the default sub creation class and an image setting sub class;
creating an image control based on the default child creation class for creating an image control in the proxy child creation class;
setting a default image in the image control based on the image setting subclass in the agent subclass creation class;
rendering the created page based on the image control with the default image set.
2. The method of claim 1, wherein the global configuration class includes a sub-configuration class that inherits the global configuration class; the sub-configuration classes include: a child callback class that inherits a page lifecycle callback class in the global configuration class; the sub callback class comprises a callback function onactive created (), which is used for monitoring whether the application program creates a page or not;
the monitoring whether the application program creates a page or not based on the global configuration class in the application program comprises the following steps:
determining whether a callback event to a callback function onactive created () in the sub callback class is received;
determining that the application created a page in a case where a callback event to the callback function onactive created () in the sub callback class is received.
3. The method of claim 1, wherein the setting a default image in the image control based on the image setting subclass in the proxy child creation class comprises:
determining a created page based on the image setting subclass;
acquiring a default image suitable for the created page based on the image setting subclass;
setting a default image applicable to the created page in the image control based on the image setting subclass.
4. The method of claim 1, wherein the setting a default image in the image control based on the image setting subclass in the proxy child creation class comprises:
acquiring the control type of the image control based on the image setting subclass;
acquiring a default image of a control type suitable for the image control based on the image setting subclass;
and setting a default image of the control type suitable for the image control in the image control based on the image setting subclass.
5. A data processing apparatus, wherein the apparatus is applied to a terminal in which an application is installed, the apparatus comprising:
the monitoring module is used for monitoring whether the application program creates a page or not based on the global configuration class in the application program;
the first calling module is used for calling a creation class for creating an image control in the global configuration class under the condition that the application program creates a page is monitored;
a second calling module, configured to call, in the creation class, an agent child creation class for creating an image control, where the agent child creation class is obtained by rewriting a default child creation class for creating an image control in the creation class in advance, and the agent child creation class includes the default child creation class and an image setting subclass;
a creating module for creating an image control based on the default child creation class for creating an image control in the proxy child creation class;
a setting module, configured to set a default image in the image control based on the image setting subclass in the agent child creation class;
a rendering module to render the created page based on the image control with the default image set.
6. The apparatus of claim 5, wherein the global configuration class comprises a sub-configuration class that inherits the global configuration class; the sub-configuration classes include: a child callback class that inherits a page lifecycle callback class in the global configuration class; the sub callback class comprises a callback function onactive created (), which is used for monitoring whether the application program creates a page or not;
the monitoring module comprises:
a first determining unit, configured to determine whether a callback event to a callback function onactivetycreated () in the child callback class is received;
a second determining unit, configured to determine that the application creates a page in a case where a callback event for the callback function onactiyCreated () in the child callback class is received.
7. The apparatus of claim 5, wherein the setup module comprises:
a third determining unit configured to determine a created page based on the image setting subclass;
a first obtaining unit configured to obtain a default image suitable for the created page based on the image setting subclass;
a first setting unit, configured to set a default image applicable to the created page in the image control based on the image setting subclass.
8. The apparatus of claim 5, wherein the setup module comprises:
a second obtaining unit, configured to obtain a control type of the image control based on the image setting subclass;
a third obtaining unit, configured to obtain a default image of a control type applicable to the image control based on the image setting subclass;
and the second setting unit is used for setting a default image of the control type suitable for the image control in the image control based on the image setting subclass.
9. An electronic device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the data processing method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data processing method according to any one of claims 1 to 4.
CN202111679741.3A 2021-12-31 2021-12-31 Data processing method and device, electronic equipment and storage medium Active CN114489641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111679741.3A CN114489641B (en) 2021-12-31 2021-12-31 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111679741.3A CN114489641B (en) 2021-12-31 2021-12-31 Data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114489641A true CN114489641A (en) 2022-05-13
CN114489641B CN114489641B (en) 2022-11-08

Family

ID=81510365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111679741.3A Active CN114489641B (en) 2021-12-31 2021-12-31 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114489641B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060236253A1 (en) * 2005-04-15 2006-10-19 Microsoft Corporation Dialog user interfaces for related tasks and programming interface for same
CN105094832A (en) * 2015-08-01 2015-11-25 李志丹 WYSIWYG method and system for dynamically generating user interface
CN108549562A (en) * 2018-03-16 2018-09-18 阿里巴巴集团控股有限公司 A kind of method and device of image load
CN109426499A (en) * 2017-08-30 2019-03-05 武汉斗鱼网络科技有限公司 A kind of web page extending method and device
CN110807162A (en) * 2018-07-20 2020-02-18 北京京东尚科信息技术有限公司 Method and device for loading occupation bitmap
CN112364217A (en) * 2020-10-15 2021-02-12 北京五八信息技术有限公司 Information display method and device, electronic equipment and storage medium
CN112506500A (en) * 2020-12-03 2021-03-16 武汉蓝星科技股份有限公司 Visual control creating method and device
CN113342341A (en) * 2021-06-18 2021-09-03 北京奇艺世纪科技有限公司 Page creating method, device and system and storage medium
CN113568674A (en) * 2021-06-29 2021-10-29 五八有限公司 Page data loading method, page data loading device and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060236253A1 (en) * 2005-04-15 2006-10-19 Microsoft Corporation Dialog user interfaces for related tasks and programming interface for same
CN105094832A (en) * 2015-08-01 2015-11-25 李志丹 WYSIWYG method and system for dynamically generating user interface
CN109426499A (en) * 2017-08-30 2019-03-05 武汉斗鱼网络科技有限公司 A kind of web page extending method and device
CN108549562A (en) * 2018-03-16 2018-09-18 阿里巴巴集团控股有限公司 A kind of method and device of image load
CN110807162A (en) * 2018-07-20 2020-02-18 北京京东尚科信息技术有限公司 Method and device for loading occupation bitmap
CN112364217A (en) * 2020-10-15 2021-02-12 北京五八信息技术有限公司 Information display method and device, electronic equipment and storage medium
CN112506500A (en) * 2020-12-03 2021-03-16 武汉蓝星科技股份有限公司 Visual control creating method and device
CN113342341A (en) * 2021-06-18 2021-09-03 北京奇艺世纪科技有限公司 Page creating method, device and system and storage medium
CN113568674A (en) * 2021-06-29 2021-10-29 五八有限公司 Page data loading method, page data loading device and electronic equipment

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
KINGSHOW: "ImageView显示图像控件(基本用法)", 《HTTPS://WWW.CNBLOGS.COM/KINGSHOW123/P/IMAGEVIEW.HTML》 *
NEHA PATIL等: "Enhanced UI Automator Viewer with improved Android accessibility evaluation features", 《2016 INTERNATIONAL CONFERENCE ON AUTOMATIC CONTROL AND DYNAMIC OPTIMIZATION TECHNIQUES (ICACDOT)》 *
尹航等: "基于配置文件的web页面自动生成系统", 《软件》 *
张香倩等: "基于Android的自定义媒体播放控件设计与实现", 《软件导刊》 *
斯琴巴图: "一种基于C#的图像按钮用户控件的实现", 《黑龙江科技信息》 *

Also Published As

Publication number Publication date
CN114489641B (en) 2022-11-08

Similar Documents

Publication Publication Date Title
KR101770931B1 (en) Method, apparatus, program and computer-readable recording medium of generating communication module firmware and plug-in
EP3333690A2 (en) Object starting method and device
CN111240694B (en) Application detection method, application detection device and storage medium
CN110704054A (en) Method and device for accessing target application program through applet, electronic equipment and storage medium
CN107463372B (en) Data-driven page updating method and device
CN111198706A (en) Method for updating system function, apparatus for updating system function and storage medium
EP2985697A1 (en) Method and device for controlling router plug-in
CN105786561B (en) Method and device for calling process
CN110515623B (en) Method and device for realizing graphic operation, electronic equipment and storage medium
CN114489641B (en) Data processing method and device, electronic equipment and storage medium
CN110457084B (en) Loading method and device
CN112083841B (en) Information input method, device and storage medium
CN113590091A (en) Data processing method and device, electronic equipment and storage medium
CN111597106A (en) Point burying management method and device
CN107257384B (en) Service state monitoring method and device
CN114416218B (en) Data processing method and device, electronic equipment and storage medium
CN114385373A (en) Data sharing method, data sharing device and computer readable storage medium
CN107360315B (en) Information display method and device
CN113934452B (en) Data processing method and device, electronic equipment and storage medium
CN113946346B (en) Data processing method and device, electronic equipment and storage medium
CN114416220A (en) Data processing method and device, electronic equipment and storage medium
CN112506628B (en) Agent program management method, device, computer equipment and storage medium
CN111596949B (en) Method and device for developing application program
CN108833673B (en) Method, apparatus, hardware apparatus and medium for restricting user operation
CN107463414B (en) Application installation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant