CN112437148A - Service request processing method and device, service server and system - Google Patents

Service request processing method and device, service server and system Download PDF

Info

Publication number
CN112437148A
CN112437148A CN202011307241.2A CN202011307241A CN112437148A CN 112437148 A CN112437148 A CN 112437148A CN 202011307241 A CN202011307241 A CN 202011307241A CN 112437148 A CN112437148 A CN 112437148A
Authority
CN
China
Prior art keywords
target
data
service
server
target 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.)
Granted
Application number
CN202011307241.2A
Other languages
Chinese (zh)
Other versions
CN112437148B (en
Inventor
张骏杰
宋忠良
李阳幸子
舒新胜
于宗潍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202011307241.2A priority Critical patent/CN112437148B/en
Publication of CN112437148A publication Critical patent/CN112437148A/en
Application granted granted Critical
Publication of CN112437148B publication Critical patent/CN112437148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS

Abstract

The embodiment of the invention provides a method, a device, a service server and a system for processing a service request, wherein the method comprises the following steps: receiving a service request sent by a client; if the service request does not need to be subjected to degradation processing, generating a target page according to the target page block data and returning the target page to the client; if the service request needs to be subjected to degradation processing, determining target paging block data from block data of a target page stored in a degraded data storage server; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by the reporting service server determined in advance from each service server; and generating a target paging according to the target paging block data and returning the target paging to the client. The embodiment of the invention can send more service data to the client in the service degradation processing process.

Description

Service request processing method and device, service server and system
Technical Field
The present invention relates to the technical field of service processing, and in particular, to a method, an apparatus, a service server, and a system for processing a service request.
Background
With the development of network technology, many business service systems have appeared, such as: business service systems such as a power grid service system and a video service system. As shown in fig. 1, a client 100 implements a business service by interacting with a business service system 200.
Specifically, the service system 200 receives a service request sent by the client 100, performs normal service processing according to a corresponding service flow based on the service request, and returns a processing result to the client 100. When the business service system 200 is under a high load or has a business processing failure, in order to ensure that the core services (e.g., ordering, paying) can operate normally, a service degradation process is usually performed on some non-core services (e.g., a user searches some cold videos in the video APP).
In the prior art, the service degradation processing method is as follows: after receiving the service request sent by the client 100, normal service processing is no longer performed according to the corresponding service flow, and since there is usually more data in one page and complete data cannot be displayed in the screen of the terminal, the data of the page may be displayed in pages, and the first page data in the page data corresponding to the service request stored in advance in the normal service processing process may be returned to the client 100 as the current service processing result. In this case, the user cannot refresh the second page data and the data thereafter.
Therefore, in the prior art, in the service degradation processing process, less data is returned to the client, so that the data displayed to the user by the client is less, and the user experience is poor.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, a business server and a system for processing a business request, so as to send more business data to a client in the process of service degradation processing. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for processing a service request, which is applied to any service server in a service system, where the service server is in communication connection with a service data providing server and a degraded data storage server; the method comprises the following steps:
receiving a service request sent by a client;
if the service request does not need to be degraded, obtaining target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request and based on complete data of the target page provided by the service data providing server;
generating a target paging according to the target paging block data and returning the target paging to the client;
if the service request needs to be degraded, determining target paging block data from block data of a target page stored in the degraded data storage server; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by a reporting service server which is determined in advance from each service server and is used for reporting the degraded data;
and generating a target paging according to the target paging block data and returning the target paging to the client.
Optionally, the service request includes a target page identifier and a target paging identifier;
before the step of obtaining the target paging block data of the target page corresponding to the service request based on the complete data of the target page provided by the service data providing server according to the service processing flow corresponding to the service request if the service request does not need to be subjected to degradation processing, the method further includes:
acquiring a preset target page template corresponding to the service request based on the target page identifier; the target page template comprises block identifications of all block data of the target page and the arrangement sequence of each block identification in the target page;
determining a target block identifier corresponding to the service request and an arrangement sequence of each target block identifier in a target page based on a target page template, the target page identifier and a preset block number contained in each page;
the step of generating a target page and returning the target page to the client according to the target page block data comprises the following steps:
and generating target pages from the target page block data according to the arrangement sequence of the target block identifiers in the target pages, and returning the target pages to the client.
Optionally, the degraded data storage server stores a corresponding relationship between the block data and the block identifier; the step of determining target paging block data from block data of a target page stored in the degraded data storage server includes:
and obtaining target paging block data corresponding to the target block identification from the block data of the target page according to the corresponding relation.
Optionally, the step of obtaining, according to the service processing flow corresponding to the service request, target paging block data of the target page corresponding to the service request based on the complete data of the target page provided by the service data providing server includes:
acquiring preset configuration information corresponding to each target block identifier; the preset configuration information includes: block data information;
and obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and generating target paging block data.
Optionally, the service request further includes: a client version identification;
the step of obtaining a preset target page template corresponding to the service request based on the target page identifier includes:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
Optionally, the block data of the target page saved in the degraded data storage server is stored in a key-value pair form; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is the block data.
Optionally, if any of the service servers is: and if the reporting service server for reporting the degraded data is determined in advance from each service server, the any service server obtains the data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and further stores the obtained target paging block data into the degraded data storage server after the step of generating the target paging block data.
Optionally, the service system further includes: coordinating server ZooKeeper;
the method further comprises the following steps:
the method comprises the following steps that whether any service server is a reporting service server or not is determined through the following steps:
the service server regularly inquires whether the temporary node is successfully registered by the service server in the ZooKeeper, if so, the successfully registered service server is used as a reporting service server for reporting degraded data; if not, the service server registers the temporary node and serves as a reporting service server for reporting the degraded data under the condition of successful registration.
In a second aspect, an embodiment of the present invention provides a device for processing a service request, which is applied to any service server in a service system, where the service server is in communication connection with a service data providing server and a degraded data storage server; the device comprises:
the service request receiving module is used for receiving a service request sent by a client;
a first target paging block data obtaining module, configured to, if degradation processing is not required to be performed on the service request, obtain target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request based on complete data of the target page provided by the service data providing server;
the first target paging generation module is used for generating a target paging according to the target paging block data and returning the target paging to the client;
a second target paging block data obtaining module, configured to determine target paging block data from block data of a target page stored in the degraded data storage server if the service request needs to be subjected to degradation processing; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by a reporting service server which is determined in advance from each service server and is used for reporting the degraded data;
and the second target paging generation module is used for generating a target paging according to the target paging block data and returning the target paging to the client.
Optionally, the service request includes a target page identifier and a target paging identifier;
the device further comprises:
a target page template obtaining module, configured to obtain a preset target page template corresponding to the service request based on the target page identifier; the target page template comprises block identifications of all block data of the target page and the arrangement sequence of each block identification in the target page;
a target block identifier determining module, configured to determine, based on a target page template, the target page identifier, and a preset number of blocks included in each page, a target block identifier corresponding to the service request, and an arrangement order of each target block identifier in a target page;
the first target page generation module is specifically configured to:
and generating target pages from the target page block data according to the arrangement sequence of the target block identifiers in the target pages, and returning the target pages to the client.
Optionally, the degraded data storage server stores a corresponding relationship between the block data and the block identifier; the second target paging block data obtaining module is specifically configured to:
and obtaining target paging block data corresponding to the target block identification from the block data of the target page according to the corresponding relation.
Optionally, the first target paging block data obtaining module includes:
the preset configuration information acquisition submodule is used for acquiring preset configuration information corresponding to each target block identifier; the preset configuration information includes: block data information;
and the target paging block data generation submodule is used for acquiring data corresponding to the block data information from the complete data of the target page provided by the service data providing server and generating target paging block data.
Optionally, the service request further includes: a client version identification;
the target page template obtaining module is specifically configured to:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
Optionally, the block data of the target page saved in the degraded data storage server is stored in a key-value pair form; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is the block data.
Optionally, the apparatus further comprises: a target paging block data storage module;
if any service server is: and if a reporting service server for reporting degraded data is determined in advance from each service server, the target paging block data storage module of any service server performs the steps of obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server in the target paging block data generation submodule, and generating target paging block data, and then further storing the obtained target paging block data into the degraded data storage server.
Optionally, the service system further includes: coordinating server ZooKeeper;
the device further comprises:
a timing query module, configured to query, by the service server, whether the temporary node is successfully registered by the service server in the ZooKeeper at a timing, and if so, take the successfully registered service server as a reporting service server for reporting degraded data; if not, the service server registers the temporary node and serves as a reporting service server for reporting the degraded data under the condition of successful registration.
The embodiment of the invention also provides a business server, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and a processor for implementing the steps of the service request processing method when executing the program stored in the memory.
In another aspect of the present invention, there is also provided a business service system, including: the system comprises a plurality of service servers, service data providing servers and degraded data storage servers, wherein the service servers are in communication connection with the service data providing servers and the degraded data storage servers;
the service server is used for receiving a service request sent by the client; if the service request does not need to be degraded, obtaining target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request and based on complete data of the target page provided by the service data providing server; generating a target paging according to the target paging block data and returning the target paging to the client;
the service data providing server is used for providing complete data of a target page for the service server if the service request does not need to be subjected to degradation processing;
the service server is further configured to determine target paging block data from block data of a target page stored in the degraded data storage server if the service request needs to be subjected to degradation processing; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by a reporting service server which is determined in advance from each service server and is used for reporting the degraded data; generating a target paging according to the target paging block data and returning the target paging to the client;
the degraded data storage server is used for receiving block data of a target page sent by a reporting service server which is determined in advance from each service server and used for reporting the degraded data, and sending the target paging block data of the target page to the service server if the service request needs to be subjected to degradation processing.
Optionally, the service request includes a target page identifier and a target paging identifier;
the service server is further configured to:
acquiring a preset target page template corresponding to the service request based on the target page identifier; the target page template comprises block identifications of all block data of the target page and the arrangement sequence of each block identification in the target page;
determining a target block identifier corresponding to the service request and an arrangement sequence of each target block identifier in a target page based on a target page template, the target page identifier and a preset block number contained in each page;
and generating target pages from the target page block data according to the arrangement sequence of the target block identifiers in the target pages, and returning the target pages to the client.
Optionally, the degraded data storage server stores a corresponding relationship between the block data and the block identifier; the service server, when performing the step of determining the target paging block data from the block data of the target page stored in the degraded data storage server, is specifically configured to:
and obtaining target paging block data corresponding to the target block identification from the block data of the target page according to the corresponding relation.
Optionally, when the step of obtaining the target paging block data of the target page corresponding to the service request based on the complete data of the target page provided by the service data providing server according to the service processing flow corresponding to the service request is executed by the service server, the service server is specifically configured to:
acquiring preset configuration information corresponding to each target block identifier; the preset configuration information includes: block data information;
and obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and generating target paging block data.
Optionally, the service request further includes: a client version identification;
the service server, when executing the step of obtaining a preset target page template corresponding to the service request based on the target page identifier, is specifically configured to:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
Optionally, the block data of the target page saved in the degraded data storage server is stored in a key-value pair form; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is the block data.
Optionally, if the service server is: the reporting service server for reporting degraded data, which is determined in advance from each service server, is further specifically configured to, after the service server executes the steps of obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and generating target paging block data: and storing the acquired target paging block data into the degraded data storage server.
Optionally, the service system further includes: coordinating server ZooKeeper;
the service server is further configured to query the ZooKeeper at regular time whether the temporary node is successfully registered by the service server, and if so, the successfully registered service server is used as a reporting service server for reporting degraded data; if not, the service server registers the temporary node and serves as a reporting service server for reporting the degraded data under the condition of successful registration.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any one of the service request processing methods described above.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-mentioned methods for processing a service request.
The service request processing method, the service request processing device, the service server, the service system and the storage medium provided by the embodiment of the invention receive the service request sent by the client, and if the service request does not need to be subjected to degradation processing, the target paging block data of the target page corresponding to the service request is obtained based on the complete data of the target page provided by the service data providing server according to the service processing flow corresponding to the service request; and generating a target paging according to the target paging block data and returning the target paging to the client. And if the service request needs to be subjected to degradation processing, determining target paging block data from block data of a target page stored in a degraded data storage server, and generating a target page according to the target paging block data and returning the target page to the client. In the embodiment of the invention, the block data of the target page is stored in the degraded data storage server, so that when the service request needs to be degraded, the service server can obtain the target paging block data of the target page from the degraded data storage server and generate the target paging from the target paging block data and return the target paging to the client, and therefore, the target paging of the target page is generated by the target paging block data determined from the block data of the target page and is sent to the client, so that the second page data of the target page and the data behind the second page data can be refreshed, that is, more service data are provided for the client, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a schematic diagram of a scenario for implementing a business service;
fig. 2a is a schematic structural diagram of a business service system according to an embodiment of the present invention;
FIG. 2b is a schematic flow chart of a method for processing a service request applied to any service server in the service system shown in FIG. 2 a;
FIG. 2c is another schematic flow chart of a method for processing a service request applied to any service server in the service system shown in FIG. 2 a;
FIG. 2d is a schematic structural diagram of a page template according to an embodiment of the present invention;
fig. 2e is a specific flow of step S220 in the method for processing the service request shown in fig. 2 c;
fig. 3a is another schematic structural diagram of a business service system provided in an embodiment of the present invention;
fig. 3b is a schematic flow chart of determining a reporting service server applied to the service system shown in fig. 3 a;
fig. 4 is a schematic structural diagram of a service request processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a service server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
As shown in fig. 1, a client 100 can implement a business service by interacting with a business service system 200. When the business service system 200 is under a high load or has a business processing failure, in order to ensure that the core services (e.g., ordering, paying) can operate normally, a service degradation process is usually performed on some non-core services (e.g., a user searches some cold videos in the video APP).
In the prior art, the service degradation processing method is as follows: after receiving the service request sent by the client 100, the first page data in the page data corresponding to the service request, which is stored in advance in the normal service processing process, is returned to the client 100 as the current service processing result, instead of performing normal service processing according to the corresponding service flow. In this case, the user cannot refresh the second page data and the data thereafter.
In view of this, the embodiment of the present invention provides a method for processing a service request, which is applied to any service server 201 in the service system 200 shown in fig. 2 a. The business service system 200 comprises a plurality of business servers 201 (1 is shown in fig. 2a for illustration only), a business data providing server 202 and a degraded data storage server 203, and each business server 201 is connected with the business data providing server 202 and the degraded data storage server 203 in a communication way.
As shown in fig. 2b, the method for processing a service request provided in the embodiment of the present invention includes the following steps:
s210, receiving a service request sent by a client.
And S220, if the service request does not need to be subjected to degradation processing, obtaining target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request based on complete data of the target page provided by the service data providing server.
S230, generating a target paging according to the target paging block data and returning the target paging to the client.
S240, if the service request needs to be degraded, determining target paging block data from block data of a target page stored in a degraded data storage server; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by the reporting service server which is determined in advance from each service server and used for reporting the degraded data.
S250, generating a target paging according to the target paging block data and returning the target paging to the client.
The service request processing method provided by the embodiment of the invention receives a service request sent by a client, and if the service request does not need to be subjected to degradation processing, target paging block data of a target page corresponding to the service request is obtained based on complete data of the target page provided by a service data providing server according to a service processing flow corresponding to the service request; and generating a target paging according to the target paging block data and returning the target paging to the client. And if the service request needs to be subjected to degradation processing, determining target paging block data from block data of a target page stored in a degraded data storage server, and generating a target page according to the target paging block data and returning the target page to the client. In the embodiment of the invention, the block data of the target page is stored in the degraded data storage server, so that when the service request needs to be degraded, the service server can obtain the target paging block data of the target page from the degraded data storage server and generate the target paging from the target paging block data and return the target paging to the client, and therefore, the target paging of the target page is generated by the target paging block data determined from the block data of the target page and is sent to the client, so that the second page data of the target page and the data behind the second page data can be refreshed, that is, more service data are provided for the client, and the user experience is improved.
Further, in step S210 of the embodiment process shown in fig. 2b, the service server may receive a service request sent by the client, where the service request may be a request for a target page of the target page, for example, after the user opens the video APP, and clicks one page, the client sends the service request for the page data to the service server. The user can also slide a page on the terminal screen to send a sliding instruction, after receiving the sliding instruction of the user, the client side continues to send a service request aiming at the slid service data to the service server, and the service server can receive the service request.
Further, step S220 of the embodiment shown in fig. 2b is a process of processing according to a normal business processing flow.
The service data providing server may be a server for storing service data in the service system, where the service data may refer to complete data of each page in the video APP. For example, for a video APP including a recommended page, a drama page, a movie page, and the like, the service providing server may store complete data of each page, where the complete data may refer to all data included in the page.
Because the content contained in the page is more, the page is usually required to be displayed in multiple pages, and when a user opens a certain page, the service server can only send the first paging data of the page to the client; after the user slides the page in the display interface, the service server may send paging data continuously requested by the client to the client, where one paging data includes a plurality of block data.
If the service request does not need to be subjected to degradation processing, the target paging block data of the target page corresponding to the service request can be obtained based on the complete data of the target page provided by the service data providing server according to the service processing flow corresponding to the service request, wherein the target paging block data is block data in the target paging.
Further, in step S230 of the embodiment shown in fig. 2b, after obtaining the target page block data corresponding to the service request, the target page may be generated and returned to the client according to the target page block data.
Further, in step S240 of the flow of the embodiment shown in fig. 2b, in the business service system, there are usually many business servers, and a service can be provided by many of the servers together, that is, when the client sends a business request to the business service system, all of the business servers can receive the business request and provide the client with the target page corresponding to the business request.
In order to avoid that each service server reports degraded data to the degraded data storage server and causes great pressure on the degraded data storage server, one service server can be determined in advance from a plurality of service servers as a reporting service server for reporting the degraded data. The reporting service server can obtain the block data of the target page from the service data providing server and then send the block data to the degraded data storage server for storage, so that the degraded data storage server can pre-store a copy of the block data of the target page. When the service request needs to be destaged, the service server may obtain the target paging block data of the target page from the block data of the target page stored in the destage storage server.
Further, in step S250 of the embodiment shown in fig. 2b, after the target page block data corresponding to the service request is obtained, the target page may be generated according to the target page block data and returned to the client.
As an optional implementation manner of the present invention, before step S220 of the embodiment flow shown in fig. 2b, the method for processing a service request provided in the embodiment of the present invention may further include:
and judging whether the service request needs to be subjected to degradation processing.
Specifically, in the service system, a configuration server may be further configured, where an identifier list of a service server that needs to perform a downgrading service at the current time is stored in the configuration server. After receiving the service request, the service server may query, in the configuration server, whether the service server identifier of the service server is in the identifier list, if so, it indicates that the service requests operated by the service server all need to be subjected to degradation processing, and if not, it indicates that the service requests operated by the service server do not need to be subjected to degradation processing.
As an optional implementation manner of the embodiment of the present invention, the service request may include: a target page identifier and a target paging identifier.
The destination page identifier may be an identifier that is set in advance for each page and used for distinguishing different pages. The target page identifier contained in the service request can enable the service server to determine the target page requested by the client through the target page identifier when receiving the service request.
The target page identifier may be an identifier of a target page corresponding to the service request obtained by calculation after the client obtains a sliding instruction input by the user in the display interface, and the target page identifier may be represented as a sequence of the target page, that is, the target page is the second page of the target page. Generally, each time the client receives a sliding instruction, it may determine that one page is requested in this time, and therefore, the target page identifier corresponding to the service request may be obtained by adding one to the page identifier in the previous service request.
As shown in fig. 2c, in step S220 of the embodiment process shown in fig. 2b, if the service request does not need to be subjected to the degradation process, before obtaining the target paging block data of the target page corresponding to the service request based on the complete data of the target page provided by the service data providing server according to the service processing process corresponding to the service request, the method for processing the service request provided by the embodiment of the present invention may further include:
and S260, acquiring a preset target page template corresponding to the service request based on the target page identifier.
Because the target page templates of different service requests may be different, the corresponding relationship between each target page identifier and the target page template may be pre-established, and after receiving the service request, the target page template corresponding to the service request may be found through the corresponding relationship.
Each page may include a plurality of block data, each block data has its corresponding block identifier, and therefore, the target page template may include the block identifiers of all the block data of the target page and the arrangement order of the block identifiers in the target page. The tile data may be a group of data having relevance or having the same category, for example, the tile data may be data displayed on the same row in a page, or the tile data may be data all belonging to a tv show or a movie.
The page template not only contains block data identifications, but also can contain the arrangement sequence of the data identifications of all blocks, and the display position of all block data in the target page can be determined according to the arrangement sequence of the data identifications of all blocks. FIG. 2d is a schematic diagram of a page template structure, in which cards can refer to blocks, and [0], [1], [2], [3] and [4] respectively represent different block data.
S270, determining a target block identifier corresponding to the service request and an arrangement sequence of each target block identifier in the target page based on the target page template, the target page identifier and a preset block number contained in each page.
Specifically, after obtaining the target page template corresponding to the service request, the target block identifier corresponding to the service request and the arrangement order of the target block identifiers in the target page may be determined according to the target page template, the target page identifier and the preset number of blocks included in each page, where the preset number of blocks included in each page may be a preset paging logic. According to the target paging identifier, it can be determined that the target paging corresponding to the service request is the second paging in the target page, and according to the number of blocks included in each paging and the identifiers of all block data included in the target page template, it can be determined that the target block identifier of the target paging block data included in the target paging of the service request, and also can be determined the arrangement order of each target block identifier in the target paging.
For example, a target page template includes 20 blocks of data, the block identifiers are 0, 1, and 2 … … 19, respectively, if the paging logic is: each paging template contains 4 block data, if the target paging identifier corresponding to the service request is 1, the block identifiers of the block data contained in the target paging are respectively 0, 1, 2 and 3; if the target page identifier corresponding to the service request is 2, the block identifiers of the block data included in the target page are 4, 5, 6, and 7, respectively, and so on.
In the embodiment shown in fig. 2b, the step S230 or S250 of the flowchart, generating the target page to be returned to the client according to the target page block data may include:
s231, generating the target paging from the target paging block data according to the arrangement sequence of the target block identifiers in the target paging, and returning the target paging to the client.
Since the target paging template includes the block identifier corresponding to the block data in the page and the arrangement order of each block identifier in the target page, after obtaining the block data of each target page in the target page, the target paging block data may be generated into the target paging return value client according to the arrangement order of each target block identifier in the target page.
In the embodiment of the present invention, a target page template corresponding to a service request may be obtained based on a target page identifier, a target block identifier corresponding to the service request and an arrangement order of each target block identifier in a target page are determined based on the target page template, the target page identifier and a preset number of blocks included in each page, and target pages are generated from the target page block data and returned to the client according to the arrangement order of each target block identifier in the target page. In the process of generating the target page, the target page identifier sent by the client is adopted, so that the generated target page is more accurate.
As an optional implementation manner of the embodiment of the present invention, the degraded data storage server stores a corresponding relationship between the block data and the block identifier.
In step S240 of the embodiment shown in fig. 2b, the step of determining the target paged block data from the block data of the target page stored in the degraded data storage server may include:
and obtaining target paging block data corresponding to the target block identifier from the block data of the target page according to the corresponding relation between the block data and the block identifier stored in the degraded data storage server.
Since the corresponding relationship between the block data and the block identifier is stored in the degraded data storage server, the target paging block data corresponding to the target block identifier can be obtained from the block data of the target page according to the corresponding relationship between the block data and the block identifier.
As an optional implementation manner of the embodiment of the present invention, as shown in fig. 2e, in step S220 of the embodiment shown in fig. 2b, according to the service processing flow corresponding to the service request, based on the complete data of the target page provided by the service data providing server, the step of obtaining the target paging block data of the target page corresponding to the service request may include:
s221, obtaining preset configuration information corresponding to each target block identifier.
The service server may store configuration information corresponding to each block identifier in advance, where the configuration information may include: the block data information may include which data is included in the target paginated block data, the storage locations of the data, the selection rule of the picture used for displaying the block data in the display interface, and how the user responds after clicking in the block.
S222, obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and generating target paging block data.
According to the block data information, data corresponding to the block data information can be obtained from complete data of a target page provided in the service data providing server, and target paging block data can be generated.
In the embodiment of the present invention, under a non-degraded condition, data corresponding to the block data information may be obtained from the complete data of the target page provided by the service data providing server, and the target paged block data may be generated. Under the condition of degradation, the target paging block data can be obtained according to the corresponding relation between the block data stored in the degraded data storage server and the block identification.
As an optional implementation manner of the present invention, the service request further includes: a client version identification; because the client version identifiers are different and the page templates of the same page may be different, in order to adapt to different client version identifiers, so that a user using the client version identifier can obtain page data matched with the client version identifier of the user under the condition of service degradation, the block data of the target page stored in the degraded data storage server may further include the client version identifier, and the page template may include the client version identifier.
In step S260 of the embodiment shown in fig. 2c, the step of obtaining a preset target page template corresponding to the service request based on the target page identifier includes:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
The plurality of page templates may be pre-stored in the service server, and after the service request is received, the target page template may be searched for from the plurality of page templates based on the target page identifier and the client version identifier therein. That is, the page identifier in the target page template is the target page identifier, and the client version identifier in the target page template is the client version identifier included in the service request.
Because page data corresponding to different client version identifications may be different for the same page identification, by setting different page templates corresponding to different client version identifications and searching for a target page template corresponding to the client version identification in the service request according to the client version identification after receiving the service request, the accuracy of the page data corresponding to the generated service request is higher based on the target page template.
As an optional implementation manner of the embodiment of the present invention, the degraded data storage server is a Redis database server, and the block data of the target page stored in the degraded data storage server is stored in a key-value pair manner; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is block data.
The reporting service server may generate a key corresponding to each block data according to the page identifier of the page to which the block data belongs, the block identifier of each block data, and the version identifier of the client, where the format of the key may be: page identification-block identification-client version identification.
Then, the reporting service server may take each block data as a value, take each value and a key corresponding to each value as a plurality of key value pairs, and send the plurality of key value pairs to the degraded data storage server.
In addition, the expiration time of each degraded data can be set in the degraded data storage server, so that after a new version of client is put into use, the data corresponding to the old version of client is possibly not needed any more, and the data are cleaned by setting the expiration time at this time, so that the memory occupation of the degraded data storage server can be reduced. Meanwhile, an API (Application Programming Interface) may be used to accelerate the update speed of the degraded data.
In the embodiment of the invention, the block data obtained from the service data providing server is stored in one-to-one correspondence with the keys corresponding to the block data through the degraded data storage server, so that when the service server obtains the target paging block data from the degraded data storage server, the service server can construct the keys and obtain the block data corresponding to the keys from the degraded data storage server by using the keys.
As an optional implementation manner of the present invention, if any service server is: and if the reporting service server for reporting the degraded data is determined in advance from each service server, any service server obtains data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and after the step of generating the target paging block data, further stores the obtained target paging block data into the degraded data storage server.
In practical application, after a certain service request is subjected to degradation processing, the service server does not send a request for obtaining block data of a target page to the service data providing server after receiving the service request. Therefore, this step may be performed in the case of non-service degradation, that is, in the case of non-service degradation, the target paging block data of the target page is obtained from the service data providing server, cached, and further the obtained target paging block data of the target page is stored in the degraded data storage server.
Under the condition of non-service degradation, a service request sent by a client is received, the service request can also contain user login information, and when a user logs in by using an account and a password, the service request can comprise the login account of the user. Then, target paging block data can be obtained based on complete data of a target page in a service data providing server, whether the service request contains login information of a user or not is judged, if yes, the page data corresponding to the service request is data related to the user, and the complete data corresponding to the page is not stored in a degraded data storage server; if not, the page data corresponding to the service request is the data irrelevant to the user, that is, the page data is the data common to all the users, and the target paging block data can be stored in the degraded data storage server. For a page in the video APP, page data corresponding to different user accounts may be different, where the page data includes data that is personalized and recommended for different users, and if the service is degraded, page data for the user needs to be provided for different users, the amount of degraded data that needs to be reported is increased, and therefore, general data of the page can be reported and stored.
If any service server is a reporting service server which is determined in advance from each service server and used for reporting degraded data, it indicates that the service server needs to undertake the work of reporting the degraded data, so that after the step of obtaining the target paging block data corresponding to the target block identifier from the complete data of the target page according to the preset configuration information corresponding to each target block identifier, the obtained target paging block data is further stored in a degraded data storage server.
As an optional implementation manner of the embodiment of the present invention, as shown in fig. 3a, the service system 200 may further include: ZooKeeper301, this ZooKeeper301 can set up a plurality of temporary nodes, and temporary node can be through a section code operation, and every temporary node all has a temporary node identification, and the identification of different temporary nodes is different. The temporary node identifier may include only one identifier, which may be, for example, a service request identifier, or may be a combined identifier, that is, at least two identifiers are included, for example, the combined identifier is: service request identifier-machine room identifier. When the temporary node identifier is a service request identifier, the temporary node identifier indicates that each service request can have a service server capable of successfully registering the temporary node; when the temporary node identifier is the service request identifier-machine room identifier, it indicates that, for each service request, each machine room may have a service server capable of successfully registering the temporary node.
As shown in fig. 3b, the method for processing a service request according to the embodiment of the present invention may further include:
any service server determines whether the service server is a reporting service server or not through the following steps:
s310, the service server regularly inquires the ZooKeeper whether the temporary node is successfully registered by the service server.
After the service request is started, a plurality of service servers providing services for the same service request can regularly inquire whether the temporary node is successfully registered by the service server in the ZooKeeper. When the service server queries in the ZooKeeper, it may query, for the temporary node corresponding to the service request including the service request identifier, whether the temporary node is successfully registered by the service server.
And S320, if so, taking the successfully registered service server as a reporting service server for reporting the degraded data.
If so, indicating that the existing service server successfully registers the temporary node, and using the existing service server successfully registered as a service server for reporting the degraded data. When the existing service server which is successfully registered is the current service server, the current service server can be directly used for reporting degraded data, long link with the ZooKeeper is kept, and the task of regularly inquiring whether the temporary node in the ZooKeeper is successfully registered by the service server is stopped. When the existing service server which is successfully registered is not the current service server, the link between the current service server and the ZooKeeper can be temporarily closed, so that the number of the service servers linked with the ZooKeeper is reduced, and the condition that the ZooKeeper is subjected to greater pressure due to more service server links is avoided; and then, establishing a link with the ZooKeeper at regular time, and inquiring whether the temporary node in the ZooKeeper is successfully registered by the service server.
And S330, if not, the service server registers the temporary node and serves as a reporting service server for reporting the degraded data under the condition of successful registration.
If not, the service server indicates that the temporary node is not successfully registered by the service server temporarily, and the service server can register the temporary node and is used as a service server for reporting degraded data under the condition of successful registration.
In addition, when the service server successfully registered in the ZooKeeper is disconnected from the ZooKeeper due to a failure or other reasons, for example, the network condition is abnormal, the service server disconnected from the ZooKeeper needs to recover the task of regularly inquiring whether the temporary node in the ZooKeeper is successfully registered. And each service server can be set, so that under the condition that the temporary node is successfully registered by the service server, the service server inquires the ZooKeeper at preset time intervals, and whether the temporary node is successfully registered by the service server exists or not is judged.
In the embodiment of the invention, the ZooKeeper is set in the service system, and the service server regularly inquires whether the service server successfully registers the temporary node or not, if not, the temporary node is registered, and the service server is used for reporting degraded data after the temporary node is successfully registered. After the successfully registered service server is disconnected from the ZooKeeper, the service server can continuously inquire the temporary node, so that the service server can be ensured to be used as the service server for reporting the degraded data all the time, and the continuity of reporting the degraded data can be further improved.
In addition, in the embodiment of the present invention, since the second page data and the data after the second page data can be sent to the client, the influence on the user experience is small, and the user hardly feels that the degradation processing is performed on the requested service, that is, the user does not feel aware of it.
An embodiment of the present invention provides a specific embodiment of a device for processing a service request, which corresponds to the flow shown in fig. 2b, and referring to fig. 4, fig. 4 is a schematic structural diagram of a device for processing a service request according to an embodiment of the present invention, where the device for processing a service request is applied to any service server in a service system, and the service server is in communication connection with a service data providing server and a degraded data storage server; the service request processing device comprises:
a service request receiving module 401, configured to receive a service request sent by a client;
a first target paging block data obtaining module 402, configured to, if degradation processing is not required to be performed on the service request, obtain target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request based on complete data of the target page provided by a service data providing server;
a first target paging generation module 403, configured to generate a target paging according to the target paging block data and return the target paging to the client;
a second target paging block data obtaining module 404, configured to determine target paging block data from block data of a target page stored in a degraded data storage server if the service request needs to be subjected to degradation processing; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by a reporting service server which is determined in advance from each service server and is used for reporting the degraded data;
the second target page generation module 405 is configured to generate a target page according to the target page block data and return the target page to the client.
As an optional implementation manner of the embodiment of the present invention, the service request includes a target page identifier and a target paging identifier;
the device for processing the service request provided by the embodiment of the present invention may further include:
the target page template obtaining module is used for obtaining a preset target page template corresponding to the service request based on the target page identifier; the target page template comprises block identifications of all block data of a target page and the arrangement sequence of each block identification in the target page;
the target block identifier determining module is used for determining a target block identifier corresponding to the service request and an arrangement sequence of each target block identifier in the target page based on the target page template, the target page identifier and the preset number of blocks contained in each page;
the first target page generation module 403 is specifically configured to:
and generating target pages from the target page block data according to the arrangement sequence of the target block identifications in the target pages, and returning the target pages to the client.
As an optional implementation manner of the embodiment of the present invention, the degraded data storage server stores a corresponding relationship between the block data and the block identifier; the second target paging block data obtaining module 404 is specifically configured to:
and obtaining target paging block data corresponding to the target block identification from the block data of the target page according to the corresponding relation.
As an optional implementation manner of the embodiment of the present invention, the first target paging block data obtaining module 402 includes:
the preset configuration information acquisition submodule is used for acquiring preset configuration information corresponding to each target block identifier; the preset configuration information includes: block data information;
and the target paging block data generation submodule is used for obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server and generating target paging block data.
As an optional implementation manner of the embodiment of the present invention, the service request further includes: a client version identification;
the target page template obtaining module is specifically configured to:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
As an optional implementation manner of the embodiment of the present invention, the block data of the target page stored in the degraded data storage server is stored in a key-value pair manner; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is block data.
As an optional implementation manner of the embodiment of the present invention, the apparatus for processing a service request provided in the embodiment of the present invention further includes: and the target paging block data storage module.
If any service server is: and a target paging block data storage module of any service server acquires data corresponding to the block data information from the complete data of the target page provided by the service data providing server executed by the target paging block data generation submodule, and further stores the acquired target paging block data into the degraded data storage server after the step of generating the target paging block data.
As an optional implementation manner of the embodiment of the present invention, the service system further includes: coordinating server ZooKeeper;
the device for processing the service request provided by the embodiment of the present invention may further include:
the timing query module is used for the service server to query the ZooKeeper at regular time, whether the temporary node is successfully registered by the service server or not is judged, and if yes, the successfully registered service server is used as a reporting service server for reporting the degraded data; if not, the service server registers the temporary node and serves as a reporting service server for reporting the degraded data under the condition of successful registration.
The embodiment of the present invention further provides a service server, as shown in fig. 5, including a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504.
The memory 503 stores a computer program.
The processor 501, when executing the program stored in the memory 503, implements the following steps:
and receiving a service request sent by a client.
And if the service request does not need to be subjected to degradation processing, obtaining target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request based on complete data of the target page provided by the service data providing server.
And generating a target paging according to the target paging block data and returning the target paging to the client.
If the service request needs to be subjected to degradation processing, determining target paging block data from block data of a target page stored in a degraded data storage server; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by the reporting service server which is determined in advance from each service server and used for reporting the degraded data.
And generating a target paging according to the target paging block data and returning the target paging to the client.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
As shown in fig. 2a, an embodiment of the present invention further provides a business service system 200, including: a plurality of business servers 201, business data providing servers 202 and degraded data storage servers 203, the business servers 201 are connected with the business data providing servers 202 and the degraded data storage servers 203 in communication.
A service server 201, configured to receive a service request sent by a client; if the service request does not need to be subjected to degradation processing, according to a service processing flow corresponding to the service request, based on the complete data of the target page provided by the service data providing server 202, obtaining target paging block data of the target page corresponding to the service request; generating a target paging according to the target paging block data and returning the target paging to the client;
the service data providing server 202 is configured to provide complete data of the target page to the service server 201 if the service request does not need to be subjected to degradation processing;
the service server 201 is further configured to determine target paging block data from the block data of the target page stored in the degraded data storage server 203 if the service request needs to be subjected to degradation processing; the block data of the target page stored in the degraded data storage server 203 is stored in the degraded data storage server 203 after the target paging block data of the target page is obtained from the service data providing server 202 by the reporting service server for reporting the degraded data determined in advance from each service server 201; generating a target paging according to the target paging block data and returning the target paging to the client;
the degraded data storage server 203 is configured to receive block data of a target page sent by a reporting service server for reporting degraded data, which is determined in advance from each service server 201, and send target paging block data of the target page to the service server 201 if the service request needs to be subjected to degradation processing.
As an optional implementation manner of the embodiment of the present invention, the service request includes a target page identifier and a target paging identifier;
the service server 201 is further configured to:
acquiring a preset target page template corresponding to the service request based on the target page identifier; the target page template comprises block identifications of all block data of a target page and the arrangement sequence of each block identification in the target page;
determining a target block identifier corresponding to the service request and an arrangement sequence of each target block identifier in the target page based on the target page template, the target page identifier and the preset block number contained in each page;
and generating target pages from the target page block data according to the arrangement sequence of the target block identifications in the target pages, and returning the target pages to the client.
As an optional implementation manner of the embodiment of the present invention, the degraded data storage server 203 stores a corresponding relationship between the block data and the block identifier; when the step of determining the target paging block data from the block data of the target page stored in the degraded data storage server 203 is executed, the service server 201 is specifically configured to:
and obtaining target paging block data corresponding to the target block identification from the block data of the target page according to the corresponding relation.
As an optional implementation manner of the embodiment of the present invention, when the service server 201 executes a service processing flow corresponding to the service request, and obtains target paging block data of a target page corresponding to the service request based on complete data of the target page provided by the service data providing server 202, the service server is specifically configured to:
acquiring preset configuration information corresponding to each target block identifier; the preset configuration information includes: block data information;
the data corresponding to the block data information is obtained from the complete data of the target page provided by the service data providing server 202, and the target paged block data is generated.
As an optional implementation manner of the embodiment of the present invention, the service request further includes: a client version identification;
the service server 201, when executing the step of obtaining the preset target page template corresponding to the service request based on the target page identifier, is specifically configured to:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
As an optional implementation manner of the embodiment of the present invention, the block data of the target page stored in the degraded data storage server 203 is stored in a key-value pair form; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is block data.
As an alternative implementation of the embodiment of the present invention,
if the service server 201 is: the reporting service server for reporting degraded data, which is determined in advance from each service server 201, then after the service server 201 executes the steps of obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server 202, and generating target paging block data, the method is further specifically configured to: the acquired target paging block data is saved to the degraded data storage server 203.
As an optional implementation manner of the embodiment of the present invention, as shown in fig. 3a, the service system 200 further includes: a coordination server ZooKeeper 301;
the service server 201 is further configured to query the ZooKeeper301 at regular time, to determine whether the temporary node is successfully registered by the service server 201, and if so, to use the successfully registered service server 201 as a reporting service server for reporting degraded data; if not, the service server 201 registers the temporary node, and serves as a reporting service server for reporting the degraded data when the registration is successful.
In another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the method for processing a service request in any of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for processing a service request according to any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (26)

1. A processing method of business request is characterized in that the method is applied to any business server in a business service system, and the business server is in communication connection with a business data providing server and a degraded data storage server; the method comprises the following steps:
receiving a service request sent by a client;
if the service request does not need to be degraded, obtaining target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request and based on complete data of the target page provided by the service data providing server;
generating a target paging according to the target paging block data and returning the target paging to the client;
if the service request needs to be degraded, determining target paging block data from block data of a target page stored in the degraded data storage server; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by a reporting service server which is determined in advance from each service server and is used for reporting the degraded data;
and generating a target paging according to the target paging block data and returning the target paging to the client.
2. The method of claim 1, wherein the service request comprises a target page identifier and a target paging identifier;
before the step of obtaining the target paging block data of the target page corresponding to the service request based on the complete data of the target page provided by the service data providing server according to the service processing flow corresponding to the service request if the service request does not need to be subjected to degradation processing, the method further includes:
acquiring a preset target page template corresponding to the service request based on the target page identifier; the target page template comprises block identifications of all block data of the target page and the arrangement sequence of each block identification in the target page;
determining a target block identifier corresponding to the service request and an arrangement sequence of each target block identifier in a target page based on a target page template, the target page identifier and a preset block number contained in each page;
the step of generating a target page and returning the target page to the client according to the target page block data comprises the following steps:
and generating target pages from the target page block data according to the arrangement sequence of the target block identifiers in the target pages, and returning the target pages to the client.
3. The method according to claim 2, wherein the degraded data storage server stores therein a correspondence between the chunk data and the chunk identifier; the step of determining target paging block data from block data of a target page stored in the degraded data storage server includes:
and obtaining target paging block data corresponding to the target block identification from the block data of the target page according to the corresponding relation.
4. The method according to claim 2, wherein the step of obtaining the target paging block data of the target page corresponding to the service request based on the complete data of the target page provided by the service data providing server according to the service processing flow corresponding to the service request comprises:
acquiring preset configuration information corresponding to each target block identifier; the preset configuration information includes: block data information;
and obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and generating target paging block data.
5. The method of claim 2, wherein the service request further comprises: a client version identification;
the step of obtaining a preset target page template corresponding to the service request based on the target page identifier includes:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
6. The method of claim 5, wherein the tile data of the target page maintained in the degraded data storage server is stored in the form of key-value pairs; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is the block data.
7. The method of claim 6,
if any service server is: and if the reporting service server for reporting the degraded data is determined in advance from each service server, the any service server obtains the data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and further stores the obtained target paging block data into the degraded data storage server after the step of generating the target paging block data.
8. The method of claim 7, wherein the business service system further comprises: coordinating server ZooKeeper;
the method further comprises the following steps:
the method comprises the following steps that whether any service server is a reporting service server or not is determined through the following steps:
the service server regularly inquires whether the temporary node is successfully registered by the service server in the ZooKeeper, if so, the successfully registered service server is used as a reporting service server for reporting degraded data; if not, the service server registers the temporary node and serves as a reporting service server for reporting the degraded data under the condition of successful registration.
9. The device for processing the business request is applied to any business server in a business service system, and the business server is in communication connection with a business data providing server and a degraded data storage server; the device comprises:
the service request receiving module is used for receiving a service request sent by a client;
a first target paging block data obtaining module, configured to, if degradation processing is not required to be performed on the service request, obtain target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request based on complete data of the target page provided by the service data providing server;
the first target paging generation module is used for generating a target paging according to the target paging block data and returning the target paging to the client;
a second target paging block data obtaining module, configured to determine target paging block data from block data of a target page stored in the degraded data storage server if the service request needs to be subjected to degradation processing; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by a reporting service server which is determined in advance from each service server and is used for reporting the degraded data;
and the second target paging generation module is used for generating a target paging according to the target paging block data and returning the target paging to the client.
10. The apparatus of claim 9, wherein the service request comprises a target page id and a target paging id;
the device further comprises:
a target page template obtaining module, configured to obtain a preset target page template corresponding to the service request based on the target page identifier; the target page template comprises block identifications of all block data of the target page and the arrangement sequence of each block identification in the target page;
a target block identifier determining module, configured to determine, based on a target page template, the target page identifier, and a preset number of blocks included in each page, a target block identifier corresponding to the service request, and an arrangement order of each target block identifier in a target page;
the first target page generation module is specifically configured to:
and generating target pages from the target page block data according to the arrangement sequence of the target block identifiers in the target pages, and returning the target pages to the client.
11. The apparatus according to claim 10, wherein the degraded data storage server stores therein a correspondence between the chunk data and the chunk identifier; the second target paging block data obtaining module is specifically configured to:
and obtaining target paging block data corresponding to the target block identification from the block data of the target page according to the corresponding relation.
12. The apparatus of claim 10, wherein the first target paging block data obtaining module comprises:
the preset configuration information acquisition submodule is used for acquiring preset configuration information corresponding to each target block identifier; the preset configuration information includes: block data information;
and the target paging block data generation submodule is used for acquiring data corresponding to the block data information from the complete data of the target page provided by the service data providing server and generating target paging block data.
13. The apparatus of claim 10, wherein the service request further comprises: a client version identification;
the target page template obtaining module is specifically configured to:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
14. The apparatus of claim 13, wherein the tile data of the target page maintained in the degraded data storage server is stored in the form of key-value pairs; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is the block data.
15. The apparatus of claim 14, further comprising: a target paging block data storage module;
if any service server is: and if a reporting service server for reporting degraded data is determined in advance from each service server, the target paging block data storage module of any service server performs the steps of obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server in the target paging block data generation submodule, and generating target paging block data, and then further storing the obtained target paging block data into the degraded data storage server.
16. The apparatus of claim 15, wherein the business service system further comprises: coordinating server ZooKeeper;
the device further comprises:
a timing query module, configured to query, by the service server, whether the temporary node is successfully registered by the service server in the ZooKeeper at a timing, and if so, take the successfully registered service server as a reporting service server for reporting degraded data; if not, the service server registers the temporary node and serves as a reporting service server for reporting the degraded data under the condition of successful registration.
17. A business server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 8 when executing a program stored in the memory.
18. A business service system, the system comprising: the system comprises a plurality of service servers, service data providing servers and degraded data storage servers, wherein the service servers are in communication connection with the service data providing servers and the degraded data storage servers;
the service server is used for receiving a service request sent by the client; if the service request does not need to be degraded, obtaining target paging block data of a target page corresponding to the service request according to a service processing flow corresponding to the service request and based on complete data of the target page provided by the service data providing server; generating a target paging according to the target paging block data and returning the target paging to the client;
the service data providing server is used for providing complete data of a target page for the service server if the service request does not need to be subjected to degradation processing;
the service server is further configured to determine target paging block data from block data of a target page stored in the degraded data storage server if the service request needs to be subjected to degradation processing; the block data of the target page stored in the degraded data storage server is stored in the degraded data storage server after the target paging block data of the target page is obtained from the service data providing server by a reporting service server which is determined in advance from each service server and is used for reporting the degraded data; generating a target paging according to the target paging block data and returning the target paging to the client;
the degraded data storage server is used for receiving block data of a target page sent by a reporting service server which is determined in advance from each service server and used for reporting the degraded data, and sending the target paging block data of the target page to the service server if the service request needs to be subjected to degradation processing.
19. The system of claim 18, wherein the service request includes a target page identifier and a target paging identifier;
the service server is further configured to:
acquiring a preset target page template corresponding to the service request based on the target page identifier; the target page template comprises block identifications of all block data of the target page and the arrangement sequence of each block identification in the target page;
determining a target block identifier corresponding to the service request and an arrangement sequence of each target block identifier in a target page based on a target page template, the target page identifier and a preset block number contained in each page;
and generating target pages from the target page block data according to the arrangement sequence of the target block identifiers in the target pages, and returning the target pages to the client.
20. The system of claim 19, wherein the degraded data storage server stores therein a correspondence between the chunk data and the chunk identifier; the service server, when performing the step of determining the target paging block data from the block data of the target page stored in the degraded data storage server, is specifically configured to:
and obtaining target paging block data corresponding to the target block identification from the block data of the target page according to the corresponding relation.
21. The system according to claim 19, wherein the service server, when executing the step of obtaining the target paging block data of the target page corresponding to the service request based on the complete data of the target page provided by the service data providing server according to the service processing flow corresponding to the service request, is specifically configured to:
acquiring preset configuration information corresponding to each target block identifier; the preset configuration information includes: block data information;
and obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and generating target paging block data.
22. The system of claim 19, wherein the service request further comprises: a client version identification;
the service server, when executing the step of obtaining a preset target page template corresponding to the service request based on the target page identifier, is specifically configured to:
and acquiring a preset target page template corresponding to the service request and corresponding to the client version identification.
23. The system of claim 22, wherein the tile data of the target page maintained in the degraded data storage server is stored in the form of key-value pairs; wherein the key is obtained by combining the target page identifier, the block identifier and the client version identifier, and the value is the block data.
24. The system of claim 23,
if the service server is: the reporting service server for reporting degraded data, which is determined in advance from each service server, is further specifically configured to, after the service server executes the steps of obtaining data corresponding to the block data information from the complete data of the target page provided by the service data providing server, and generating target paging block data: and storing the acquired target paging block data into the degraded data storage server.
25. The system of claim 24, wherein the business service system further comprises: coordinating server ZooKeeper;
the service server is further configured to query the ZooKeeper at regular time whether the temporary node is successfully registered by the service server, and if so, the successfully registered service server is used as a reporting service server for reporting degraded data; if not, the service server registers the temporary node and serves as a reporting service server for reporting the degraded data under the condition of successful registration.
26. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-8.
CN202011307241.2A 2020-11-20 2020-11-20 Service request processing method and device, service server and system Active CN112437148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011307241.2A CN112437148B (en) 2020-11-20 2020-11-20 Service request processing method and device, service server and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011307241.2A CN112437148B (en) 2020-11-20 2020-11-20 Service request processing method and device, service server and system

Publications (2)

Publication Number Publication Date
CN112437148A true CN112437148A (en) 2021-03-02
CN112437148B CN112437148B (en) 2023-03-07

Family

ID=74693006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011307241.2A Active CN112437148B (en) 2020-11-20 2020-11-20 Service request processing method and device, service server and system

Country Status (1)

Country Link
CN (1) CN112437148B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114969129A (en) * 2022-07-29 2022-08-30 飞狐信息技术(天津)有限公司 Abnormal service data backflow method and device
CN116347511A (en) * 2023-05-29 2023-06-27 泉州维盾电气有限公司 Data communication method and related equipment

Citations (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101393517A (en) * 2007-09-20 2009-03-25 上海宝信软件股份有限公司 Method and apparatus for implementing collocation based on XML and control
CN103617198A (en) * 2013-11-14 2014-03-05 北京国双科技有限公司 Page merging method and page merging device
CN104102419A (en) * 2013-04-09 2014-10-15 腾讯科技(深圳)有限公司 Page display method and device and terminal equipment
CN104102636A (en) * 2013-04-02 2014-10-15 阿里巴巴集团控股有限公司 Method and device for counting and presenting page data
CN104182247A (en) * 2014-07-22 2014-12-03 百度在线网络技术(北京)有限公司 Method and device for configuring navigation page of browser
CN104281677A (en) * 2014-09-29 2015-01-14 百度在线网络技术(北京)有限公司 Page displaying method and device
CN104298721A (en) * 2014-09-25 2015-01-21 宇威科技发展(青岛)有限公司 Split screen layout editing method for any number of objects in on-line courseware making based on Web
CN104462089A (en) * 2013-09-13 2015-03-25 北大方正集团有限公司 Data processing method and device
CN104486108A (en) * 2014-12-08 2015-04-01 畅捷通信息技术股份有限公司 Node configuration method base on Zookeeper and node configuration system based on Zookeeper
CN105045896A (en) * 2015-07-31 2015-11-11 北京奇虎科技有限公司 Method and apparatus for pushing promotion content to appointed page
CN106445583A (en) * 2016-08-31 2017-02-22 广州品唯软件有限公司 Page display method, equipment and system
CN107085580A (en) * 2016-02-16 2017-08-22 阿里巴巴集团控股有限公司 The method and client of client displayed page
US20170293406A1 (en) * 2014-01-31 2017-10-12 Gree, Inc. Display data generation method, computer-readable, non-transitory medium and computer
US20180067954A1 (en) * 2015-07-22 2018-03-08 Tencent Technology (Shenzhen) Company Limited Web page annotation displaying method and apparatus, and mobile terminal
CN107862001A (en) * 2017-10-23 2018-03-30 北京京东尚科信息技术有限公司 A kind of method and system of data disaster tolerance
CN108171610A (en) * 2017-12-28 2018-06-15 中国平安人寿保险股份有限公司 Page generation method, page generation equipment, storage medium and device
CN108234670A (en) * 2018-01-31 2018-06-29 北京中安智达科技有限公司 A kind of distributed remote call method based on zookeeper and netty
CN108304255A (en) * 2017-12-29 2018-07-20 北京城市网邻信息技术有限公司 Distributed task dispatching method and device, electronic equipment and readable storage medium storing program for executing
CN108829885A (en) * 2018-06-27 2018-11-16 珠海市君天电子科技有限公司 Page generation method, device, server, electronic equipment and storage medium
CN109597954A (en) * 2018-11-28 2019-04-09 南京赛克蓝德网络科技有限公司 Data item methods of exhibiting, calculates equipment and medium at device
CN109740076A (en) * 2018-12-28 2019-05-10 北京字节跳动网络技术有限公司 Webpage display process and device
CN110096659A (en) * 2019-03-27 2019-08-06 北京三快在线科技有限公司 A kind of page display method, device, equipment and readable storage medium storing program for executing
CN110209964A (en) * 2018-02-13 2019-09-06 阿里巴巴集团控股有限公司 A kind of page display method, device and equipment
CN110263277A (en) * 2019-06-18 2019-09-20 广州虎牙科技有限公司 Display methods, update method, device, equipment and the storage medium of page data
US20190303415A1 (en) * 2010-04-01 2019-10-03 Cloudflare, Inc. Methods and apparatuses for providing internet-based proxy services
CN110647372A (en) * 2019-09-18 2020-01-03 阿里巴巴集团控股有限公司 Position adjusting method and device of page display module
CN110889073A (en) * 2019-11-21 2020-03-17 掌阅科技股份有限公司 Page request response method, server and computer storage medium
CN111046310A (en) * 2019-12-12 2020-04-21 北京奇艺世纪科技有限公司 Page processing method, device, server and computer readable storage medium
CN111324435A (en) * 2020-02-06 2020-06-23 北京奇艺世纪科技有限公司 Distributed task scheduling and registering method, device and distributed task scheduling system
CN111368235A (en) * 2020-02-25 2020-07-03 北京达佳互联信息技术有限公司 Page rendering and displaying method, device, server and storage medium
CN111460011A (en) * 2020-03-27 2020-07-28 中国平安人寿保险股份有限公司 Page data display method and device, server and storage medium
CN111769941A (en) * 2020-07-15 2020-10-13 北京金山云网络技术有限公司 Business processing method and device and integrated business service system
EP3731113A1 (en) * 2019-04-25 2020-10-28 Beijing Xiaomi Mobile Software Co., Ltd. Display method, display device and storage medium

Patent Citations (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101393517A (en) * 2007-09-20 2009-03-25 上海宝信软件股份有限公司 Method and apparatus for implementing collocation based on XML and control
US20190303415A1 (en) * 2010-04-01 2019-10-03 Cloudflare, Inc. Methods and apparatuses for providing internet-based proxy services
CN104102636A (en) * 2013-04-02 2014-10-15 阿里巴巴集团控股有限公司 Method and device for counting and presenting page data
CN104102419A (en) * 2013-04-09 2014-10-15 腾讯科技(深圳)有限公司 Page display method and device and terminal equipment
CN104462089A (en) * 2013-09-13 2015-03-25 北大方正集团有限公司 Data processing method and device
CN103617198A (en) * 2013-11-14 2014-03-05 北京国双科技有限公司 Page merging method and page merging device
US20170293406A1 (en) * 2014-01-31 2017-10-12 Gree, Inc. Display data generation method, computer-readable, non-transitory medium and computer
CN104182247A (en) * 2014-07-22 2014-12-03 百度在线网络技术(北京)有限公司 Method and device for configuring navigation page of browser
CN104298721A (en) * 2014-09-25 2015-01-21 宇威科技发展(青岛)有限公司 Split screen layout editing method for any number of objects in on-line courseware making based on Web
CN104281677A (en) * 2014-09-29 2015-01-14 百度在线网络技术(北京)有限公司 Page displaying method and device
CN104486108A (en) * 2014-12-08 2015-04-01 畅捷通信息技术股份有限公司 Node configuration method base on Zookeeper and node configuration system based on Zookeeper
US20180067954A1 (en) * 2015-07-22 2018-03-08 Tencent Technology (Shenzhen) Company Limited Web page annotation displaying method and apparatus, and mobile terminal
CN105045896A (en) * 2015-07-31 2015-11-11 北京奇虎科技有限公司 Method and apparatus for pushing promotion content to appointed page
CN107085580A (en) * 2016-02-16 2017-08-22 阿里巴巴集团控股有限公司 The method and client of client displayed page
CN106445583A (en) * 2016-08-31 2017-02-22 广州品唯软件有限公司 Page display method, equipment and system
CN107862001A (en) * 2017-10-23 2018-03-30 北京京东尚科信息技术有限公司 A kind of method and system of data disaster tolerance
CN108171610A (en) * 2017-12-28 2018-06-15 中国平安人寿保险股份有限公司 Page generation method, page generation equipment, storage medium and device
CN108304255A (en) * 2017-12-29 2018-07-20 北京城市网邻信息技术有限公司 Distributed task dispatching method and device, electronic equipment and readable storage medium storing program for executing
CN108234670A (en) * 2018-01-31 2018-06-29 北京中安智达科技有限公司 A kind of distributed remote call method based on zookeeper and netty
CN110209964A (en) * 2018-02-13 2019-09-06 阿里巴巴集团控股有限公司 A kind of page display method, device and equipment
CN108829885A (en) * 2018-06-27 2018-11-16 珠海市君天电子科技有限公司 Page generation method, device, server, electronic equipment and storage medium
CN109597954A (en) * 2018-11-28 2019-04-09 南京赛克蓝德网络科技有限公司 Data item methods of exhibiting, calculates equipment and medium at device
CN109740076A (en) * 2018-12-28 2019-05-10 北京字节跳动网络技术有限公司 Webpage display process and device
CN110096659A (en) * 2019-03-27 2019-08-06 北京三快在线科技有限公司 A kind of page display method, device, equipment and readable storage medium storing program for executing
EP3731113A1 (en) * 2019-04-25 2020-10-28 Beijing Xiaomi Mobile Software Co., Ltd. Display method, display device and storage medium
CN110263277A (en) * 2019-06-18 2019-09-20 广州虎牙科技有限公司 Display methods, update method, device, equipment and the storage medium of page data
CN110647372A (en) * 2019-09-18 2020-01-03 阿里巴巴集团控股有限公司 Position adjusting method and device of page display module
CN110889073A (en) * 2019-11-21 2020-03-17 掌阅科技股份有限公司 Page request response method, server and computer storage medium
CN111046310A (en) * 2019-12-12 2020-04-21 北京奇艺世纪科技有限公司 Page processing method, device, server and computer readable storage medium
CN111324435A (en) * 2020-02-06 2020-06-23 北京奇艺世纪科技有限公司 Distributed task scheduling and registering method, device and distributed task scheduling system
CN111368235A (en) * 2020-02-25 2020-07-03 北京达佳互联信息技术有限公司 Page rendering and displaying method, device, server and storage medium
CN111460011A (en) * 2020-03-27 2020-07-28 中国平安人寿保险股份有限公司 Page data display method and device, server and storage medium
CN111769941A (en) * 2020-07-15 2020-10-13 北京金山云网络技术有限公司 Business processing method and device and integrated business service system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
T. KONAGAYA; T. SHINTANI; T. OZONO; T. ITO; K. NISHI: ""Big blackboard: on a large Web page by using a fast page loading method"", 《 THE 2005 IEEE/WIC/ACM INTERNATIONAL CONFERENCE ON WEB INTELLIGENCE (WI"05)》 *
吴章玲; 金培权; 岳丽华; 孟小峰: ""基于PCM的大数据存储与管理研究综述"", 《计算机研究与发展》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114969129A (en) * 2022-07-29 2022-08-30 飞狐信息技术(天津)有限公司 Abnormal service data backflow method and device
CN116347511A (en) * 2023-05-29 2023-06-27 泉州维盾电气有限公司 Data communication method and related equipment

Also Published As

Publication number Publication date
CN112437148B (en) 2023-03-07

Similar Documents

Publication Publication Date Title
CN107784516B (en) Advertisement putting method and device
CN106572173B (en) Configuration information updating method, device and system
WO2017167050A1 (en) Configuration information generation and transmission method, and resource loading method, apparatus and system
CN112437148B (en) Service request processing method and device, service server and system
CN112115337A (en) Method and device for displaying data, electronic equipment and computer readable storage medium
CN111159269B (en) Data processing method, device and system
CN109885729B (en) Method, device and system for displaying data
CN109446445B (en) Resource acquisition method and device
CN109086414B (en) Method, apparatus and storage medium for searching blockchain data
US9201960B2 (en) Virtual agent response to customer inquiries
CN110727895B (en) Sensitive word sending method and device, electronic equipment and storage medium
CN106959975B (en) Transcoding resource cache processing method, device and equipment
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
CN111767481A (en) Access processing method, device, equipment and storage medium
CN110674426A (en) Webpage behavior reporting method and device
CN112948733B (en) Interface maintenance method, device, computing equipment and medium
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN113138943B (en) Method and device for processing request
CN111367691B (en) Data feedback method and device, electronic equipment and storable medium
KR20180088260A (en) Method and apparatus for generating web pages
CN114003659A (en) Data synchronization method, data synchronization device, electronic equipment, storage medium and program product
CN110674386B (en) Resource recommendation method, device and storage medium
CN108804195B (en) Page display method and device, server and client
CN111367634A (en) Information processing method, information processing device and terminal equipment
CN111291127A (en) Data synchronization method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant