CN117119227A - Page information acquisition method and device, computer equipment and storage medium - Google Patents

Page information acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117119227A
CN117119227A CN202310724339.5A CN202310724339A CN117119227A CN 117119227 A CN117119227 A CN 117119227A CN 202310724339 A CN202310724339 A CN 202310724339A CN 117119227 A CN117119227 A CN 117119227A
Authority
CN
China
Prior art keywords
service
request
target
information
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310724339.5A
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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202310724339.5A priority Critical patent/CN117119227A/en
Publication of CN117119227A publication Critical patent/CN117119227A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/454Content or additional data filtering, e.g. blocking advertisements

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a page information acquisition method. The method comprises the following steps: receiving a target page access request with associated information, wherein the target page access request comprises display scene indication information; searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information; generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request; acquiring associated service data from service servers corresponding to the service requests according to the service request execution plan; and carrying out aggregation processing based on the acquired associated service data to obtain page display information, wherein the page display information is used for displaying associated information associated with the target page in the target page. The application can reduce the consumption of service load.

Description

Page information acquisition method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of video technologies, and in particular, to a method and apparatus for acquiring page information, a computer device, and a storage medium.
Background
In the prior art, in order to enable multiple clients of different types (such as a TV end, an android APP end, and a Web end) to conveniently access to the same service server, interaction between a front-end client and a back-end server is implemented by constructing a corresponding BFF (Backend for Frontend, a back-end serving the front-end) layer. However, as services continue to expand, the number of backend servers increases accordingly, and traffic to a page (e.g., a video detail page) in a client that requests associated information may cause huge traffic load and resource consumption to the BFF layer itself and downstream service layers. As shown in fig. 1, in order to obtain the video detail page information, the BFF layer needs to diffuse all the video detail page request traffic sent by the client to each downstream Service, so that each Service needs to bear the Service load consumption caused by the video detail request traffic. However, the inventors have found that the downstream Service of many video details only covers part of the video, resulting in a waste of most of the Service load.
Disclosure of Invention
In view of the above, a method, an apparatus, a computer device and a computer readable storage medium for obtaining page information are provided to solve the problem of waste of most of service loads in the existing page information obtaining method.
The application provides a page information acquisition method, which comprises the following steps:
receiving a target page access request with associated information, wherein the target page access request comprises display scene indication information;
searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information;
generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request;
acquiring associated service data from service servers corresponding to the service requests according to the service request execution plan;
and carrying out aggregation processing on all the acquired associated service data to obtain page display information, wherein the page display information is used for displaying associated information associated with the target page in the target page.
Optionally, the finding out the target request view corresponding to the display scene indication information from the preset candidate request views according to the display scene indication information includes:
acquiring a preconfigured view enumeration, wherein the view enumeration defines at least one candidate request view corresponding to display scene indication information;
And determining a target request view corresponding to the display scene indication information according to the display scene indication information and the view enumeration.
Optionally, the generating the service request execution plan in the form of a directed graph according to the target request view and a preset service association index includes:
acquiring at least one target service request corresponding to the target request view;
filtering the at least one target service request according to the service association index to obtain a filtered target service request, wherein the filtered target service request is a service request with an association relation with an access object contained in the target page;
and generating the service request execution plan based on the dependency relationship between at least one target service end corresponding to the filtered target service request.
Optionally, the generating the service request execution plan based on the dependency relationship between at least one target service end corresponding to the filtered target service request and the filtered target service request includes:
acquiring a dependency graph between preconfigured service ends;
Determining the dependency relationship between at least one target service end corresponding to the filtered target service request according to the dependency relationship graph;
and generating the service request execution plan according to the dependency relationship and the filtered target service request.
Optionally, before the step of generating the service request execution plan in the form of a directed graph according to the target request view and the preset service association index, the method further includes:
acquiring service association information;
and creating the service association index according to the service association information, wherein the association relation between at least one object to be accessed and the service server is recorded in the service association index.
Optionally, the method further comprises:
acquiring a service change message;
performing data cleaning treatment on the service change message to obtain a cleaned service change message;
and updating the service association index according to the cleaned service change message.
Optionally, the aggregating all acquired associated service data to obtain page display information includes:
performing aggregation processing based on the acquired associated service data to obtain an aggregate data processing object;
And packaging the aggregate data processing object into the page display information.
The application also provides a page information acquisition device, which comprises:
the receiving module is used for receiving a target page access request with associated information, wherein the target page access request comprises display scene indication information;
the searching module is used for searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information;
the generation module is used for generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request;
the acquisition module is used for acquiring associated service data from the service server corresponding to each service request according to the service request execution plan;
the aggregation module is used for carrying out aggregation processing on all the acquired associated service data to obtain page display information, wherein the page display information is used for displaying associated information associated with the target page in the target page.
The application also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
The application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
According to the page information acquisition method, a target page access request with associated information is received, wherein the target page access request comprises display scene indication information; searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information; generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request; acquiring associated service data from service servers corresponding to the service requests according to the service request execution plan; and carrying out aggregation processing based on the acquired associated service data to obtain page display information, wherein the page display information is used for displaying the associated information with the target page in the target page. By the method, the application can know which services are specifically associated with the target page of the request in the BFF layer in advance, thereby greatly reducing the reading diffusion quantity of BFF and the load of Service and achieving access according to the need.
Drawings
FIG. 1 is a read-spread diagram of request traffic for acquiring video detail pages in the prior art;
FIG. 2 is a schematic diagram of an application environment architecture of a page information acquisition method according to the present application;
FIG. 3 is a flowchart of a method for obtaining page information according to an embodiment of the present application;
FIGS. 4a-4b are schematic diagrams of video detail pages in an embodiment of the application;
FIG. 5 is a detailed schematic diagram of steps for generating a directed graph-form service request execution plan according to the target request view and a preset service association index in an embodiment of the present application;
FIG. 6 is a schematic diagram of a business association index created in an embodiment of the present application;
FIG. 7 is a detailed schematic diagram of the step of updating the service association index according to an embodiment of the present application;
FIG. 8 is a detailed schematic diagram of a step of aggregating all acquired related service data to obtain page display information according to an embodiment of the present application;
FIG. 9 is a read-out schematic diagram of request traffic for acquiring video detail pages in the present application;
FIG. 10 is a graph showing the reduction ratio of the access traffic from a play page (app-view) compared with the access traffic without the method of the present application after the method of the present application is applied to the medal service side of the vermicelli;
FIG. 11 is a flow chart of data interaction of the present application;
FIG. 12 is a block diagram showing a page information acquiring apparatus according to an embodiment of the present application;
fig. 13 is a schematic hardware structure of a computer device for executing the page information acquiring method according to the embodiment of the present application.
Detailed Description
Advantages of the application are further illustrated in the following description, taken in conjunction with the accompanying drawings and detailed description.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order in which the steps are performed, but are merely used to facilitate description of the present application and to distinguish between each step, and thus should not be construed as limiting the present application.
The following is a term explanation of the present application:
an exemplary application environment for the present application is provided below. Fig. 2 schematically illustrates an application environment architecture of a page information acquisition method according to an embodiment of the present application.
In an exemplary embodiment, the architecture of the application environment may be divided into four layers, namely, a terminal layer, an access layer, a BFF layer, and a Service layer (Service layer).
The terminal layer is a client terminal directly interacted with a user, and comprises a mobile phone APP terminal, a Web terminal on a PC and other screen terminals, such as: clients on TV, car, stereo, PS, etc.
The access layer typically includes LB (Load Balance) and AGW (API-Gateway), where the AGW is primarily responsible for request routing, protocol conversion, protocol offloading, flow-limiting fusing, security sealing, etc.
The BFF layer is used for realizing interaction between the front-end client and the back-end server, and can ensure that the logic of various clients can be well isolated. The BFF layer may be divided into TV BFF, APP BFF and Web BFF according to terminal types. As the page logic becomes more complex and the traffic increases, the BFF logic of various types of pages is also split into separate applications to isolate the release and deployment, for example: the logic of APP BFF is split into APP-feed (first page), APP-view (detail page), dynamic, etc.
Business Service, which is an interface responsible for business domains or capabilities, is generally split according to functions and business domains, for example, may be split into manuscript Service, user Service, topic Service, note Service, manuscript Rong Yi Service, and the like.
In the related art, the main logic of the page with the associated information is concentrated in the BFF layer (App-View in the figure), and along with the growth of DAU (Daily Active User, the number of daily active users) and the continuous expansion of services, we are faced with the following problems:
The number of read diffusions (fanout reads) becomes larger as the traffic expands, bringing huge traffic load and complexity to the BFF itself as well as downstream traffic. As shown in fig. 1, in order to show the functional entry of the associated video, each Service needs to carry the traffic of all video detail requests and the resulting CPU resource consumption.
Problem two, as the number of fanout reads spreads increases, the latency of a single video detail request continues to deteriorate until it is unacceptable to the user.
In order to solve the above problems caused by acquiring page information of a target page having associated information, in this embodiment, by receiving a target page access request having associated information, the target page access request includes display scene indication information; searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information; generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request; acquiring associated service data from service servers corresponding to the service requests according to the service request execution plan; and carrying out aggregation processing based on the acquired associated service data to obtain page display information, wherein the page display information is used for displaying associated information associated with the target page in the target page. By the method, the BFF layer can know which services are specifically associated with the target page of the request in advance, so that the read diffusion quantity of BFF and the load of Service can be greatly reduced, and access according to needs is realized.
In the following, several embodiments will be provided under the above-described exemplary application environment architecture to illustrate the page information acquisition scheme in the present application. Fig. 3 is a flowchart of a page information obtaining method according to an embodiment of the application. The flow diagrams in the method embodiments are not intended to limit the order in which the steps are performed. As can be seen from the figure, the page information acquisition method provided in the present embodiment includes:
step S30, receiving a target page access request with associated information, wherein the target page access request comprises display scene indication information.
Specifically, the associated information includes attribute information and/or function entry information related to the access object to be displayed in the target page. The target page is exemplified by a video detail page of a video a, and the associated information may include attribute information of the video a, for example, the video a is a popular video, a high definition video, and the like. The related information may further include function entry information of the video a, such as a video honor, a shooting template, a video collection, a video gathering, a topic, and the like, which are shown in fig. 4 a. The user can jump to the relevant content page by clicking on the function entry.
It should be noted that, the video honor refers to the honor granted to the video, for example, the video is rated as a must-see video for X weeks.
In this embodiment, the target page is a page corresponding to a target access object, where the target access object may be a long video, a short video, a live video, dynamic or user information, and the like. Accordingly, the target page may be a page of a long video with associated information, a page of a short video with associated information, a page of a live video with associated information, a page of a dynamic page with associated information or a page of user information with associated information, etc. For convenience of description, in the following embodiment, the target page is described taking a detail page of the video shown in fig. 4b as an example.
The display scene indication information is used for determining which scene the user needs to acquire the target page currently. For example, the user triggers the target page access request through the Web terminal, and the request may carry display scene indication information for indicating the triggering of the Web terminal, and for example, the user triggers the target page access request through the TV terminal, and the request may carry display scene indication information for indicating the triggering of the TV terminal.
Step S31, searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information.
Specifically, a correspondence relationship between different display scene indication information and each candidate request view may be preconfigured, where each display scene indication information corresponds to one candidate request view. Thus, when the display scene indicating information is acquired, a candidate request view matching the display scene indicating information can be found out from the candidate request views as a target request view.
The request view is used for determining which service servers specifically need to send service requests to the downstream to acquire corresponding service data.
In an exemplary embodiment, in order to enable the BFF layers of different terminal types to acquire suitable request views, the finding, according to the display scene indication information, a target request view corresponding to the display scene indication information from preset candidate request views includes: acquiring a preconfigured view enumeration, wherein the view enumeration defines at least one candidate request view corresponding to display scene indication information; and determining a target request view corresponding to the display scene indication information according to the display scene indication information and the view enumeration.
Specifically, after receiving a target page access request triggered by a user, a view enumeration configured in advance by the user is acquired, so that a requested view corresponding to the display scene indication information can be found from the view enumeration.
In a specific scenario, the view enumeration is as follows:
enum ArchiveView{
no data return
UNSPECIFIED=0;
The following is the view definition of the most common scenario
Simple information of the manuscript/(for information inquiry)
SIMPLE=1;
Information about manuscript basis (applicable to front page, search list query)
BASIC=2;
The information of the manuscript basic and the information of the sub P (the details of the simplest version are used for sharing and the like)
BASIC_WITH_PAGES=3;
Video detail all information of APP end is/returned
ALL_APP=4;
All information of video details of WEB terminal is returned/returned
ALL_WEB=5;
TV-side video details all information is/are returned
ALL_TV=6;
The new scene can be continuously added
}。
In this embodiment, after the display scene indication information in the request is acquired, the requested view matching the display scene indication information may be queried from the view enumeration according to the display scene indication information. For example, if the display scene indication information is "all_app=4", the corresponding request view is "return APP-side video detail ALL information".
And step S32, generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining the execution logic of at least one service request.
Specifically, the business association index records the association relationship between each access object and each business server, for example, the business association index is a business association index of a video, and then the business association index records the association relationship between each video and each business server, wherein each business server can be a video basic data server, a video glowing data server, a manuscript service data server, a video note data server and the like.
The service request execution plan records which service requests are specifically required to be sent according to what logic sequence in a directed graph mode to acquire associated service data from a plurality of service servers. In this embodiment, the service request execution plan is composed of at least one execution plan. Each execution plan includes which service requests need to be sent, and the execution logic of the respective service requests. The multiple execution plans may be executed in parallel, and multiple service requests included in one execution plan need to be executed according to a dependency relationship.
The execution logic refers to the execution logic sequence of the service requests, that is, when the service requests need to be executed and whether other service requests need to be executed before the service requests are executed.
In this embodiment, the service request execution plan is used to enable the service data in the service server that is partially dependent on the service request to be acquired, for example: some video attributes rely on video author information in the video base information (obtained by accessing the video base information server).
It should be noted that, the above-mentioned related service data refers to service data having a related relationship with the target page.
In addition, by the service request execution plan, when any newly added service needs to acquire the service data corresponding to the newly added service, the corresponding service data can be acquired only through the following three settings.
1. Designating other nodes to which the dependency depends;
2. logic in the node is compiled, including access Service and business logic processing;
3. the node is configured in which scenarios it should be used.
In an exemplary embodiment, referring to fig. 5, the generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index includes:
step S50, at least one target service request corresponding to the target request view is acquired.
Specifically, the target request view is used for determining to which service servers the service request needs to be sent specifically, so as to obtain the associated service data from the corresponding service servers.
It should be noted that, at least one target service request corresponding to the target request view may be preconfigured, or may be generated according to the target request view after the target request view is determined.
Step S51, filtering the at least one target service request according to the service association index to obtain a filtered target service request, where the filtered target service request is a service request having an association relationship with an access object included in the target page.
Specifically, the target request view includes service requests to which service servers are specifically required to be sent, and the service association index records which service servers are specifically associated with each access object, so that after the service servers associated with the service where the access object exists and recorded in the service association index are obtained, service requests corresponding to the service servers associated with the service where the access object does not exist in the target service requests corresponding to the request view can be filtered, and the filtered service requests are obtained.
As an example, the target request view indicates that a service request needs to be sent to the service end a, the service end B, the service end C, and the service end D to obtain corresponding associated service data. The service association index records that the access object (for example, video a) has association relation with the service end a and the service end B only, so that the service requests sent to the service end C and the service end D are filtered, and only the service requests sent to the service end a and the service end B are reserved.
Step S52, generating the service request execution plan based on the dependency relationship between at least one target service end corresponding to the filtered target service request and the filtered target service request.
Specifically, after the filtered service requests are obtained, determining the execution sequence of each service request according to the dependency relationship between each target server, and then forming each target service request with the determined execution sequence into the service request execution plan.
In this embodiment, a manner of generating a service request execution plan is used to obtain multiple associated service data from multiple service servers, so that subsequent expansion of new services can be facilitated.
In an exemplary embodiment, the generating the service request execution plan based on the dependency relationship between at least one target service end corresponding to the filtered target service request and the filtered target service request includes: acquiring a dependency graph between preconfigured service ends; determining the dependency relationship between at least one target service end corresponding to the filtered target service request according to the dependency relationship graph; and generating the service request execution plan according to the dependency relationship and the filtered target service request.
Specifically, the user may pre-configure the dependency graph between all the service servers, so when the related service data is acquired from the target service server through the service request, it may be conveniently determined whether the target service server depends on other service servers according to the dependency graph, if the target service server depends on other service servers, when the related service data is acquired from the target service server, a corresponding service request must be sent first to acquire the service data from the service server on which the target service server depends, and then, according to the acquired service data, the service request is sent to the target service server again to acquire the related service data from the target service server.
As an example, assuming that one of the execution plans of the service request is to send the service request to the service server X to obtain the service related data, and the service server X depends on the service server Y, and the service server Y depends on the service server Z, the execution plan of the service request to send the service request to the service server X should be: firstly, a service request Z for acquiring first service data is sent to a service server Z, then, after the first service data is acquired, a service request Y for acquiring second service data is continuously sent to a service server Y according to the first service data, and finally, after the second service data is acquired, a service request X for acquiring related service data is sent to a service server X according to the second service data.
In an exemplary embodiment, for subsequent filtering processing of the service request according to the service association index, before the step of generating the service request execution plan in the form of a directed graph according to the target request view and the preset service association index, the method further includes: acquiring service association information; and creating the service association index according to the service association information, wherein the association relation between at least one object to be accessed and the service server is recorded in the service association index.
Specifically, when a downstream service associates an access object with the service, a service association information is generated. In this embodiment, in order to create the service association index, all service association information generated by the downstream service is acquired in a full-scale manner.
The service association information is used for representing that the access object has an association relationship with the service.
When obtaining all the service association information, clustering each service association message according to the access object to obtain all the service association information related to each access object, extracting the message of all the service association information of the access object to obtain service types, creating indexes of the access object according to the obtained services of all the types, and after completing the creation of the indexes of all the access objects, forming all the created indexes into the service association indexes.
It should be noted that, when creating the service association index, an index needs to be created for each object to be accessed and the service associated with the object to be accessed, and the indexes of all the objects to be accessed form the service association index.
In a specific embodiment, the object to be accessed takes video as an example, and a service association index as shown in fig. 6 may be created for all the videos to be accessed. In the figure, when a certain video is associated with a certain service, the video may be represented by "1", and when a certain video is not associated with a certain service, the video may be represented by "0".
In practical application, the video service association index does not necessarily store the association relationship between the video and the service in a sparse vector manner, and some existing kv systems may be used. For example, it may be implemented using a hash key of redis. It can be appreciated that when the association relationship between the service and the video changes, a mechanism is required for notifying the change to the service creating the service association index in a full-scale (initial stage) and incremental manner, so as to update the service association index.
In an exemplary embodiment, referring to fig. 7, the method further includes:
step S70, obtaining the service change message.
Specifically, in order to enable the service association index to be updated in time, in this embodiment, the service change message may be monitored, so that the service change message may be obtained in time when the service change message is generated downstream.
In another embodiment, when the service change message is generated downstream, a notification message may also be sent to notify the index management service, so that the index management service may timely acquire the service change message according to the notification message.
In this embodiment, when the service change message is acquired, the service change message may be acquired in an incremental manner, so as to avoid repeated acquisition of the acquired service change message.
The service change message is used for indicating that the association relationship between the access object and a certain service has been changed, and specifically, the association relationship between the access object and the service a is changed to have an association relationship with the service B.
Step S71, data cleaning processing is carried out on the service change message, and the cleaned service change message is obtained.
Specifically, a function of service registration may be called to perform data cleaning processing on the service change message, so as to clean the invalid service change message, thereby obtaining a cleaned service change message.
And step S72, updating the service association index according to the cleaned service change message.
Specifically, when the cleaned service change message is obtained, a function of service registration may be called to perform data extraction on the service change message, so as to extract from the service change message which service the access object has an association relationship with before the change, and which service the access object has an association relationship with after the change. And then, the business association index can be updated according to the extracted data.
Step S33, according to the service request execution plan, the associated service data are obtained from the service server corresponding to each service request.
Specifically, when the service request execution plan is obtained, each execution plan included in the service request execution plan is executed, so that corresponding associated service data can be obtained from a plurality of service servers.
Step S34, carrying out aggregation processing based on the acquired associated service data to obtain page display information, wherein the page display information is used for displaying associated information associated with the target page in the target page.
Specifically, after obtaining a plurality of associated service data, for front-end display, the plurality of service data needs to be assembled in an aggregation way, so as to obtain page display information for front-end display.
In an exemplary embodiment, when obtaining the page display information, in order to avoid some sensitive data in the page display, preset filtering logic may be used to filter the page display information.
In an exemplary embodiment, referring to fig. 8, the aggregating based on the acquired associated service data to obtain the page display information includes:
and step S80, performing aggregation processing based on the acquired associated service data to obtain an aggregated data processing object.
Specifically, since the method of the present application is applied to the case where a plurality of service data are obtained from the server, in order to be displayed at the front end, all the associated service data need to be aggregated into an aggregate data processing object (Aggregate Date Transfer Object, ADTO for short). ADTO is an object transmitted with the server layer.
Step S81, packaging the aggregate data processing object into the page display information.
Specifically, after the aggregate data processing object is obtained by aggregation, the aggregate data processing object needs to be continuously packaged into a VO object, that is, page display information for display.
It should be noted that, the ADTO object represents the data that the service layer needs to receive and the returned data, and the VO object represents the data that the front-end presentation layer needs to display.
In the embodiment, a target page access request with associated information is received, wherein the target page access request comprises display scene indication information; searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information; generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request; acquiring associated service data from service servers corresponding to the service requests according to the service request execution plan; and carrying out aggregation processing based on the acquired associated service data to obtain page display information, wherein the page display information is used for displaying associated information associated with the target page in the target page. By the method, the application can know which services are specifically associated with the target page of the request in the BFF layer in advance, thereby greatly reducing the reading diffusion quantity of BFF and the load of Service and achieving access according to the need.
In order to facilitate understanding of the technical scheme of the present application, the following description will take the application of the technical scheme of the present application to acquiring video detail pages as an example.
After receiving an access request for acquiring a video detail page of the video A, display scene indication information is extracted from the access request, and then a target request view matched with the display scene indication information is found from a plurality of candidate request views according to the display scene indication information. After determining the target request view, the service association index created in advance by the user is continuously acquired, and then a plurality of service requests contained in the target request view are filtered according to the service server index associated with the video A contained in the service association index, so that the service request corresponding to the service server which has no association relationship with the video A is filtered. And finally, sending a corresponding service request to a service server with an association relation with the video A so as to acquire all service data associated with the video A from the service server, and after acquiring all service data, aggregating all service data to obtain page data of a video detail page.
In a specific application, referring to fig. 9, when the method is applied to the video note Service end in the bilibilili application, the peak period of the access flow from the video detail page (app-view) of the play page reaches 100k QPS, and after the method is applied to the video note Service, the access flow request from the play page (app-view) is 1k QPS, and the QPS is reduced by 99%.
In another specific application, when the method is applied to the vermicelli medal service end in the bilibili application, referring to fig. 10, the access flow from the play page (app-view) can be reduced by about 85%.
It should be noted that, the vermicelli medal is a wearable iron-rod vermicelli honor that users obtain by watching the live broadcast of the anchor and participating in the interactive acquisition for a long time, and the obtained threshold is higher and only displayed under the content of the specific anchor.
In order to further understand the technical solution of the present application, the following describes the data interaction procedure of the present application with reference to fig. 11.
After receiving the target page access request, the BFF layer prepares for a request processing pre-processing for the target page access request, then requests to acquire an aggregate data processing object (ADTO) from a data aggregation gateway (Date Aggregate Gateway, DAGW), then encapsulates the aggregate data processing object into a VO object (page display information for displaying in a front-end page), and finally performs end-adaptation processing on the VO object so that the page display information can be displayed on different terminal devices.
After receiving a request subjected to BFF layer pre-preparation processing, the DAGW firstly searches a target request view corresponding to display scene indication information from preset candidate request views according to the display scene indication information in the request, and simultaneously acquires a business association index from an index service. Thereafter, the DAGW generates a service request execution plan in the form of a directed graph from the target request view and the service association index. The DAGW then executes the service request execution plan to obtain associated service data from the plurality of service servers. Furthermore, the DAGW performs global filtering logic on the acquired associated service data through a filter to filter out some sensitive data in the acquired associated service data, data in a blacklist, and the like. Finally, the DAGW aggregates the filtered data to obtain an aggregate data processing object, and returns the aggregate data processing object to the BFF layer.
Referring to fig. 12, a block diagram of a page information acquiring apparatus 110 according to an embodiment of the present application is shown.
In this embodiment, the page information acquiring means 110 comprises a series of computer program instructions stored on a memory, which when executed by a processor, can implement the page information acquiring function of the embodiments of the present application. In some embodiments, based on the specific operations implemented by the portions of the computer program instructions, the page information obtaining apparatus 110 may be divided into one or more modules, and the specific modules may be divided as follows:
a receiving module 111, configured to receive a target page access request with associated information, where the target page access request includes display scene indication information;
the searching module 112 is configured to search, according to the display scene indication information, a target request view corresponding to the display scene indication information from preset candidate request views;
the generating module 113 is configured to generate a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, where the service request execution plan is used to determine execution logic of at least one service request;
An obtaining module 114, configured to obtain associated service data from a service server corresponding to each service request according to the service request execution plan;
and the aggregation module 115 is configured to aggregate all the acquired associated service data to obtain page display information, where the page display information is used to display association information with the target page in the target page.
In an exemplary embodiment, the searching module 112 is further configured to obtain a preconfigured view enumeration, where the view enumeration defines at least one candidate request view corresponding to the display scene indication information; and determining a target request view corresponding to the display scene indication information according to the display scene indication information and the view enumeration.
In an exemplary embodiment, the generating module 113 is further configured to obtain at least one target service request included in the target request view; filtering the at least one target service request according to the service association index to obtain a filtered target service request; and generating the service request execution plan based on the dependency relationship between at least one target service end corresponding to the filtered target service request.
In an exemplary embodiment, the generating module 113 is further configured to obtain a dependency graph between preconfigured service ends; determining the dependency relationship between at least one target service end corresponding to the filtered target service request according to the dependency relationship graph; and generating the service request execution plan according to the dependency relationship and the filtered target service request.
In an exemplary embodiment, the page information obtaining apparatus 110 further includes a creation module.
The creation module is used for acquiring service association information; and creating the service association index according to the service association information, wherein the association relation between at least one object to be accessed and the service server is recorded in the service association index.
In an exemplary embodiment, the creating module is further configured to obtain a service change message; performing data cleaning treatment on the service change message to obtain a cleaned service change message; updating the service association index according to the cleaned service change message
In an exemplary embodiment, the aggregation module 115 is further configured to aggregate all acquired associated service data to obtain an aggregate data processing object; and packaging the aggregate data processing object into the page display information.
According to the page information acquisition scheme in the embodiment, a target page access request with associated information is received, wherein the target page access request comprises display scene indication information; searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information; generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request; acquiring associated service data from service servers corresponding to the service requests according to the service request execution plan; and carrying out aggregation processing on all the acquired associated service data to obtain page display information, wherein the page display information is used for displaying the associated information with the target page in the target page. By the method, the method and the system can know which services are specifically associated with the target page of the request in the layer in advance, so that the reading diffusion quantity and the load of the Service can be greatly reduced, and the access on demand is realized.
Fig. 13 schematically shows a hardware architecture diagram of a computer device 12 adapted to implement the page information acquisition method according to an embodiment of the present application. In the present embodiment, the computer device 12 is a device capable of automatically performing numerical calculation and/or information processing in accordance with instructions set or stored in advance. As shown in fig. 13, the computer device 12 includes at least, but is not limited to: memory 120, processor 121, and network interface 122 may be communicatively linked to each other by a system bus. Wherein:
Memory 120 includes at least one type of computer-readable storage medium that may be volatile or nonvolatile, and specifically, readable storage media include flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 120 may be an internal storage module of the computer device 12, such as a hard disk or memory of the computer device 12. In other embodiments, the memory 120 may also be an external storage device of the computer device 12, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 12. Of course, the memory 120 may also include both internal memory modules of the computer device 12 and external memory devices. In this embodiment, the memory 120 is typically used to store an operating system installed on the computer device 12 and various types of application software, such as program codes of a page information acquisition method. In addition, the memory 120 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 121 may be a central processing unit (Central Processing Unit, simply CPU), controller, microcontroller, microprocessor, or other page information acquisition chip in some embodiments. The processor 121 is typically used to control the overall operation of the computer device 12, such as performing control and processing related to data interaction or communication with the computer device 12, and the like. In this embodiment, the processor 121 is configured to execute program codes or process data stored in the memory 120.
The network interface 122 may include a wireless network interface or a wired network interface, the network interface 122 typically being used to establish a communication link between the computer device 12 and other computer devices. For example, the network interface 122 is used to connect the computer device 12 to an external terminal through a network, establish a data transmission channel and a communication link between the computer device 12 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, abbreviated as GSM), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated as WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc.
It should be noted that fig. 13 only shows a computer device having components 120-122, but it should be understood that not all of the illustrated components are required to be implemented, and that more or fewer components may be implemented instead.
In the present embodiment, the page information acquiring method stored in the memory 120 may be divided into one or more program modules and executed by one or more processors (the processor 121 in the present embodiment) to complete the present application.
The embodiment of the application provides a computer readable storage medium, and the computer readable storage medium stores a computer program thereon, and the computer program when executed by a processor realizes the steps of the page information acquisition method in the embodiment.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. that are provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer-readable storage medium is typically used to store an operating system installed on a computer device and various types of application software, such as program codes of the page information acquisition method in the embodiment, and the like. Furthermore, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over at least two network elements. Some or all modules in the system can be screened out according to actual needs to realize the purpose of the scheme of the embodiment of the application. Those of ordinary skill in the art will understand and implement the present application without undue burden.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Those skilled in the art will appreciate that all or part of the processes implementing the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and where the program may include processes implementing the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a random access memory (RandomAccessMemory, RAM), or the like.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A method for acquiring page information, the method comprising:
receiving a target page access request with associated information, wherein the target page access request comprises display scene indication information;
searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information;
generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request;
acquiring associated service data from service servers corresponding to the service requests according to the service request execution plan;
And carrying out aggregation processing based on the acquired associated service data to obtain page display information, wherein the page display information is used for displaying associated information associated with the target page in the target page.
2. The method according to claim 1, wherein the step of finding out a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information includes:
acquiring a preconfigured view enumeration, wherein the view enumeration defines at least one candidate request view corresponding to display scene indication information;
and determining a target request view corresponding to the display scene indication information according to the display scene indication information and the view enumeration.
3. The method for obtaining page information according to claim 1, wherein the generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index comprises:
acquiring at least one target service request corresponding to the target request view;
filtering the at least one target service request according to the service association index to obtain a filtered target service request, wherein the filtered target service request is a service request with an association relation with an access object contained in the target page;
And generating the service request execution plan based on the dependency relationship between at least one target service end corresponding to the filtered target service request.
4. The method for obtaining page information according to claim 3, wherein the generating the service request execution plan based on the dependency relationship between at least one target service server corresponding to the filtered target service request and the filtered target service request includes:
acquiring a dependency graph between preconfigured service ends;
determining the dependency relationship between at least one target service end corresponding to the filtered target service request according to the dependency relationship graph;
and generating the service request execution plan according to the dependency relationship and the filtered target service request.
5. The method according to any one of claims 1 to 4, wherein before the step of generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, the method further comprises:
acquiring service association information;
And creating the service association index according to the service association information, wherein the association relation between at least one object to be accessed and the service server is recorded in the service association index.
6. The page information acquisition method according to any one of claims 1 to 4, characterized in that the method further comprises:
acquiring a service change message;
performing data cleaning treatment on the service change message to obtain a cleaned service change message;
and updating the service association index according to the cleaned service change message.
7. The method for obtaining page information according to claim 1, wherein the aggregating all the obtained associated service data to obtain page display information includes:
performing aggregation processing based on the acquired associated service data to obtain an aggregate data processing object;
and packaging the aggregate data processing object into the page display information.
8. A page information acquisition device, characterized in that the page information acquisition device comprises:
the receiving module is used for receiving a target page access request with associated information, wherein the target page access request comprises display scene indication information;
The searching module is used for searching a target request view corresponding to the display scene indication information from preset candidate request views according to the display scene indication information;
the generation module is used for generating a service request execution plan in the form of a directed graph according to the target request view and a preset service association index, wherein the service request execution plan is used for determining execution logic of at least one service request;
the acquisition module is used for acquiring associated service data from the service server corresponding to each service request according to the service request execution plan;
the aggregation module is used for conducting aggregation processing based on the acquired associated service data to obtain page display information, and the page display information is used for displaying associated information associated with the target page in the target page.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1 to 7 when the computer program is executed.
10. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program implementing the steps of the method of any of claims 1 to 7 when executed by a processor.
CN202310724339.5A 2023-06-16 2023-06-16 Page information acquisition method and device, computer equipment and storage medium Pending CN117119227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310724339.5A CN117119227A (en) 2023-06-16 2023-06-16 Page information acquisition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310724339.5A CN117119227A (en) 2023-06-16 2023-06-16 Page information acquisition method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117119227A true CN117119227A (en) 2023-11-24

