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

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

Info

Publication number
CN113468399A
CN113468399A CN202110814020.2A CN202110814020A CN113468399A CN 113468399 A CN113468399 A CN 113468399A CN 202110814020 A CN202110814020 A CN 202110814020A CN 113468399 A CN113468399 A CN 113468399A
Authority
CN
China
Prior art keywords
page
data
skeleton
client
target
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
CN202110814020.2A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110814020.2A priority Critical patent/CN113468399A/en
Publication of CN113468399A publication Critical patent/CN113468399A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/953Querying, e.g. by the use of web search engines
    • 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
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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 application discloses a data processing method, which comprises the following steps: determining skeleton page data of a target page based on a page access request sent by a client, wherein the page access request is used for accessing the target page, and the skeleton page data comprises search engine optimization SEO data of the target page; sending the skeleton page data to the client so that the client outputs a skeleton page; receiving a data acquisition request triggered by the client based on the skeleton page; and sending the page data of the target page to the client based on the data acquisition request, wherein the page data is used for the client to output the target page. The application also discloses another data processing method, and a device, equipment and a storage medium for realizing the data processing method.

Description

Data processing method and device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, and relates to but is not limited to a data processing method, a data processing device, data processing equipment and a data processing storage medium.
Background
With the rapid development of computer technology, the interaction between users and clients is also increased, and the demand of users for accessing pages is also increasing.
At present, the page rendering mode includes two modes, namely pure front-end rendering and pure server rendering, in the pure front-end rendering, after a front end captures a page access request of a user, a web page template is usually obtained from a server, then the server returns page data to the front end based on the web page template, and a client renders the page data, but the method does not support Search Engine Optimization (SEO). In pure server rendering, after capturing a page access request of a user, a front end generally acquires all data required by a page from the server, and then renders the page based on all data required by the page.
Disclosure of Invention
Embodiments of the present application provide a data processing method and apparatus, a device, and a storage medium to solve at least one problem in the related art, and the method and apparatus can support SEO and reduce the white screen time.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a data processing method, which is applied to a server, and the method includes:
determining skeleton page data of a target page based on a page access request sent by a client, wherein the page access request is used for accessing the target page, and the skeleton page data comprises search engine optimization SEO data of the target page;
sending the skeleton page data to the client so that the client outputs a skeleton page;
receiving a data acquisition request triggered by the client based on the skeleton page;
and sending the page data of the target page to the client based on the data acquisition request, wherein the page data is used for the client to output the target page.
In a second aspect, an embodiment of the present application provides a data processing method, applied to a client, including:
sending a page access request for accessing a target page to a server;
receiving skeleton page data which is sent by the server and responds to the page access request, and outputting the skeleton page based on the skeleton page data, wherein the skeleton page data comprises search engine optimization SEO data of the target page;
sending a data acquisition request triggered based on the skeleton page to the server;
receiving page data of the target page, which is sent by the server and responds to the data acquisition request;
outputting the target page based on the page data.
In a third aspect, an embodiment of the present application provides a data processing apparatus, which is applied to a server, and includes:
the device comprises a determining module, a first sending module and a first receiving module;
the determining module is used for determining skeleton page data of a target page based on a page access request sent by a client, wherein the page access request is used for accessing the target page, and the skeleton page data comprises search engine optimization SEO data of the target page;
the first sending module is used for sending the skeleton page data to the client so that the client can output a skeleton page;
the first receiving module is used for receiving a data acquisition request triggered by the client based on the skeleton page;
the first sending module is further configured to send, to the client, page data of the target page based on the data obtaining request, where the page data is used for the client to output the target page.
In a fourth aspect, an embodiment of the present application provides a data processing apparatus, which is applied to a client, and includes: the device comprises a second sending module, a second receiving module and an output module;
the second sending module is used for sending a page access request for accessing a target page to the server;
the second receiving module is configured to receive skeleton page data sent by the server and responding to the page access request, and output the skeleton page based on the skeleton page data, where the skeleton page data includes Search Engine Optimization (SEO) data of the target page;
the second sending module is further configured to send a data acquisition request triggered based on the skeleton page to the server;
the second receiving module is further configured to receive page data of the target page, which is sent by the server and responds to the data acquisition request;
the output module is used for outputting the target page based on the page data.
In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps in the data processing method provided by the client or the server when executing the computer program.
In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the data processing method provided by the client or the server.
In an embodiment of the present application, a data processing method, an apparatus, a device, and a storage medium are provided, including: determining skeleton page data of a target page based on a page access request sent by a client, wherein the page access request is used for accessing the target page, and the skeleton page data comprises search engine optimization SEO data of the target page; sending the skeleton page data to the client so that the client outputs a skeleton page; receiving a data acquisition request triggered by the client based on the skeleton page; sending page data of the target page to the client based on the data acquisition request, wherein the page data is used for the client to output the target page; the server firstly returns the skeleton page data comprising the SEO data to the client based on the page access request, the data volume of the skeleton page data is small, so that the client can display the skeleton page as soon as possible, long-time white screen is avoided, the skeleton page data comprises the SEO data, the SEO data in the target page can be grabbed by a search engine, SEO is achieved, and high-performance and high-experience page rendering is achieved.
Drawings
FIG. 1 is a schematic diagram of an alternative architecture of a data processing system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an alternative architecture of a data processing system according to an embodiment of the present application;
fig. 3 is an alternative schematic flow chart of a data processing method provided in an embodiment of the present application;
fig. 4A is a schematic diagram illustrating an optional effect of a skeleton page provided in an embodiment of the present application;
fig. 4B is a schematic diagram illustrating an optional effect of a blank page provided in the embodiment of the present application;
fig. 5 is a schematic diagram illustrating an optional effect of a target page provided in an embodiment of the present application;
fig. 6 is an alternative schematic flow chart of a data processing method provided in an embodiment of the present application;
fig. 7 is an alternative schematic flow chart of a data processing method provided in an embodiment of the present application;
fig. 8 is an alternative schematic flow chart of a data processing method provided in an embodiment of the present application;
fig. 9 is an alternative schematic flow chart of a data processing method provided in an embodiment of the present application;
fig. 10 is an alternative schematic flow chart of a data processing method provided in an embodiment of the present application;
fig. 11 is a schematic diagram of an alternative structure of a data processing apparatus according to an embodiment of the present application;
fig. 12 is a schematic diagram of an alternative structure of a data processing apparatus according to an embodiment of the present application;
fig. 13 is an optional structural schematic diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will describe the specific technical solutions of the present application in further detail with reference to the accompanying drawings in the embodiments of the present application. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
Embodiments of the present application may provide a data processing method and system, and a storage medium. In practical applications, the data processing method may be implemented by a data processing system, and each functional entity in the data processing system may be cooperatively implemented by hardware resources of an electronic device (such as a terminal device or a server), such as computing resources like a processor, and communication resources (such as for supporting communications in various manners like optical cables and cellular).
Some terms referred to in the embodiments of the present application are described.
1) The SEO is a way to improve the natural ranking of the current website in the related search engine by using the search rules of the search engine, i.e. the search engine such as hundredth, google, etc. provides keywords to search according to the business requirements.
2) White screen time, the time required from the user entering the web page address in the browser to the page being presented to the user.
3) The skeleton page is a page with a general frame style, and the page content realized by a small amount of codes of the page is used as the page; and the data volume of the skeleton page is less than that of the page corresponding to the skeleton page.
4) Remote Dictionary service (redis), a high performance distributed database.
The data processing method according to the embodiment of the present application may be applied to the data processing system 10 shown in fig. 1, and includes: a client 101 and a server 102, wherein, a program capable of displaying pages is run in the client 101, such as: a browser or an Application (APP). The server can provide services to the client 101, and in one example, the server is a site of a website. The client 101 and the server 102 communicate via a network 103.
The client 101 can implement the following steps: sending a page access request for accessing a target page to the server 102; receiving skeleton page data which is sent by the server 102 and responds to the page access request, and outputting a skeleton page based on the skeleton page data, wherein the skeleton page data comprises search engine optimization SEO data of the target page; sending a data acquisition request triggered based on the skeleton page to the server 102; receiving page data of the target page, which is sent by the server 102 and responds to the data acquisition request; outputting the target page based on the page data.
The server 102 can perform the following steps: determining skeleton page data of a target page based on a page access request sent by a client 101, wherein the page access request is used for accessing the target page, and the skeleton page data comprises search engine optimization SEO data of the target page; sending the skeleton page data to the client to enable the client 101 to output a skeleton page; receiving a data acquisition request triggered by the client 101 based on the skeleton page; and sending the page data of the target page to the client 101 based on the data acquisition request, wherein the page data is used for the client 101 to output the target page.
Based on the data processing system 10 described in fig. 1, as shown in fig. 2, the communication system 10 may further include a data storage end 104, and the data storage end 104 may include at least one of the following: a database and a service data terminal. The database is a cache area for storing data by the server side, and the service data side is a data production side for generating service data. And after the service data end generates service data, the service data can be stored in the database. And the time for the server to acquire the data from the database is shorter than the time for the server to acquire the data from the service data end.
In an embodiment of the present application, the client and the server may be any electronic device with information processing capability, and in an embodiment, the electronic device may be an intelligent terminal, for example, a mobile terminal with wireless communication capability, such as a notebook computer. In another embodiment, the electronic device may also be a computing-capable terminal device that is not mobile, such as a desktop computer, a server, etc.
In combination with the data processing system, the present embodiment provides a data processing method, which can reduce the white screen time while supporting the SEO.
Embodiments of a data processing method, an apparatus, a device, and a storage medium according to the embodiments of the present application are described below with reference to the data processing system shown in fig. 1 or fig. 2.
The embodiment of the application provides a data processing method. The functions implemented by the method can be implemented by calling program code by a processor in an electronic device, and the program code can be stored in a computer storage medium.
Fig. 3 is a schematic diagram of an implementation flow of a data processing method according to an embodiment of the present application, and is applied to a server, as shown in fig. 3, the method may include the following steps:
s301, the server side determines skeleton page data of the target page based on the page access request sent by the client side.
The page access request is used for accessing a target page, and the skeleton page data comprises SEO data of the target page.
The method comprises the steps that when the client receives an access operation of a user for accessing a target page, a page access request for accessing the target page is triggered, and the page access request is sent to a server. Here, the access operation of the user to access the target page may include: the method includes inputting a page address in an address bar of a browser, clicking a page link in the browser or an application program, and the like.
After receiving the page access request, the server acquires page information indicating a target page carried in the page access request, and determines skeleton page data of the target page based on the page information. Wherein the different page information indicates different pages. The page information may be a Uniform Resource Locator (URL) of the page, etc.
The skeleton page data is data required for displaying the skeleton page, and the display content of the skeleton page is the frame style of the target page. In an example, the skeletal page may be a page as shown in FIG. 4A, including only frame styles.
The skeleton page data comprises a static resource template of the target page and SEO data. The static resource template is used for displaying the frame style of the target page. The SEO data is used for SEO of the page, and the search engine can grab the SEO data in the skeleton page and retrieve the target page based on the grabbed SEO data. The SEO data includes keywords that can characterize the data content of the target page. In an example, the target page is a product detail page of a product a, and the SEO data of the target page includes: the trade name of the trade A. In one example, the target page is a reading page of novel a, and the SEO data of the target page includes: the name of novel a, the name of the author, the type of novel a, etc. The content of the target page and the SEO data of the target page are not limited in any way in the embodiment of the application.
In the embodiment of the application, the skeleton page data of the target page can be generated before the page access request is received, or can be generated after the page access request is received.
Under the condition that the skeleton page data of the target page is generated before the page access request is received, the server side can establish the incidence relation between the page index of the target page and the skeleton page data, and after the target page is determined, the skeleton page data can be obtained based on the page index of the target page.
Under the condition that the skeleton page data of the target page is generated after the page access request is received, the server side can obtain SEO data of the target page and generate skeleton page data based on the obtained SEO data.
S302, the server side sends the skeleton page data to the client side, so that the client side outputs a skeleton page.
After the server side determines the skeleton page data, the skeleton page data are sent to the client side, and after the client side receives the skeleton page data, the skeleton page data are rendered, so that the skeleton page is output. Here, the data amount of the skeleton page data is smaller than that of the target page if the page content required for display of the target page is not included in the skeleton page data, and therefore, the time from the time when the client receives the access operation to the time when the skeleton page is output is smaller than the time from the time when the client receives the access operation to the time when the client directly receives the full amount of data required for display of the target page. The time from the time when the client receives the access operation to the time when the client outputs the skeleton page is less than the eyeball feedback time of the user, that is, after the user receives the access operation, a blank page, namely a white screen, is displayed, but the display time of the white screen is less than the eyeball feedback time of the user, and before the eyeball feedback of the user, the skeleton page is already displayed, so that the user directly sees the skeleton page and does not see the blank page without any content.
In an example, a blank page may be as shown in FIG. 4B.
And S303, the server receives a data acquisition request triggered by the client based on the skeleton page.
After rendering the skeleton page, the client triggers the data acquisition request again to acquire page data of the target page, namely data required by target page display. The server receives the data acquisition request.
S304, based on the data acquisition request, the server side sends the page data of the target page to the client side.
The page data is used for the client to output the target page.
And after receiving the data acquisition request, the server acquires the page data, and returns the acquired page data to the client to respond to the data acquisition request. And after the client receives the page data of the target page, rendering the target page based on the page data, and outputting the target page after the rendering of the target page is completed.
The target page is a page that includes a page frame and page content. In one example, the target page is as shown in FIG. 5.
Here, the page data returned by the server to the client may include all the page data of the target page, and may also include part of the page data of the target page. And under the condition that the page data returned to the client by the server comprises part of the page data of the target page, the page data returned to the client by the server comprises the page data of the current display area of the target page. When the area required to be displayed on the target page changes, the client can send a data acquisition request to the server again to acquire page data required by the current display area, so that asynchronous display of the target page is realized. The area of the target page to be displayed can be changed based on the dragging operation of the user, and can also be automatically adjusted and changed based on the automatic page.
In an example, the page data returned by the server to the client may only include data of a partial area of the target page required to be displayed in the current interface of the client, so that the data of the whole page of the target page is not required to be completely returned to the client.
The data processing method of the server side provided by the embodiment of the invention comprises the steps of determining skeleton page data of a target page based on a page access request sent by a client side, wherein the page access request is used for accessing the target page, and the skeleton page data comprises search engine optimization SEO data of the target page; sending the skeleton page data to the client so that the client outputs a skeleton page; receiving a data acquisition request triggered by the client based on the skeleton page; sending page data of the target page to the client based on the data acquisition request, wherein the page data is used for the client to output the target page; the server firstly returns the skeleton page data comprising the SEO data to the client based on the page access request, the data volume of the skeleton page data is small, so that the client can display the skeleton page as soon as possible, long-time white screen is avoided, the skeleton page data comprises the SEO data, the SEO data in the target page can be grabbed by a search engine, SEO is achieved, and high-performance and high-experience page rendering is achieved.
In some embodiments, determining the skeleton page data of the target page in S301 includes:
s3011, obtaining a static resource template of the target page, and obtaining SEO data of the target page.
S3012, combining the static resource template and the SEO data to obtain the skeleton page data.
After receiving the page access request, the server side obtains a static resource template, namely a web page template, from the local disk, obtains SEO data, and replaces codes corresponding to the SEO data in the static resource template with the obtained SEO data to obtain skeleton page data. Wherein the static resource template is a hypertext Markup Language (HTML) code.
The server can acquire SEO data from any one of the following areas: the system comprises a local disk, a data cache region and a service data terminal.
In practical application, when the server side obtains the static resource template, other static resources such as javascript codes and Cascading Style Sheets (CSS) codes can be obtained, and at this time, the skeleton page data may include static resources such as javascript codes and CSS codes in addition to the static resource template.
In some embodiments, the obtaining of the SEO data of the target page in S3011 includes:
acquiring the SEO data from a data cache region;
and if the SEO data is not acquired from the data cache region, acquiring the SEO data from a service data end.
The server side can preferentially acquire the SEO data from the data cache region, and if the SEO data is not acquired from the data cache region and the SEO data of the current target page is not stored in the representation data cache region, the SEO data is acquired from the service data side. The time required for the server to acquire the SEO data from the data cache area is less than the time required for the server to acquire the SEO data from the service data end. In one example, the data cache area is a database. Wherein the database may be redis.
In the embodiment of the application, the server can acquire the SEO data from the data cache region, so that the time required for the server to acquire the skeleton page data is effectively reduced, and the response speed of the server to the page access request is improved.
In some embodiments, after obtaining the SEO data from the service data end, the service end further performs the following steps:
storing the SEO data to the data cache region; and the caching duration of the SEO data in the data caching area is set effective duration.
After the server acquires the SEO data from the service data terminal, the obtained SEO data can be stored in the data cache region while the SEO data and the static resource template are combined, so that the server can directly acquire the SEO data from the data cache region when acquiring the SEO data next time without acquiring the SEO data from the service data terminal again.
In the embodiment of the application, the storage of the SEO data in the data cache region can have timeliness, and when the cache duration of the SEO data in the data cache region exceeds the set effective duration, the SEO data is considered to be timeliness and deleted from the data cache region.
In some embodiments, the page data includes: the static resource, the dependent resource and the service data; before sending the page data of the target page to the client, the method further includes:
acquiring the static resource; the static resource comprises a static resource template;
pulling the dependent resource based on the static resource template;
and calling a service data interface based on the static resource template so as to obtain the service data through the service data interface.
The static resources comprise resources such as HTML codes, javascript codes, CSS codes, pictures and the like. After the server side obtains the static resources, dependent resources can be pulled according to the javascript and CSS addresses, an ajax request in the javascript is executed at the same time, and a complete service data interface is called, so that service data needed in the page data can be obtained through the service data interface. Here, the service data of other sites that need to be presented for the target page depending on the resource, for example: the target page is a page 1, the page 1 is a page of a site 1, when the page 1 is displayed, the picture or video content in the site 2 needs to be displayed, and at this time, the picture or video content is pulled from the site 2 and is added into the page data of the page 1 as a dependent resource. Here, different sites may be distinguished based on different domain names.
In practical application, the page data of the target page can be acquired through a plurality of data acquisition requests, so that asynchronous acquisition of the page data is realized, and the transmission performance of a data interface is compatible under the condition of completely displaying the target page.
The embodiment of the application provides a data processing method. The functions implemented by the method can be implemented by calling program code by a processor in an electronic device, and the program code can be stored in a computer storage medium.
Fig. 6 is a schematic flow chart of an implementation of a data processing method according to an embodiment of the present application, which is applied to a client, and as shown in fig. 6, the method may include the following steps:
s601, the client sends a page access request for accessing the target page to the server.
The method comprises the steps that when the client receives an access operation of a user for accessing a target page, a page access request for accessing the target page is triggered, and the page access request is sent to a server. Here, the access operation of the user to access the target page may include: the method includes inputting a page address in an address bar of a browser, clicking a page link in the browser or an application program, and the like.
And after receiving the page access request, the server acquires the skeleton page data and sends the acquired skeleton page data to the client to respond to the page access request.
The skeleton page data comprises a static resource template of the target page and SEO data. The static resource template is used for displaying the frame style of the target page. The SEO data is used for SEO of the page, and the search engine can grab the SEO data in the skeleton page and retrieve the target page based on the grabbed SEO data. The SEO data includes keywords that can characterize the data content of the target page. In an example, the target page is a product detail page of a product a, and the SEO data of the target page includes: the trade name of the trade A. In one example, the target page is a reading page of novel a, and the SEO data of the target page includes: the name of novel a, the name of the author, the type of novel a, etc. The content of the target page and the SEO data of the target page are not limited in any way in the embodiment of the application.
S602, the client receives the skeleton page data which is sent by the server and responds to the page access request, and outputs a skeleton page based on the skeleton page data.
The skeleton page data comprises search engine optimization SEO data of the target page.
And after receiving the skeleton page data, the client renders the skeleton page data, thereby outputting the skeleton page. The display content of the skeleton page is the frame style of the target page. In an example, the skeletal page may be a page as shown in FIG. 4A, including only frame styles.
Here, the data amount of the skeleton page data is smaller than that of the target page if the page content required for display of the target page is not included in the skeleton page data, and therefore, the time from the time when the client receives the access operation to the time when the skeleton page is output is smaller than the time from the time when the client receives the access operation to the time when the client directly receives the full amount of data required for display of the target page. The time from the time when the client receives the access operation to the time when the client outputs the skeleton page is less than the eyeball feedback time of the user, that is, after the user receives the access operation, a blank page, namely a white screen, is displayed, but the display time of the white screen is less than the eyeball feedback time of the user, and before the eyeball feedback of the user, the skeleton page is already displayed, so that the user directly sees the skeleton page and does not see the blank page without any content.
And S603, the client sends a data acquisition request triggered based on the skeleton page to the server.
After rendering the skeleton page, the client triggers the data acquisition request again to acquire page data of the target page, namely data required by target page display. The server receives the data acquisition request, pulls data required by target page display, and sends the pulled target data to the client.
S604, the client receives the page data of the target page, which is sent by the server and responds to the data acquisition request.
And S605, outputting the target page by the client based on the page data.
And rendering the received page data by the client and outputting a target page. The client can render all the page areas of the target page, and can also render only the display area which needs to be displayed currently, so that only the display area of the target page is output.
According to the data processing method provided by the embodiment of the application, a client sends a page access request for accessing a target page to a server; the client receives skeleton page data which is sent by the server and responds to the page access request, and outputs a skeleton page based on the skeleton page data, wherein the skeleton page data comprises SEO data of the target page; the client sends a data acquisition request triggered based on the skeleton page to the server; the client receives page data of the target page, which is sent by the server and responds to the data acquisition request; the client outputs the target page based on the page data, the client receives the skeleton page of the SEO data returned by the server based on the page access request, the data volume of the skeleton page is small, all data required by the target page are acquired based on the data acquisition request, the skeleton page can be displayed by the client as soon as possible, long-time white screen is avoided, the SEO data in the target page can be captured by a search engine due to the SEO data in the skeleton page, SEO is achieved, and high-performance and high-experience page rendering is achieved.
In some embodiments, S605 outputs the target page based on the page data, including:
and S6051, rendering the target page based on the page data.
S6052, replacing the output skeleton page with the target page after the target page is rendered.
The embodiment of the application provides a data processing method. The functions implemented by the method can be implemented by calling program code by a processor in an electronic device, and the program code can be stored in a computer storage medium.
Fig. 7 is a schematic implementation flowchart of a data processing method according to an embodiment of the present application, and is applied to a data processing system including a client and a server, as shown in fig. 7, the method may include the following steps:
s701, the client sends a page access request for accessing the target page to the server.
S702, the server side determines skeleton page data of the target page based on the page access request sent by the client side.
The page access request is used for accessing a target page, and the skeleton page data comprises SEO data of the target page.
And S703, the server side sends the skeleton page data to the client side.
S704, the client receives the skeleton page data which is sent by the server and responds to the page access request, and outputs the skeleton page based on the skeleton page data.
S705, the client sends a data acquisition request triggered based on the skeleton page to the server.
S706, the server receives a data acquisition request triggered by the client based on the skeleton page.
And S707, the server sends the page data of the target page to the client based on the data acquisition request.
The page data is used for the client to output the target page.
S708, the client receives the page data of the target page, which is sent by the server and responds to the data acquisition request.
And S709, the client outputs the target page based on the page data.
Here, the descriptions of S703, S704, S706, and S707 may refer to the implementation of the data processing method shown in fig. 3, and the descriptions of S701, S702, S705, and S707 may refer to the implementation of the data processing method shown in fig. 6, and are not repeated here.
According to the data processing method provided by the embodiment of the application, the server side firstly returns the skeleton page data including the SEO data to the client side based on the page access request, the data volume of the skeleton page data is small, the client side can display the skeleton page as soon as possible, long-time white screen is avoided, the skeleton page includes the SEO data, the SEO data in the target page can be captured by a search engine, the SEO is achieved, and high-performance and high-experience page rendering is achieved.
Next, a data processing method provided in the embodiment of the present application is further described.
In the related art, the page rendering mode includes the following two modes:
pure front-end rendering, wherein when a user accesses a webpage through a browser, the server only returns a webpage template without any data, then the webpage template requests javascript static resources, then the request is sent to the server again, and the acquired data is put into the webpage for rendering.
As shown in fig. 8, includes:
s801, the client sends a page access request to the server.
S802, the client receives the webpage template returned by the server.
And S803, the client renders the page structure based on the webpage template and displays the page structure.
S804, the client side obtains the full amount of page data from the server side.
S805, the client renders the complete page based on the full amount of page data, and outputs the complete page.
And pure server rendering, wherein when a user accesses a webpage through a browser, the server pulls data required by the webpage in advance, then the data and a webpage template are assembled and returned together, and the browser renders the assembled data and the assembled webpage template.
As shown in fig. 9, includes:
s901, the client sends a page access request to the server.
And S902, displaying a blank page by the client.
S903, the client receives the full amount of page data.
And S904, rendering the complete page by the client based on the full amount of page data, and outputting the complete page.
In the related art, the pure front-end rendering cannot support SEO, and cannot allow a search engine to record data of a page, such as hundreds of degrees, google, and the like, so that page retrieval cannot be performed through page data such as a commodity name. The pure server rendering can support SEO, but is affected by the performance of a page data interface, and a user can have a white screen for a certain time when accessing a page, namely the page has no response, and the experience is poor.
In order to solve the technical problems of pure front-end rendering and pure server-end rendering, embodiments of the present application provide a rendering scheme that can support service data SEO and solve a long white screen time. As shown in fig. 10, includes:
s1001, the client sends a data acquisition request to the server.
The client side initiates a first request to the server side based on the browser, and the server side starts to enter the SEO information rendering process of the server side.
S1002, the server side obtains SEO data from the redis cache.
And if the server does not acquire the SEO data from the redis cache, the step S1003 is carried out, and if the server acquires the SEO data from the redis cache, the step S1004 is carried out.
S1003, the server side pulls SEO data from the service system.
And the server calls the SEO data interface to pull the SEO data from the service system, and writes the pulled SEO data into the JIMDB cache.
S1004, the server side combines the static resources on the disk and the obtained SEO data to obtain a skeleton page, and sends the skeleton map to the client side.
And the server side merges the static resources on the disk and the obtained SEO data, and forms a skeleton page at the server side by using javascript. The server returns the skeleton page to the client.
Here, the static resources on the server's disk include the page rendering needs: HTML codes are resources such as static resource templates, javascript codes, CSS style codes, pictures and the like. Merging here refers to replacing the SEO data with the key variable of the static resource. The HTML code is a page template.
S1005, rendering the skeleton page by the client.
And rendering the skeleton page by the client browser. At the moment, the white screen time is passed, the user has been fed back by the server side, and the skeleton map can be seen.
S1006, the client requests page content data from the server.
The client sends a request to the server again to request the content data.
S1007, the server pulls the page content data and sends the pulled page content data to the client.
And the server side pulls the dependent resources according to the javascript and CSS addresses in the page template, executes the ajax request in the javascript, and calls a complete service data interface to pull page content data, such as complete merchant detailed page data. And after the page content data is pulled, the page content data and the page template are delivered to a browser together for rendering.
S1008, the client determines whether rendering of the page is completed?
When the page rendering is completed, S1009 is performed, otherwise, S1006 is performed.
S1009, the client replaces the skeleton graph with a rendered page.
And when the page rendering is finished, replacing the skeleton graph with the complete page. By this point the entire page rendering is complete. In the rendering stage of the client, the user can see the skeleton diagram of the webpage in the browser, so that the whole switching is smooth, and the experience is high.
In the embodiment of the application, in the process of rendering the page by the client, the HTML/JS/CSS and the SEO data returned by the server are received for the first time, and the cache is added, so that the speed of obtaining the SEO data is increased.
Fig. 11 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, which is applied to a server, and as shown in fig. 11, the data processing apparatus 1100 includes: a determining module 1101, a first transmitting module 1102 and a first receiving module 1103;
a determining module 1101, configured to determine skeleton page data of a target page based on a page access request sent by a client, where the page access request is used to access the target page, and the skeleton page data includes search engine optimization SEO data of the target page;
a first sending module 1102, configured to send the skeleton page data to the client, so that the client outputs a skeleton page;
a first receiving module 1103, configured to receive a data acquisition request triggered by the client based on the skeleton page;
the first sending module 1102 is further configured to send, to the client, page data of the target page based on the data obtaining request, where the page data is used for the client to output the target page
In some embodiments, the determining module 1101 is further configured to:
acquiring a static resource template of the target page, and acquiring SEO data of the target page;
and combining the static resource template and the SEO data to obtain the skeleton page data.
In some embodiments, the determining module 1101 is further configured to:
acquiring the SEO data from a data cache region;
and if the SEO data is not acquired from the data cache region, acquiring the SEO data from a service data end.
In some embodiments, the apparatus 1100 further comprises: the storage module is used for storing the SEO data to the data cache region after the SEO data is acquired from a service data end; and the caching duration of the SEO data in the data caching area is set effective duration.
In some embodiments, the apparatus 1100 further comprises: an acquisition module to:
acquiring static resources in the page data; the static resource comprises a static resource template;
pulling a dependent resource in the page data based on the static resource template;
and calling a service data interface based on the static resource template so as to obtain service data in the page data through the service data interface.
Fig. 12 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, which is applied to a client, and as shown in fig. 12, the data processing apparatus 1200 includes: a second sending module 1201, a second receiving module 1202 and an output module 1203;
a second sending module 1201, configured to send a page access request for accessing a target page to a server;
a second receiving module 1202, configured to receive skeleton page data sent by the server and responding to the page access request, and output the skeleton page based on the skeleton page data, where the skeleton page data includes search engine optimization SEO data of the target page;
a second sending module 1201, configured to send a data obtaining request triggered based on the skeleton page to the server;
a second receiving module 1202, further configured to receive page data of the target page sent by the server and responding to the data obtaining request;
an output module 1203, configured to output the target page based on the page data
In some embodiments, the output module 1203 is further configured to:
rendering the target page based on the page data;
and replacing the output skeleton page with the target page after the target page is rendered.
It should be noted that each logic unit included in the data processing apparatus (applied to the client or the server) provided in the embodiment of the present application may be implemented by a processor in the electronic device; of course, the implementation can also be realized through a specific logic circuit; in the implementation process, the Processor may be a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
The above description of the system embodiment is similar to the above description of the method embodiment, with similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the system of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the data processing method is implemented in the form of a software functional module and sold or used as a standalone product, the data processing method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the related art may be embodied in the form of a software product stored in a storage medium, and including several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and when the processor runs the computer program, the steps in the data processing method of the client are implemented, or the steps in the data processing method of the server are implemented.
Correspondingly, the present application provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the data processing method provided by the client in the above embodiments, or implements the data processing method provided by the server in the above embodiments.
Here, it should be noted that: the above description of the storage medium embodiment is similar to the description of the method embodiment described above, with similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the storage medium of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that fig. 13 is a schematic hardware entity diagram of an electronic device (client or server) according to an embodiment of the present application, and as shown in fig. 13, the electronic device 1300 includes: a processor 1301, at least one communication bus 1302, at least one external communication interface 1304, and memory 1305. Wherein the communication bus 1302 is configured to enable connective communication between these components. In an example, the electronic device 1300 further includes: a user interface 1303, wherein the user interface 1303 may comprise a display screen, and the external communication interface 1304 may comprise a standard wired interface and a wireless interface.
The Memory 1305 is configured to store instructions and applications executable by the processor 1301, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the processor 1301 and modules in the electronic device, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in some embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the related art may be embodied in the form of a software product stored in a storage medium, and including several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A data processing method is applied to a server side, and is characterized in that the method comprises the following steps:
determining skeleton page data of a target page based on a page access request sent by a client, wherein the page access request is used for accessing the target page, and the skeleton page data comprises search engine optimization SEO data of the target page;
sending the skeleton page data to the client so that the client outputs a skeleton page;
receiving a data acquisition request triggered by the client based on the skeleton page;
and sending the page data of the target page to the client based on the data acquisition request, wherein the page data is used for the client to output the target page.
2. The method of claim 1, wherein the determining skeletal page data for the target page comprises:
acquiring a static resource template of the target page, and acquiring SEO data of the target page;
and combining the static resource template and the SEO data to obtain the skeleton page data.
3. The method of claim 2, wherein the obtaining SEO data of the target page comprises:
acquiring the SEO data from a data cache region;
and if the SEO data is not acquired from the data cache region, acquiring the SEO data from a service data end.
4. The method of claim 3, wherein after obtaining the SEO data from a service data end, the method further comprises:
storing the SEO data to the data cache region; and the caching duration of the SEO data in the data caching area is set effective duration.
5. The method of claim 1, wherein the page data comprises: the static resource, the dependent resource and the service data; before sending the page data of the target page to the client, the method further includes:
acquiring the static resource; the static resource comprises a static resource template;
pulling the dependent resource based on the static resource template;
and calling a service data interface based on the static resource template so as to obtain the service data through the service data interface.
6. A data processing method is applied to a client, and is characterized by comprising the following steps:
sending a page access request for accessing a target page to a server;
receiving skeleton page data which is sent by the server and responds to the page access request, and outputting a skeleton page based on the skeleton page data, wherein the skeleton page data comprises search engine optimization SEO data of the target page;
sending a data acquisition request triggered based on the skeleton page to the server;
receiving page data of the target page, which is sent by the server and responds to the data acquisition request;
outputting the target page based on the page data.
7. The method of claim 6, wherein outputting the target page based on the page data comprises:
rendering the target page based on the page data;
and replacing the output skeleton page with the target page after the target page is rendered.
8. A data processing apparatus, characterized in that the apparatus comprises: the device comprises a determining module, a first sending module and a first receiving module;
the determining module is used for determining skeleton page data of a target page based on a page access request sent by a client, wherein the page access request is used for accessing the target page, and the skeleton page data comprises search engine optimization SEO data of the target page;
the first sending module is used for sending the skeleton page data to the client so that the client can output a skeleton page;
the first receiving module is used for receiving a data acquisition request triggered by the client based on the skeleton page;
the first sending module is further configured to send, to the client, page data of the target page based on the data obtaining request, where the page data is used for the client to output the target page.
9. A data processing apparatus, characterized in that the apparatus comprises: the device comprises a second sending module, a second receiving module and an output module;
the second sending module is used for sending a page access request for accessing a target page to the server;
the second receiving module is configured to receive skeleton page data sent by the server and responding to the page access request, and output the skeleton page based on the skeleton page data, where the skeleton page data includes Search Engine Optimization (SEO) data of the target page;
the second sending module is further configured to send a data acquisition request triggered based on the skeleton page to the server;
the second receiving module is further configured to receive page data of the target page, which is sent by the server and responds to the data acquisition request;
the output module is used for outputting the target page based on the page data.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the data processing method of any one of claims 1 to 5 or implements the steps of the data processing method of any one of claims 6 to 7 when executing the computer program.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the data processing method of any one of claims 1 to 5, or carries out the data processing method of any one of claims 6 to 7.
CN202110814020.2A 2021-07-19 2021-07-19 Data processing method and device, equipment and storage medium Pending CN113468399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110814020.2A CN113468399A (en) 2021-07-19 2021-07-19 Data processing method and device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110814020.2A CN113468399A (en) 2021-07-19 2021-07-19 Data processing method and device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113468399A true CN113468399A (en) 2021-10-01

