CN-121996328-A - Data processing method and electronic equipment
Abstract
The embodiment of the application provides a data processing method and electronic equipment, which can improve the display efficiency of the electronic equipment on a screen interface. The data processing method comprises the steps of receiving an interface drawing command of a first application aiming at an application interface, and responding to the interface drawing command, sending rendering node data of the application interface to a rendering server in the electronic equipment, wherein the rendering node data comprises a first shared memory address of a target object, and the rendering server is used for acquiring the target object from the first shared memory address.
Inventors
- HUANG BANGBANG
- TIAN SHAOWEN
Assignees
- 荣耀终端股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241101
Claims (13)
- 1. A data processing method, applied to an electronic device, the method comprising: receiving an interface drawing command of a first application aiming at an application interface; And responding to the interface drawing command, and sending rendering node data of the application interface to a rendering server in the electronic equipment, wherein the rendering node data comprises a first shared memory address of a target object, and the rendering server is used for acquiring the target object from the first shared memory address.
- 2. The method of claim 1, wherein transmitting rendering node data of the application interface to a rendering server comprises: storing rendering node data of the application interface to a shared memory to obtain a second shared memory address; and sending the second shared memory address to the rendering server, wherein the rendering server is used for acquiring rendering node data of the application interface from the second shared memory address.
- 3. The method of claim 2, wherein transmitting rendering node data of the application interface to a rendering server comprises: Storing the data to be synchronized of the application interface into a shared memory to obtain a third shared memory address, wherein the data to be synchronized of the application interface is determined based on rendering node data of the application interface; and sending the third shared memory address to the rendering server, wherein the rendering server is used for acquiring the data to be synchronized of the application interface from the third shared memory address.
- 4. The method according to any one of claims 1 to 3, wherein the interface drawing instruction includes interface data of the application interface, the interface data including a first shared memory address of the target object; The method further comprises the steps of: And constructing rendering node data of the application interface based on the interface data of the application interface, wherein a drawing instruction of a rendering node in the rendering node data comprises a first shared memory address of the target object.
- 5. The method according to any one of claims 1 to 4, wherein the steps of receiving an interface drawing instruction of a first application for an application interface and sending rendering node data of the application interface to a rendering server in the electronic device are triggered to be performed by a first process of the first application, the rendering server being located in a second process, the first process and the second process being different processes.
- 6. The method according to any one of claims 1 to 5, further comprising: receiving a processing request of a first application aiming at the target object; Storing the target object obtained through processing to a shared memory to obtain a first shared memory address of the target object; And sending the first shared memory address of the target object to the first application.
- 7. The method of claim 6, wherein the steps of receiving a processing request from a first application for the target object, storing the processed target object in a shared memory, sending a first shared memory address of the target object to the first application are triggered by a first process of the first application to execute a first thread, receiving an interface drawing instruction from the first application for an application interface, and sending drawing data from the application interface to a rendering server are triggered by the first process of the first application to execute a second thread, the first thread and the second thread being different threads.
- 8. The method of claim 6, wherein the target object comprises a picture.
- 9. The method according to any one of claims 1 to 8, wherein pointer data of a drawing object is not included in the rendering node data.
- 10. The method according to any one of claims 1 to 9, wherein the rendering server is configured to construct rendering node data of a screen interface based on rendering node data of respective application interfaces included in the screen interface, wherein the screen interface includes an application interface of the first application.
- 11. An electronic device, comprising: A processor, a memory, wherein one or more computer programs are stored in the memory, the one or more computer programs comprising instructions, which when executed by the processor, cause the electronic device to perform the method of any of claims 1-10.
- 12. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to perform the method of any of claims 1 to 10.
- 13. A computer program product, characterized in that the computer program product comprises a computer program which, when run on a computer, causes the computer to perform the method of any one of claims 1 to 10.
Description
Data processing method and electronic equipment Technical Field The present application relates to the field of interface display technologies, and in particular, to a data processing method and an electronic device. Background The interface is a graphical interface with which a user interacts in an operating system or application of an electronic device (e.g., a cell phone). The complete picture displayed on the screen of the electronic device may be referred to as a screen interface. At present, when the electronic device displays a screen interface, the problem of low display efficiency may exist, and user experience is affected. Disclosure of Invention The application provides a data processing method and electronic equipment, which can improve the screen interface display efficiency of the electronic equipment. In a first aspect, an embodiment of the application provides a data processing method applied to electronic equipment, the method comprises the steps of receiving an interface drawing command of a first application aiming at an application interface, and responding to the interface drawing command, sending rendering node data of the application interface to a rendering server in the electronic equipment, wherein the rendering node data comprises a first shared memory address of a target object, and the rendering server is used for acquiring the target object from the first shared memory address. The rendering node data of the application interface may include, for example, a rendering node tree. The rendering node tree includes a plurality of rendering nodes, each rendering node characterizing a visual element in the application interface. The rendering nodes in the rendering node tree have a hierarchical relationship, and correspond to the relationship between visual elements in the application interface. The first application may be any application to which the screen interface relates. In the method, the first shared memory address of the target object is included in the rendering node data synchronized with the rendering server, and is not used for indicating the pointer of the heap memory address, so that the rendering server can obtain the target object through the first shared memory address of the target object, the problem that rendering nodes cannot draw and render due to the fact that the pointer cannot be identified is avoided, and the data of the target object does not need to be transmitted to the rendering server, the efficiency of receiving the rendering node data by the rendering server is improved, and the display efficiency of a screen interface is further improved. In one possible implementation, the method includes the steps of sending rendering node data of an application interface to a rendering server, wherein the method includes the steps of storing the rendering node data of the application interface to a shared memory to obtain a second shared memory address, and sending the second shared memory address to the rendering server for the rendering server to obtain the rendering node data of the application interface from the second shared memory address. By storing the rendering node data of the application interface into the shared memory and sending the second shared memory address of the rendering node data to the rendering server, the amount of data transmitted across the process can be reduced, the efficiency of the rendering server for obtaining the rendering node data of the application interface is improved, and the display efficiency of the screen interface is further improved. In a possible implementation manner, the method for transmitting the rendering node data of the application interface to the rendering server comprises the steps of storing the data to be synchronized of the application interface to a shared memory to obtain a third shared memory address, wherein the data to be synchronized of the application interface is determined based on the rendering node data of the application interface, and transmitting the third shared memory address to the rendering server for the rendering server to acquire the data to be synchronized of the application interface from the third shared memory address. By storing the data to be synchronized of the application interface into the shared memory and sending the third shared memory address of the data to be synchronized to the rendering server, the amount of data transmitted across the process can be reduced, the efficiency of the rendering server to obtain the rendering node data of the application interface is improved, and the display efficiency of the screen interface is further improved. In one possible implementation, the interface drawing instruction comprises interface data of an application interface, wherein the interface data comprises a first shared memory address of a target object, and the method further comprises the steps of constructing rendering node data of the application interface based on the inte