CN109710259B - Data processing method, device and storage medium - Google Patents

Data processing method, device and storage medium Download PDF

Info

Publication number
CN109710259B
CN109710259B CN201811626334.4A CN201811626334A CN109710259B CN 109710259 B CN109710259 B CN 109710259B CN 201811626334 A CN201811626334 A CN 201811626334A CN 109710259 B CN109710259 B CN 109710259B
Authority
CN
China
Prior art keywords
attribute
information
data processing
pool
display element
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.)
Active
Application number
CN201811626334.4A
Other languages
Chinese (zh)
Other versions
CN109710259A (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 Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201811626334.4A priority Critical patent/CN109710259B/en
Publication of CN109710259A publication Critical patent/CN109710259A/en
Application granted granted Critical
Publication of CN109710259B publication Critical patent/CN109710259B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a data processing method, a data processing device and a storage medium. The method comprises the following steps: acquiring attribute information and/or style information of a display element by a main thread of an application; judging whether an attribute object corresponding to the attribute information and/or the style information of the display element exists in a preset object pool or not; and when the attribute object corresponding to the attribute information and/or the style information of the display element exists in the object pool, acquiring the attribute object, and creating and generating a component object corresponding to the display element based on the attribute object. By means of the method and the device, the attribute objects can be shared, so that memory resources and computing resources required when the component objects corresponding to the display elements are created are reduced, the efficiency of creating the component objects is improved, and the rendering efficiency of the display elements is improved.

Description

Data processing method, device and storage medium
Technical Field
The present disclosure relates to the field of application development technologies, and in particular, to a data processing method, an apparatus, and a storage medium.
Background
Page rendering in applications is a relatively important link. The page rendering in the application means that the description language of the display element is converted into an executable object, then the object corresponding to the display element is rendered, and finally the display page is generated.
In the page rendering process of the application, the main thread often needs to create and generate a component object corresponding to the type of the display element according to the description language corresponding to the display element. However, creating a generative component object by a main thread tends to consume high computational resources.
Therefore, there is a need in the art for a method of generating component objects that reduces the computational resources required for creation.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a data processing method and apparatus.
According to a first aspect of the embodiments of the present disclosure, there is provided a data processing method, including:
acquiring attribute information and/or style information of a display element by a main thread of an application;
judging whether an attribute object corresponding to the attribute information and/or the style information of the display element exists in a preset object pool or not;
and when the attribute object corresponding to the attribute information and/or the style information of the display element exists in the object pool, acquiring the attribute object, and creating and generating a component object corresponding to the display element based on the attribute object.
According to a second aspect of the embodiments of the present disclosure, there is provided a data processing apparatus including:
the information acquisition module is used for acquiring the attribute information and/or the style information of the display element by the main thread of the application;
the judging module is used for judging whether an attribute object corresponding to the attribute information of the display element and/or the style information exists in a preset object pool or not;
and the component creating module is used for acquiring the attribute object when the attribute object corresponding to the attribute information and/or the style information of the display element exists in the object pool, and creating and generating the component object corresponding to the display element based on the attribute object.
According to a third aspect of the embodiments of the present disclosure, there is provided a data processing apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the above data processing method.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having instructions therein, which when executed by a processor, enable the processor to perform the data processing method.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the data processing method, the data processing device and the storage medium provided by each embodiment of the disclosure can store the attribute objects corresponding to the display elements in a preset object pool manner, and particularly aim at the attribute objects which need to occupy more memory space and have higher calculation cost during creation. The attribute objects are stored in the preset object pool, and can be acquired from the preset object pool when other multiple display elements need the attribute objects, so that the attribute objects can be shared, memory resources and calculation resources required by creating the component objects corresponding to the display elements are reduced, the efficiency of creating the component objects is improved, and the rendering efficiency of the display elements is improved. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram illustrating a data processing method according to an exemplary embodiment.
FIG. 2 is a flow chart illustrating a method of data processing according to an exemplary embodiment.
FIG. 3 is a flow chart illustrating a method of data processing according to an exemplary embodiment.
FIG. 4 is a flow chart illustrating a method of data processing according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating a data processing apparatus according to an example embodiment.
FIG. 6 is a block diagram illustrating an apparatus in accordance with an example embodiment.
FIG. 7 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In order to facilitate those skilled in the art to understand the technical solutions provided in the embodiments of the present application, a technical environment for implementing the technical solutions is first described with reference to fig. 1.
The fast application is a novel application ecology based on a hardware platform in the current market, and in the using process, a user can use various fast applications in a point-to-point manner without downloading and installing native applications, and can enjoy the same performance experience as the native applications. The fast application framework is deeply integrated in the operating systems of mobile phones of various manufacturers, so that the connection between user requirements and application services can be realized on the operating system level, the use experience of users and the conversion efficiency of the application services are improved, and meanwhile, the retention capabilities of generating desktop icons and the like are supported. As in any other application, page rendering in fast applications is an important link for fast applications. The page rendering in the application means that the description language of the display element is converted into an executable object, then the object corresponding to the display element is rendered, and finally the display page is generated.
In the page rendering process of the fast application, the main thread often needs to create and generate a component object corresponding to the type of the display element according to the description language corresponding to the display element. However, creating a generative component object by a main thread tends to consume high computational resources. In an embodiment, in an Android (Android) operating system based fast application development platform, the main body for processing rendering is generally an Android operating system based application main thread and a fast application development language based JS thread. The JS thread corresponds to a JavaScript language which is a development language of most of fast applications at present, and is referred to as the JS language for short. The JS language is an object-oriented transliteration language, and therefore, a fast-running-on-demand application can be supported. In the process of processing rendering by applying the main thread and the JS thread, a general processing flow is as follows: the application main thread receives an input event and sends data of the input event to the JS thread; processing the data of the input event by the JS thread, and generating json description of display elements; and the application main thread acquires the json description of the display elements and renders the display elements.
After receiving the json description of the display element, the application main thread may create a component object corresponding to the display element based on a component type (e.g., text, picture, control, etc.) in the json description. The component object may include a plurality of attribute objects, event objects, and the like. Therefore, in the process of creating the component object, the property object and the event object are usually set in the component object after the creation is completed. However, some of the attribute objects and event objects often occupy a large memory space, such as a picture object, a complex text object, and the like. When creating these objects, it is often necessary to consume more computing resources and memory resources, and especially under the condition of loading such objects for many times, the computing resources and memory resources are greatly increased.
Based on the above technical requirements, the data processing method provided by the present disclosure may establish a preset object pool for storing some objects with higher creation cost among the attribute objects and the event objects, and reuse the objects, thereby reducing the computational resources and memory resources of the client.
The data processing method provided by the embodiments of the present disclosure is described below by a specific application scenario.
As shown in the schematic diagram of fig. 1, in a client based on an android operating system, a preset object pool may be set, where the object pool may include a picture object pool, a text object pool, an event object pool, and the like. As shown in fig. 1, the preset object pool may store a hash value and an attribute object in a storage form of a key value pair, where the hash value is calculated according to a parameter value in attribute information and/or style information of a display element, and a specific calculation manner may be described with reference to the following embodiments, which is not described herein again. As shown in fig. 1, in the process of generating the component object a of the display element a, by querying the picture object pool, it can be determined that the object 2 required for creating the component object a exists in the picture object pool, and therefore, the object 2 can be directly obtained from the picture object pool without re-creation. Meanwhile, in the process of generating the component object B of the display element B, by querying the picture object pool, it can also be determined that the object 2 required for creating the component object a exists in the picture object pool, and therefore, the object 2 can also be directly obtained from the picture object pool. It can be found that by sharing the attribute objects required when creating the component object, the memory resources and the computing resources required for creating the component object can be greatly reduced.
The data processing method according to the present disclosure will be described in detail below with reference to the accompanying drawings. Fig. 2 is a method flowchart of an embodiment of a data processing method provided by the present disclosure. Although the present disclosure provides method steps as illustrated in the following examples or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the disclosed embodiments.
Specifically, as shown in fig. 2, an embodiment of the data processing method provided by the present disclosure may include:
in step 201, a main thread of an application acquires attribute information and/or style information of a display element;
in step 203, determining whether an attribute object corresponding to the attribute information of the display element and/or the style information exists in a preset object pool;
in step 205, when there is a property object corresponding to the property information and/or the style information of the display element in the object pool, the property object is obtained, and a component object corresponding to the display element is created and generated based on the property object.
The data processing method provided by the disclosure can be applied to any client with an application provided in an operating system, wherein the application comprises a fast application and a traditional application. In one embodiment, the legacy applications include applications that require installation of a data package in an operating system before they can be run. The client may include a terminal device capable of rendering display elements. Specifically, for example, the electronic device may be a mobile smart phone, a computer (including a laptop computer and a desktop computer), a tablet electronic device, a Personal Digital Assistant (PDA) or a smart wearable device, and the like.
In the embodiment of the present disclosure, the main thread of the application may be created when the application is run, and is used to run components provided by an operating system, so as to control display, update, and control interaction of a User Interface (UI). For example, in an android operating system, the main thread may comprise a UI thread in an application. Of course, the main thread is not limited to a UI thread in an android operating system, but may also be a main thread based on any other operating system, for example, the operating system may include an iOS system, a Windows system, and the like, which is not limited by the present disclosure.
The display elements in this disclosure may include elements required in a page layout, such as windows, text boxes, controls, pictures, etc. in a page. In this embodiment of the present disclosure, before the main thread performs rendering, the attribute information and/or the style information of the display element may be acquired. The attribute information may include additional information for the content of the display element, and the style information may include appearance information displayed by the display element. In one example, the attribute information of the picture element may include a source of the picture (e.g., a URI address, a URL address), replacement information of the picture (e.g., an alt attribute), and the style information of the picture element may include a length, a width, whether to center, a boundary effect, and the like of the picture. In another example, style information for a text element may include a line number, color, size, font style, line height, background color, and the like of the text. In another example, the attribute information and style information of the control element may include an address of the background picture, a size of the background picture, transparency, text, a line number of the text, a color, a size, a font style, a line height, a background color, and so on.
In the embodiment of the present disclosure, the main thread may acquire the attribute information and/or the style information of the display element in a variety of ways. In one embodiment, the main thread may receive a description of a display element from a development thread and obtain attribute information and/or style information of the display element from the description. Wherein the development thread may be used to run development code for the application itself. For example, in an android operating system based fast application, the development thread may include a JS thread that may be launched with the launch of the fast application. After receiving the input event of the main thread, the JS thread can acquire the display element triggered by the input event and describe the display element by utilizing a json data exchange format. In one example, the json description for a text box with "hello" content is:
Figure BDA0001928070540000051
wherein "attr" is attribute information of the text box, i.e. display content, "value" is a parameter of the attribute information, "hello" is a parameter value of "value", and "value" and "hello" are represented in the form of a key-value pair, "style" is style information of the text box, i.e. width and background color, and "text" is a type of a component object of the text box.
It should be noted that the development thread is not limited to the JS thread in the android operating system, and may be a child thread of development code for running an application, which is set in any operating system. In addition, in other applications, such as a legacy application, the description of the display element may include an xml description, or other descriptions oriented to any development language, and the like, and the disclosure is not limited herein.
In an embodiment of the present disclosure, after acquiring the attribute information and/or the style information of the display element, the main thread may determine whether an attribute object corresponding to the attribute information and/or the style information exists in a preset object pool. The attribute object may be a component in a component object (such as a Java object in an Android operating system) corresponding to the display element, and is also an executable object in which a main thread can directly run and process. In an embodiment of the present disclosure, the preset object pool may include a part of a storage space preset in the client for storing the attribute object, where the storage space may include a memory, a cache, a virtual memory, and the like. In this disclosure, in the process of determining whether the attribute object corresponding to the attribute information and/or the style information exists in the preset object pool, the main thread may perform determination according to parameter values of parameters in the attribute information and/or the style information. Since the attribute information and the style information include parameters and parameter values, naming rules of the parameters are the same for the same attribute and style. Therefore, only the parameter values corresponding to the parameters have obvious distinguishing characteristics, and the corresponding attribute objects are searched in the preset object pool through the parameter values, so that the searching efficiency can be improved.
In one example, for the json description of the text box with "hello", in determining whether the attribute object corresponding to the attribute information "attr" { "value": hello "} and the style information" style "{" width ": 40 px", "background-color": ddffee "} exists in the preset object pool, the preset object pool may be searched according to the parameter values" hello "," 40px "," ddffee "to implement the above determination. Correspondingly, in the preset memory pool, a parameter value and an attribute object may be stored in a key-value (key-value) form, where the parameter value may be a key, and the attribute object is a value. By comparing the parameter values in the attribute information and/or the style information with the keys in the preset object pool, it can be determined whether the attribute object corresponding to the attribute information and/or the style information exists in the preset object pool.
In practical cases, for some more complex display elements, such as typical controls, these elements may include not only pictures, but also various types of sub-elements such as texts and events. Therefore, it is difficult to express a plurality of sub-elements by one attribute object, and therefore, for such a complicated display element, a component object corresponding to the display element can be created by using a plurality of attribute objects. Based on this, a plurality of sub-object pools may be set in the preset object pool, and the sub-object pools are respectively used for storing different types of attribute objects. In one embodiment, the sub-object pool comprises a picture object pool, a text object pool, an event object pool, and the like. The picture object pool may be used to store attribute objects of image classes, and the text object pool may be used to store attribute objects of text classes.
Based on this, as shown in fig. 3, in an embodiment of the present disclosure, the determining whether the property object corresponding to the property information and/or the style information of the display element exists in the preset object pool may include:
in step 301, determining a type of at least one attribute object that can be created according to parameters in the attribute information and/or the style information;
in step 303, it is determined whether the at least one attribute object exists in the sub-object pool corresponding to the type.
The above-described method steps are illustrated below by way of a specific example. For example, a control display element may include both picture and text seed elements, and thus, the control display element corresponds to at least one picture class attribute object and one text class attribute object. Then, in the process of determining whether the picture class attribute object and the text class attribute object exist in the preset object pool, the type of the attribute object that can be created may be determined first. Specifically, the type may be determined according to a parameter in the attribute information and/or the style information. The following is a json description of an input control:
Figure BDA0001928070540000071
the control can be determined to correspond to a picture type attribute object according to the parameters 'background', 'background-width' and 'background-height', and the control can be determined to correspond to a text type attribute object according to the parameters 'default-text', 'font-family' and 'font-color'. Therefore, it can be determined whether the picture class attribute object exists in the picture object pool or not, and whether the text class attribute object exists in the text object pool or not.
In an embodiment of the present disclosure, if there are more parameters in the attribute information and/or the style information, that is, the content of the parameter value is more, so that the calculation is more complicated when the parameter value is used as the key of the attribute object in the preset object pool in the search comparison process. Based on this, in the embodiment of the present disclosure, the hash value of the parameter value may be used as the key of the attribute object in the preset object pool, so that the calculation process may be greatly simplified, and the query efficiency may be improved. Then, when determining whether there exists an attribute object corresponding to the attribute information "attr": value { "hello": and style information "style": width { "40 px", "background-color": ddffee "} in the preset object pool, the preset object pool may be searched by calculating hash values of the parameter values" hello "," 40px "," ddffee ", and then by matching the hash values with key values in the preset object pool, to implement the above determination. As shown in fig. 4, the corresponding method steps may include:
in step 401, calculating a hash value to be queried of a parameter value of at least one parameter in the attribute information and/or the style information;
in step 403, it is determined whether a hash value in a preset object pool is an attribute object of the hash value to be queried.
In this embodiment of the present disclosure, when determining that the attribute object exists in the preset object pool, the main thread may obtain the attribute object from the preset object pool, and create and generate a component object corresponding to the display element based on the attribute pair. On the contrary, if it is determined that the attribute object does not exist in the preset object pool, the attribute object corresponding to the attribute information and/or the style information may be created, and the attribute object may be stored in the preset object pool.
The data processing method provided by each embodiment of the present disclosure may store the attribute objects corresponding to the display elements in a preset object pool manner, and particularly, the data processing method is directed to the attribute objects that need to occupy more memory space and have higher calculation overhead when being created. The attribute objects are stored in the preset object pool, and can be acquired from the preset object pool when other multiple display elements need the attribute objects, so that the attribute objects can be shared, memory resources and calculation resources required by creating the component objects corresponding to the display elements are reduced, the efficiency of creating the component objects is improved, and the rendering efficiency of the display elements is improved.
Another aspect of the present disclosure also provides a data processing apparatus, and fig. 5 is a block diagram illustrating a data processing apparatus 500 according to an exemplary embodiment. Referring to fig. 5, the apparatus includes an identification information acquisition module 501, a judgment module 503, and a component creation module 505, wherein,
an information obtaining module 501, configured to obtain attribute information and/or style information of a display element by a main thread of an application;
a determining module 503, configured to determine whether an attribute object corresponding to the attribute information and/or the style information exists in a preset object pool;
and a component creating module 505, configured to, if the determination result is yes, obtain the attribute object, and create and generate a component object corresponding to the display element based on the attribute object.
Optionally, in an embodiment of the present disclosure, the preset object pool includes a plurality of sub-object pools, and the plurality of sub-object pools are respectively used for storing different types of attribute objects.
Optionally, in an embodiment of the present disclosure, the determining module includes:
the type determining module is used for determining the type of at least one attribute object which can be created according to the parameters in the attribute information and/or the style information;
and the first judging submodule is used for judging whether the at least one attribute object exists in the sub-object pool corresponding to the type.
Optionally, in an embodiment of the present disclosure, the sub-object pool includes a picture object pool, a text object pool, and an event object pool.
Optionally, in an embodiment of the present disclosure, the apparatus further includes:
an object creating module, configured to create, when an attribute object corresponding to attribute information and/or style information of the display element does not exist in an object pool, an attribute object corresponding to the attribute information and/or the style information of the display element;
and the storage module is used for storing the attribute object into the preset object pool.
Optionally, in an embodiment of the present disclosure, the preset object pool further includes a hash value of the attribute object, and the hash value is obtained by calculation according to a parameter value of at least one parameter in the attribute information and/or the style information.
Optionally, in an embodiment of the present disclosure, the determining module includes:
the hash value calculation module is used for calculating a hash value to be inquired of a parameter value of at least one parameter in the attribute information and/or the style information;
and the second judgment submodule is used for judging whether the hash value in the preset object pool is an attribute object of the hash value to be inquired.
Fig. 6 is a block diagram illustrating an apparatus 700 for resource allocation indication in accordance with an example embodiment. For example, the apparatus 700 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. 6, the apparatus 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the apparatus 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or 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 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 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-sensitive display to transmit input signals 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 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may transmit external multimedia data when the device 700 is in an operation mode, such as a photographing 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 710 is configured to output and/or input audio signals. For example, audio component 710 includes a Microphone (MIC) configured to transmit external audio signals when apparatus 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The transmitted audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 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 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of device 700, sensor assembly 714 may also detect a change in position of device 700 or a component of device 700, the presence or absence of user contact with device 700, orientation or acceleration/deceleration of device 700, and a change in temperature of device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 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 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the apparatus 700 and other devices. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 transmits the broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 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 apparatus 700 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 704 comprising instructions, executable by the processor 720 of the device 700 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. 7 is a block diagram illustrating an apparatus 800 for information processing according to an example embodiment. For example, the apparatus 800 may be provided as a server. Referring to FIG. 7, the apparatus 800 includes a processing component 822, which further includes one or more processors, and memory resources, represented by memory 832, for storing instructions, such as applications, that are executable by the processing component 822. The application programs stored in memory 832 may include one or more modules that each correspond to a set of instructions. Further, the processing component 822 is configured to execute instructions to perform a method as described in any of the embodiments above.
The device 800 may also include a power component 826 configured to perform power management of the device 800, a wired or wireless network interface 850 configured to connect the device 800 to a network, and an input/output (I/O) interface 858. The apparatus 800 may operate based on an operating system stored in the memory 832, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 832 comprising instructions, executable by the processing component 822 of the apparatus 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.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A data processing method, comprising:
acquiring attribute information and/or style information of a display element by a main thread of an application;
judging whether an attribute object corresponding to the attribute information and/or the style information of the display element exists in a preset object pool, wherein the attribute object is shared by a plurality of component objects;
and when the attribute object corresponding to the attribute information and/or the style information of the display element exists in the object pool, acquiring the attribute object, and creating and generating a component object corresponding to the display element based on the attribute object.
2. The data processing method according to claim 1, wherein the preset object pool comprises a plurality of sub-object pools, and the plurality of sub-object pools are respectively used for storing different types of attribute objects.
3. The data processing method according to claim 2, wherein the determining whether the property object corresponding to the property information and/or the style information of the display element exists in the preset object pool comprises:
determining the type of at least one attribute object which can be created according to the parameters in the attribute information and/or the style information;
and judging whether the at least one attribute object exists in the sub-object pool corresponding to the type.
4. The data processing method of claim 2, wherein the sub-object pool comprises a picture object pool, a text object pool, and an event object pool.
5. The data processing method of claim 1, wherein the method further comprises:
creating a property object corresponding to the property information and/or the style information of the display element when the property object corresponding to the property information and/or the style information of the display element does not exist in an object pool;
and storing the attribute object into the preset object pool.
6. The data processing method according to any one of claims 1 to 5, wherein the preset object pool further includes a hash value of the attribute object, and the hash value is calculated according to a parameter value of at least one parameter in the attribute information and/or the style information.
7. The data processing method according to claim 6, wherein the determining whether the property object corresponding to the property information of the display element and/or the style information exists in the preset object pool comprises:
calculating a hash value to be inquired of a parameter value of at least one parameter in the attribute information and/or the style information;
and judging whether the hash value exists in a preset object pool or not as the attribute object of the hash value to be inquired.
8. A data processing apparatus, comprising:
the information acquisition module is used for acquiring the attribute information and/or the style information of the display element by the main thread of the application;
a judging module, configured to judge whether an attribute object corresponding to the attribute information of the display element and/or the style information exists in a preset object pool, where the attribute object is shared by multiple component objects;
and the component creating module is used for acquiring the attribute object when the attribute object corresponding to the attribute information and/or the style information of the display element exists in the object pool, and creating and generating the component object corresponding to the display element based on the attribute object.
9. The data processing apparatus according to claim 8, wherein the preset object pool includes a plurality of sub-object pools, and the sub-object pools are respectively configured to store different types of attribute objects.
10. The data processing apparatus of claim 9, wherein the determining means comprises:
the type determining module is used for determining the type of at least one attribute object which can be created according to the parameters in the attribute information and/or the style information;
and the first judging submodule is used for judging whether the at least one attribute object exists in the sub-object pool corresponding to the type.
11. The data processing apparatus of claim 9, wherein the sub-object pool comprises a picture object pool, a text object pool, and an event object pool.
12. The data processing apparatus of claim 8, wherein the apparatus further comprises:
an object creating module, configured to create, when an attribute object corresponding to attribute information and/or style information of the display element does not exist in an object pool, an attribute object corresponding to the attribute information and/or the style information of the display element;
and the storage module is used for storing the attribute object into the preset object pool.
13. The data processing apparatus according to any of claims 8 to 12, wherein the predetermined object pool further comprises a hash value of the attribute object, and the hash value is calculated according to a parameter value of at least one parameter in the attribute information and/or the style information.
14. The data processing apparatus of claim 13, wherein the determining means comprises:
the hash value calculation module is used for calculating a hash value to be inquired of a parameter value of at least one parameter in the attribute information and/or the style information;
and the second judgment submodule is used for judging whether the hash value in the preset object pool is an attribute object of the hash value to be inquired.
15. A data processing apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the data processing method of any one of claims 1-7.
16. A non-transitory computer readable storage medium, wherein instructions, when executed by a processor, enable the processor to perform the data processing method of any one of claims 1-7.
CN201811626334.4A 2018-12-28 2018-12-28 Data processing method, device and storage medium Active CN109710259B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811626334.4A CN109710259B (en) 2018-12-28 2018-12-28 Data processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811626334.4A CN109710259B (en) 2018-12-28 2018-12-28 Data processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN109710259A CN109710259A (en) 2019-05-03
CN109710259B true CN109710259B (en) 2022-03-18

Family

ID=66258171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811626334.4A Active CN109710259B (en) 2018-12-28 2018-12-28 Data processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN109710259B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471763B (en) * 2019-07-29 2023-07-25 平安科技(深圳)有限公司 Scheduling method, system, medium and electronic equipment based on shared object pool
CN111107425B (en) * 2019-11-25 2022-06-28 福州市暖色网络科技有限公司 Method, system, and storage medium for acquiring computing resources based on rendering component elements
CN112463279A (en) * 2020-12-10 2021-03-09 歌尔科技有限公司 Display element setting method, intelligent device and medium
CN113051015B (en) * 2021-03-30 2024-01-09 北京达佳互联信息技术有限公司 Page rendering method and device, electronic equipment and storage medium
CN113778571B (en) * 2021-09-13 2024-03-29 深圳市快易典教育科技有限公司 Object pool access method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105607900A (en) * 2015-11-26 2016-05-25 小米科技有限责任公司 Display object processing method and apparatus
CN106354512A (en) * 2016-09-08 2017-01-25 广州华多网络科技有限公司 User interface rendering method and device thereof
CN107315580A (en) * 2017-04-17 2017-11-03 阿里巴巴集团控股有限公司 Component processing method, device and the equipment of user interface, computer-readable recording medium
CN107577509A (en) * 2017-08-28 2018-01-12 深圳市金立通信设备有限公司 A kind of method, terminal and computer-readable recording medium for loading application interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105607900A (en) * 2015-11-26 2016-05-25 小米科技有限责任公司 Display object processing method and apparatus
CN106354512A (en) * 2016-09-08 2017-01-25 广州华多网络科技有限公司 User interface rendering method and device thereof
CN107315580A (en) * 2017-04-17 2017-11-03 阿里巴巴集团控股有限公司 Component processing method, device and the equipment of user interface, computer-readable recording medium
CN107577509A (en) * 2017-08-28 2018-01-12 深圳市金立通信设备有限公司 A kind of method, terminal and computer-readable recording medium for loading application interface

Also Published As

Publication number Publication date
CN109710259A (en) 2019-05-03

Similar Documents

Publication Publication Date Title
US10705780B2 (en) Method, device, and storage medium for displaying application page
CN109710259B (en) Data processing method, device and storage medium
CN107153541B (en) Browsing interaction processing method and device
US20170235435A1 (en) Electronic device and method of application data display therefor
CN111026396B (en) Page rendering method and device, electronic equipment and storage medium
US10909203B2 (en) Method and device for improving page display effect via execution, conversion and native layers
US10949490B2 (en) Method and apparatus for displaying webpage content
CN110990105B (en) Interface display method and device, electronic equipment and storage medium
US11210119B2 (en) Method and device for displaying interface, electronic equipment, server, and storage medium
CN109542417B (en) Method, device, terminal and storage medium for rendering webpage through DOM
CN106547547B (en) data acquisition method and device
CN110704053B (en) Style information processing method and device
JP2016524763A (en) Tag creation method, apparatus, terminal, program, and recording medium
CN110851108A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN111078325B (en) Application program running method and device, electronic equipment and storage medium
US11210449B2 (en) Page display method and device and storage medium
CN111008057A (en) Page display method and device and storage medium
CN105468606B (en) Webpage saving method and device
CN107402756B (en) Method, device and terminal for drawing page
CN111046265B (en) Card data display method, device, equipment and storage medium
CN111221613B (en) Program calling method and device and storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN112328330A (en) iOS component calling method, device, middleware, electronic equipment and medium
CN107368562B (en) Page display method and device and terminal
CN111104183B (en) Application program running method and device, electronic equipment and storage medium

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