CN114115875A - Page data processing method and device and electronic equipment - Google Patents

Page data processing method and device and electronic equipment Download PDF

Info

Publication number
CN114115875A
CN114115875A CN202111388503.7A CN202111388503A CN114115875A CN 114115875 A CN114115875 A CN 114115875A CN 202111388503 A CN202111388503 A CN 202111388503A CN 114115875 A CN114115875 A CN 114115875A
Authority
CN
China
Prior art keywords
page
component
data
sub
main
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.)
Pending
Application number
CN202111388503.7A
Other languages
Chinese (zh)
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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Beijing Guangqiyuan Digital 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 Guangqiyuan Digital Technology Co ltd filed Critical Beijing Guangqiyuan Digital Technology Co ltd
Priority to CN202111388503.7A priority Critical patent/CN114115875A/en
Publication of CN114115875A publication Critical patent/CN114115875A/en
Pending legal-status Critical Current

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The embodiment of the specification discloses a page data processing method and device and electronic equipment. The method is applied to a Web page, wherein the Web page comprises a main page and a sub-page embedded into the main page, the sub-page is used for loading a rendering program, the main page and the sub-page can realize data communication through a Web interface, and the method receives data of a page to be processed; determining whether the page data to be processed is first component data generated based on the main page; if the component data is the first component data, calling the Web interface to send default component data generated based on the first component data to the sub-page, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface; and displaying the component on the main page based on the component information.

Description