Family

ID=88811717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310724339.5A Pending CN117119227A (en) 2023-06-16 2023-06-16 Page information acquisition method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117119227A (en)

Similar Documents

Publication Publication Date Title
CN109542865B (en) Method, device, system and medium for synchronizing configuration files of distributed cluster system
CN106453572B (en) Method and system based on Cloud Server synchronous images
JP6168996B2 (en) Content control method, content control apparatus, and program
CN102184177A (en) Method and system for previewing file
CN107092686B (en) File management method and device based on cloud storage platform
CN104348859B (en) File synchronisation method, device, server, terminal and system
CN107291744A (en) It is determined that and with the method and device of the relationship between application program
CN106156037B (en) Data processing method, apparatus and system
WO2017174013A1 (en) Data storage management method and apparatus, and data storage system
CN110798635A (en) Method and device for matching subtitle files for video
CN113051460A (en) Elasticissearch-based data retrieval method and system, electronic device and storage medium
CN114238703A (en) Event flow arrangement method, device and application
CN112035402A (en) File storage method and device and terminal equipment
CN114745146B (en) Jump interception method, apparatus, readable storage medium and device
CN118075345A (en) Information pushing method, device, electronic equipment and computer storage medium
KR101659147B1 (en) Information processing apparatus, and control method therefor
CN105740251B (en) Method and system for integrating different content sources in bus mode
CN116594834A (en) Operation and maintenance data processing method and device for multi-protocol server
CN117119227A (en) Page information acquisition method and device, computer equipment and storage medium
CN107526530B (en) Data processing method and device
CN110569456B (en) WEB end data offline caching method and device and electronic equipment
CN109325154B (en) Application data acquisition method and electronic equipment
CN107332679B (en) Centerless information synchronization method and device
CN113298106A (en) Sample generation method and device, server and storage medium
CN104317805A (en) Popup picture library updating method, popup picture library updating device and popup picture library updating system

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