Family

ID=77881162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110814020.2A Pending CN113468399A (en) 2021-07-19 2021-07-19 Data processing method and device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113468399A (en)

Similar Documents

Publication Publication Date Title
US11907642B2 (en) Enhanced links in curation and collaboration applications
CN106991154B (en) Webpage rendering method and device, terminal and server
CN107622135B (en) Method and apparatus for displaying information
EP3518124A1 (en) Webpage rendering method and related device
JP2011018314A (en) Method, system and computer program for sharing web page
US20110173569A1 (en) Preview Functionality for Increased Browsing Speed
US20100218077A1 (en) Modifying a markup language document which includes a clickable image
US20140344707A1 (en) Information Distribution Method and Device
JP6971292B2 (en) Methods, devices, servers, computer-readable storage media and computer programs for aligning paragraphs and images
CN111143725A (en) Page generation method and device and electronic equipment
WO2014206072A1 (en) Web page previewing method and system
JP2021103506A (en) Method and device for generating information
CN110968314B (en) Page generation method and device
US20170075865A1 (en) Intelligent rendering of webpages
US11687715B2 (en) Summary generation method and apparatus
WO2024011899A1 (en) Widget loading method and apparatus, device, and storage medium
CN108255898B (en) Page display method and device
CN113254819B (en) Page rendering method, system, equipment and storage medium
CN113468399A (en) Data processing method and device, equipment and storage medium
CN114065068A (en) Page access control method and device, equipment and storage medium
JP7113000B2 (en) Method and apparatus for generating images
CN107220306B (en) Searching method and device
CN113542335A (en) Information sharing method and device, electronic equipment and storage medium
KR101498920B1 (en) Web page pre-caching system and method for offline-executing
CN113448649B (en) Redis-based home page data loading server and method

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