Page data processing method and device and electronic equipment
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for processing page data, and an electronic device.
Background
Currently, the Unity rendering program is more and more widely applied, for example, being able to be applied in Web pages to render 3D content.
Generally, a rendering program needs to implement a rendering function and needs to load a plurality of environment data on a page, and the loading of the plurality of environment data on the page occupies a large amount of memory resources.
In the prior art, if an error occurs in a rendering program, the whole page is crashed, and the normal use of other functions of the page is affected.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method and an apparatus for processing page data, and an electronic device, so as to complete a rendering process through a sub-page and avoid a main page crash caused by an error in a rendering program.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
a processing method of page data is applied to a Web page, wherein the Web page comprises a main page and a sub-page embedded in the main page, the sub-page is used for loading a rendering program, and the main page and the sub-page can realize data communication through a Web interface, and the method comprises the following steps:
receiving page data to be processed;
determining whether the page data to be processed is first component data generated based on the main page;
if the component data is the first component data, calling the Web interface to send default component data generated based on the first component data to the sub-page, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface;
and displaying the component on the main page based on the component information.
In some embodiments, the method further comprises:
determining whether the page data to be processed is second component data generated based on the sub-page;
and if the second component data is the second component data, calling the Web interface to send the second component data to the main page, so that the main page displays 3D rendering data based on the second component data.
In some embodiments, the method further comprises:
when a release instruction for releasing a memory space of a sub-page is received, determining a memory address of the memory space corresponding to the memory of the sub-page;
and releasing the data corresponding to the memory address.
In some embodiments, the release instruction specifically includes: instructions to close the rendering program, instructions to refresh subpages, and/or instructions to free memory space of the rendering program.
In some embodiments, the sub-page is provided with a listening function, the method further comprising:
when the monitoring function monitors a keyboard operation event, an operation instruction corresponding to the keyboard operation event is sent;
and executing the operation instruction.
In some embodiments, the rendering program is a Unity rendering program.
In some embodiments, the Web interface is a postMessage interface.
Another aspect of the embodiments of the present invention provides a device for processing page data, which is applied to a Web page, where the Web page includes a main page and a sub-page embedded in the main page, the sub-page is used to load a rendering program, and the main page and the sub-page can implement data communication through a Web interface, and the device includes:
the receiving module is used for receiving the page data to be processed;
the determining module is used for determining whether the page data to be processed is first component data generated based on the main page;
the processing module is used for calling the Web interface to send default component data generated based on the first component data to the sub-page if the first component data is the first component data, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface;
and the display module is used for displaying the component on the main page based on the component information.
Another aspect of the present invention further provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
receiving data of a to-be-processed page of a Web page; the Web page comprises a main page and a sub-page embedded into the main page, wherein the sub-page is used for loading a rendering program, and the main page and the sub-page can realize data communication through a Web interface;
determining whether the page data to be processed is first component data generated based on the main page;
if the component data is the first component data, calling the Web interface to send default component data generated based on the first component data to the sub-page, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface;
and displaying the component on the main page based on the component information.
The embodiment of the invention can realize the beneficial effects at least comprising:
in the embodiment of the invention, because the sub-page is embedded in the main page of the Web page, when the main page needs to render the first component data, the rendering operation can be completed through the rendering program arranged in the sub-page, the transmission of the rendering data is realized through the Web interface, and the display of the main page can not be influenced when the rendering program is crashed.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a schematic flowchart of a method for processing page data according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a Web page in the embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a page data processing apparatus according to an embodiment of the present disclosure.
Fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification.
Detailed Description
The embodiment of the invention mainly relates to a related scene of a Unity rendering program used by a Web page. The Unity rendering program is an application component for developing 3D content such as games and animations, and can render 3D content on a Web page.
Because the Unity rendering program needs to load a plurality of environment files in the page, a large amount of memory resources need to be occupied, and if the memory resources need to be released after the environment files are loaded in the page, the operation can be realized only by closing the page or refreshing the page. If the release is not executed all the time, when the memory overflows, the page is crashed. Moreover, because the Untiy renderer has high coupling with the page, a crash caused by a bug of the Unity renderer may cause a crash of the entire page.
In view of this, the embodiment of the present invention provides a method for processing page data.
Fig. 1 is a schematic flowchart of a method for processing page data according to an embodiment of the present invention.
The embodiment of the invention discloses a page data processing method which is applied to a Web page, wherein the Web page comprises a main page and a sub-page embedded into the main page, the sub-page is used for loading a rendering program, and the main page and the sub-page can realize data communication through a Web interface.
Fig. 2 is a schematic structural diagram of a Web page in the embodiment of the present invention. As shown in fig. 2, in the embodiment of the present invention, a main page 21 and a sub page 22 are set in a Web page 20, and the sub page may be embedded in the main page. When the main page is displayed, the sub-pages can display the content of the Unity rendering program, the main page and the sub-pages can realize data communication, and data transmission can be realized through a Web interface. The Web interface is a postMessage interface and can realize cross-resource communication. Of course, the sub-page 22 may be modified in size and position according to the 3D display area, and is not limited in detail.
In the embodiment of the invention, the sub-page is embedded into the main page, which is equivalent to become a part of the main page, but the allocation of the slave memory resources is independent.
In the embodiment of the invention, the method comprises the following steps:
s100: receiving page data to be processed;
s200, determining whether the page data to be processed is first component data generated based on the main page;
s300, if the first component data is the first component data, calling the Web interface to send default component data generated based on the first component data to the sub-page, and enabling the sub-page to generate a component according to the default component data and send component information of the component to the main page through the Web interface;
s400, displaying the components on the main page based on the component information.
In the embodiment of the invention, based on the set page architecture of the Web page, when the main page needs to process the page data, the page data can be processed based on the page architecture. And if the page data is the component data, performing 3D rendering processing on the component data in the sub-page, and only displaying the main page.
When the page data to be processed is received, whether the page data to be processed is first component data generated based on a main page is judged.
The first component data is data needing to call a resource for 3D rendering.
For example, when a 3D component needs to be added, a rendering operation is performed by a 3D rendering program to obtain the component.
In the embodiment of the invention, when the page data to be processed is common data, corresponding processing is directly executed.
Determining whether the page data to be processed is the first component data generated based on the main page specifically includes:
determining whether the page data to be processed is initiated by a main page, and if the page data to be processed is initiated by the main page, judging the data type of the page data to be processed;
and if the data type of the page data to be processed is the 3D component data to be rendered, determining that the page data to be processed is the first component data.
In the embodiment of the invention, when the operation of adding the component is executed in the main page, data communication can be carried out with the sub page.
In step 300, the Web interface is invoked to send default component data corresponding to the first component data to the sub-page. Due to the fact that the Unity rendering program is configured in the sub-page, the Unity rendering program can generate a new component based on default component data, add unique id and position information and return the new component to the main page through the sub-page.
The rendering process of the Unity rendering program is not changed, only the main page displays the components displayed by the Unity rendering program through the sub-pages, and the components are directly displayed on the main page in visual effect.
In step 400, the main page exposes the components based on the parameters.
It can be seen that when the operation of adding components is performed, the main page does not need to set a Unity rendering program, but the sub-page performs the rendering process, and when the main page needs to change data, the rendering process can be performed based on the Unity rendering program set by the sub-page. The Unity rendering program can be decoupled from the main page, when the memory needs to be released, only the memory space corresponding to the sub-page needs to be released, the main page does not need to be closed or the main page does not need to be refreshed, even if the Unity rendering program of the sub-page fails, the main page does not crash, and the content displayed on the main page is not affected.
In the embodiment of the invention, the component is in the unity rendering program, the unity rendering program is visible in the sub-page, and the sub-page is visible in the main page, so that the component can be displayed in the main page.
In the embodiment of the present invention, the functions of the sub-page may be understood as:
1. and the data bridge receives the main page data and sends the main page data to the unity rendering program, and receives the unity data and sends the unity data to the main page.
2. And loading and displaying a unity rendering program, providing independent memory allocation, and achieving the effect of approximately closing the browser tab when the homepage is unloaded.
For example, in a Web page that needs to display a 3D geographic scene, the main page may display 3D data exposed by the unit rendering program through the sub-page. When the labeling component is added to the 3D geographic scene, the labeling component rendered by the unit rendering program can be displayed through the sub-page. And the main page can upload the component information corresponding to the labeled component to the server.
For another example, in a 3D game, a list of 3D effect interfaces needs to be added to a property column in a main page, and when the main page generates data to be processed, id, address information, etc. of the interface can be obtained by rendering through a Unity rendering program in a sub-page, and then the id, address information, etc. are sent to a server for storage, and the 3D effect interface is displayed through the sub-page. Because the Unity rendering program is not directly arranged in the main page, even if the rendering times are too many and the memory is about to overflow, the memory of the sub-page can be released in time, and the crash is avoided. And when the Unity rendering program per se crashes, the game experience of the user in the main page is not influenced because only the sub-page is influenced, but the sub-page does not influence the display and the basic operation in the main page.
In the embodiment of the present invention, the first component data may be any data related to rendering a 3D effect component, for example, a game item in a 3D game, a status bar, a function menu in a diagram, and the like, and the data that needs to call a rendering program may be referred to as the first component data.
In the embodiment of the present invention, the specific process of embedding the sub-page into the main page may include:
the address of the sub-page is sent to the configuration item of the iframe. The iframe frame is used for embedding other pages into the current page. The association relationship may be established by the configuration items described above. When the configuration item is run after the address of the sub-page is input to the configuration item, the sub-page can be embedded into the main page. Wherein, the child page normally loads the Untiy rendering program.
When the version of the Unity rendering program needs to be reinstalled or switched, for example, the engineering package is modified or reinstalled, only the iframe node corresponding to the original sub-page needs to be deleted. In the embodiment of the present invention, deleting the iframe node is equivalent to directly closing a window of the browser, so that the browser can release the memory corresponding to the window, that is, the memory space corresponding to the sub-page in the embodiment of the present invention.
It can be understood that, in the embodiment of the present invention, the main page itself does not include a component, and is only used as a display interface display component, and the component is a component of a unity rendering program, and can complete data interaction with the main page by using the sub-page as a bridge, and upload the data to the server through the main page for storage.
In the embodiment of the invention, because the sub-page is embedded in the main page of the Web page, when the main page needs to render the first component data, the rendering operation can be completed through the rendering program arranged in the sub-page, the transmission of the rendering data is realized through the Web interface, and the display of the main page can not be influenced when the rendering program is crashed.
Based on the embodiment, when the data of the sub-page changes, the data of the sub-page can be transmitted to the main page and provided for the main page to use.
Based on the foregoing embodiment, the method further comprises:
determining whether the page data to be processed is second component data generated based on the sub-page;
and if the second component data is the second component data, calling the Web interface to send the second component data to the main page, so that the main page displays 3D rendering data based on the second component data.
In the embodiment of the invention, if the page data to be processed is the second component data, that is, when the sub-page needs to send the data to the main page, the second component data can also be sent to the main page through the Web interface. The second component data is, for example, rendered 3D data.
When the sub-page is determined to generate second component data, the second component data is sent to the main page through the Web interface, wherein the second component data can be component information of a component, and the component information can include id and address information.
The main page is capable of presenting 3D rendering data based on the second component data.
In the embodiment of the present invention, the second component data generated based on the sub-page data can also be presented in the main page. The main page can show the 3D rendering data displayed by the Untiy rendering program through the sub-page.
Based on the foregoing embodiment, the method further comprises:
when a release instruction for releasing a memory space of a sub-page is received, determining a memory address of the memory space corresponding to the memory of the sub-page;
and releasing the data corresponding to the memory address.
In some embodiments, the release instruction specifically includes: instructions to close the rendering program, instructions to refresh subpages, and/or instructions to free memory space of the rendering program.
In the embodiment of the invention, when the content needs to be released, only the memory resource corresponding to the sub-page can be released.
The release command may be sent after active operation or after passive generation. The sending after the active operation may be sent by a user through a refresh operation or a program through a scheduled task, and the sending after the passive generation may be a release instruction automatically generated when system resources reach a certain threshold. Or, the browser where the Web page is located automatically releases the release instruction to the memory.
The release instruction may specifically include an instruction to close the rendering program, an instruction to refresh a sub-page, and/or an instruction to release a memory space of the rendering program. And when the release instruction is received, only releasing the memory address space corresponding to the sub-page.
In the embodiment of the invention, when the memory needs to be released, the refreshing operation can be carried out on the whole page, and only the memory space of the sub-page is released, so that the normal operation of the main page can be ensured.
In the embodiment of the invention, when the memory is released, the iframe is unloaded, so that the release of the memory space of the page corresponding to the sub-page is realized without influencing the normal use of the main page.
On the basis of the foregoing embodiments, in the embodiments of the present invention, when the focus is on a sub-page, some events cannot be recognized. Based on this, in the embodiment of the present invention, a monitoring function is further provided.
Based on the foregoing embodiment, the sub-page is provided with a snoop function, and the method further includes:
when the monitoring function monitors a keyboard operation event, an operation instruction corresponding to the keyboard operation event is sent;
and executing the operation instruction.
In the embodiment of the invention, the monitoring function of the main page is bound to the sub-page. So that operations on the sub-page can also trigger corresponding events.
The event may be a keyboard operation event. When the focus of the Web page is on the sub-page, if the keyboard operation event is monitored, the corresponding event can be correspondingly triggered. A keyboard operation event such as a shortcut operation, etc.
In the embodiment of the invention, the event monitoring event is bound, so that the keyboard operation event can be monitored normally when the focus is on the sub page or the main page. Of course, the snoop events that can be implemented by other snoop functions should also be regarded as equivalent embodiments, and are not described herein.
In the embodiment of the invention, the original function can be still realized after the framework of the Web page is changed. The stability of the Unity rendering program is enhanced.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method. Fig. 3 is a schematic structural diagram of a page data processing apparatus corresponding to fig. 1 according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus is applied to a Web page, where the Web page includes a main page and a sub-page embedded in the main page, the sub-page is used to load a rendering program, and the main page and the sub-page can implement data communication through a Web interface, and the apparatus includes:
a receiving module 31, configured to receive page data to be processed;
a determining module 32, configured to determine whether the page data to be processed is first component data generated based on the main page;
the processing module 33 is configured to, if the first component data is the first component data, call the Web interface to send default component data generated based on the first component data to the sub-page, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface;
a display module 34, configured to display the component on the main page based on the component information.
It will be appreciated that the modules described above refer to computer programs or program segments for performing a certain function or functions. In addition, the distinction between the above-described modules does not mean that the actual program code must also be separated.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method.
Fig. 4 is a schematic structural diagram of an electronic device corresponding to fig. 1 provided in an embodiment of the present disclosure. As shown in fig. 4, the electronic device 500 may include:
at least one processor 510; and the number of the first and second groups,
a memory 530 communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory 530 stores instructions 520 executable by the at least one processor 510 to enable the at least one processor 510 to:
receiving data of a to-be-processed page of a Web page; the Web page comprises a main page and a sub-page embedded into the main page, wherein the sub-page is used for loading a rendering program, and the main page and the sub-page can realize data communication through a Web interface;
determining whether the page data to be processed is first component data generated based on the main page;
if the component data is the first component data, calling the Web interface to send default component data generated based on the first component data to the sub-page, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface;
displaying the component on the main page based on the component information
While particular embodiments of the present specification have been described above, in some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in this specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other.
The apparatus, the electronic device and the method provided in the embodiments of the present description are corresponding, and therefore, the apparatus and the electronic device also have similar beneficial technical effects to the corresponding method, and since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus and device are not described again here.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital character system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate a dedicated integrated circuit chip. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information which can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
It should also be noted that 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.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (9)

1. A method for processing page data is applied to a Web page, wherein the Web page comprises a main page and a sub-page embedded in the main page, the sub-page is used for loading a rendering program, and the main page and the sub-page can realize data communication through a Web interface, and the method comprises the following steps:
receiving page data to be processed;
determining whether the page data to be processed is first component data generated based on the main page;
if the component data is the first component data, calling the Web interface to send default component data generated based on the first component data to the sub-page, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface;
and displaying the component on the main page based on the component information.
2. The method of claim 1, further comprising:
determining whether the page data to be processed is second component data generated based on the sub-page;
and if the second component data is the second component data, calling the Web interface to send the second component data to the main page, so that the main page displays 3D rendering data based on the second component data.
3. The method of claim 1, further comprising:
when a release instruction for releasing a memory space of a sub-page is received, determining a memory address of the memory space corresponding to the memory of the sub-page;
and releasing the data corresponding to the memory address.
4. The method according to claim 3, wherein the release instruction specifically comprises: instructions to close the rendering program, instructions to refresh subpages, and/or instructions to free memory space of the rendering program.
5. The method of claim 1, wherein the sub-page is provided with a snoop function, the method further comprising:
when the monitoring function monitors a keyboard operation event, an operation instruction corresponding to the keyboard operation event is sent;
and executing the operation instruction.
6. The method of any of claims 1 to 5, wherein the rendering program is a Unity rendering program.
7. The method according to any one of claims 1 to 5, wherein the Web interface is a postMessage interface.
8. An apparatus for processing page data, applied to a Web page, wherein the Web page includes a main page and a sub-page embedded in the main page, the sub-page is used for loading a rendering program, and the main page and the sub-page can implement data communication through a Web interface, the apparatus comprising:
the receiving module is used for receiving the page data to be processed;
the determining module is used for determining whether the page data to be processed is first component data generated based on the main page;
the processing module is used for calling the Web interface to send default component data generated based on the first component data to the sub-page if the first component data is the first component data, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface;
and the display module is used for displaying the component on the main page based on the component information.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
receiving data of a to-be-processed page of a Web page; the Web page comprises a main page and a sub-page embedded into the main page, wherein the sub-page is used for loading a rendering program, and the main page and the sub-page can realize data communication through a Web interface;
determining whether the page data to be processed is first component data generated based on the main page;
if the component data is the first component data, calling the Web interface to send default component data generated based on the first component data to the sub-page, so that the sub-page generates a component according to the default component data and sends component information of the component to the main page through the Web interface;
and displaying the component on the main page based on the component information.
CN202111388503.7A 2021-11-22 2021-11-22 Page data processing method and device and electronic equipment Pending CN114115875A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111388503.7A CN114115875A (en) 2021-11-22 2021-11-22 Page data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111388503.7A CN114115875A (en) 2021-11-22 2021-11-22 Page data processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114115875A true CN114115875A (en) 2022-03-01

Family

ID=80439607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111388503.7A Pending CN114115875A (en) 2021-11-22 2021-11-22 Page data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114115875A (en)

Similar Documents

Publication Publication Date Title
CN108345535B (en) mock testing method, device and equipment
CN109144615B (en) Information publishing method, device, equipment and storage medium
CN107045438B (en) Application top view processing method, device and component
CN108924029B (en) Method and device for sending customer service data
WO2019174394A1 (en) Image loading method and apparatus
CN111639289A (en) Webpage loading method and device
CN107786630B (en) Web application package processing method, device and equipment
CN110496395B (en) Component operation method, system and equipment for illusion engine
CN111796821A (en) Page updating method and device
CN112559934A (en) Page popup display method and device
CN111273965B (en) Container application starting method, system and device and electronic equipment
CN112631679A (en) Preloading method and device for micro-application
CN110262749B (en) Webpage operation method, device, container, equipment and medium
CN106970872B (en) Information point burying method and device
CN111538667A (en) Page testing method and device
CN111797387A (en) Method and device for intercepting plug-in
CN111190692A (en) Monitoring method and system based on Roc processor and readable medium
CN114115875A (en) Page data processing method and device and electronic equipment
CN112597408B (en) System fusion method, device, equipment and storage medium
CN110968373A (en) Page switching implementation method and device, storage medium and processor
CN112000329A (en) Data display method, device, equipment and medium
CN112306710A (en) Service processing system, interface calling method and device
CN111931111A (en) Webpage development method, webpage display method, device and equipment
CN111984247A (en) Service processing method and device and electronic equipment
CN113779466B (en) Page display method and device, storage medium and electronic equipment

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
TA01 Transfer of patent application right

Effective date of registration: 20220713

Address after: 100190 Beijing Haidian District Zhichun Road 49 No. 3 West 309

Applicant after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 100102 Room 203, 14 and 19, floor 2, building 19, Wangjing Dongyuan seventh district, Chaoyang District, Beijing

Applicant before: Beijing Guangqiyuan Digital Technology Co.,Ltd.

TA01 Transfer of patent application right