CN110889073A - Page request response method, server and computer storage medium - Google Patents

Page request response method, server and computer storage medium Download PDF

Info

Publication number
CN110889073A
CN110889073A CN201911150047.5A CN201911150047A CN110889073A CN 110889073 A CN110889073 A CN 110889073A CN 201911150047 A CN201911150047 A CN 201911150047A CN 110889073 A CN110889073 A CN 110889073A
Authority
CN
China
Prior art keywords
service
response value
page
configuration information
default
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
CN201911150047.5A
Other languages
Chinese (zh)
Other versions
CN110889073B (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.)
Zhangyue Technology Co Ltd
Original Assignee
Zhangyue 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 Zhangyue Technology Co Ltd filed Critical Zhangyue Technology Co Ltd
Priority to CN201911150047.5A priority Critical patent/CN110889073B/en
Publication of CN110889073A publication Critical patent/CN110889073A/en
Application granted granted Critical
Publication of CN110889073B publication Critical patent/CN110889073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a response method of a page request, a server and a computer storage medium, wherein the method comprises the following steps: receiving a calling request of at least one service triggered by page access operation of a client; for any service, judging whether the service needs degradation processing or not according to configuration information corresponding to the name space of the inquired service; if so, forwarding the service calling request to the simulation service to acquire a default response value; if not, forwarding the service calling request to the corresponding service to acquire a normal response value; and returning the default response value and/or the normal response value to the client. Therefore, according to the scheme of the invention, under the condition that part of services can not normally respond, the default response value and/or the normal response value for normally displaying the page can still be returned to the client, and the display of the services capable of normally responding can not be influenced.

Description

Page request response method, server and computer storage medium
Technical Field
The invention relates to the technical field of internet, in particular to a page request response method, a server and a computer storage medium.
Background
With the development of internet technology, it has become daily for users to acquire information or complete daily matters through various client applications, for example, to watch news through a news client, to read books through a reading client, to pay through a payment client, and the like. Typically, the services provided by application pages are diverse and independent from each other, such as reading a book city page in an application, which may provide advertising services, classification services, recommendation services, etc., where each service is displayed in a different area of the page.
Meanwhile, in the prior art, when one or more services in the access page cannot respond normally, for example, a machine room providing the corresponding service fails to respond normally, the whole page cannot be displayed normally, and even a client is crashed, which affects the use of a user.
Therefore, a technical solution is needed to display a page normally when a part of services cannot respond normally, without affecting the use of the user.
Disclosure of Invention
In view of the above, the present invention has been made to provide a page request response method, server and computer storage medium that overcome or at least partially solve the above-mentioned problems.
According to an aspect of the present invention, there is provided a page request response method, including:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
According to another aspect of the present invention, there is provided a page request response method, including:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
According to still another aspect of the present invention, there is provided a server including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
According to still another aspect of the present invention, there is provided a client, including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
According to yet another aspect of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
According to yet another aspect of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
According to the response method of the page request, the server and the computer storage medium, after a call request of at least one service triggered by the page access operation of the client is received, whether the service needs to be degraded or not is judged for any service, if yes, the call request of the service is forwarded to the simulation service, and a default response value which can not affect the normal display of the page is obtained through the simulation service; if not, forwarding the service calling request to the real service so as to obtain a normal response value through the real service; by the method, the default response value and/or the normal response value of the call request corresponding to the at least one service can be obtained and returned to the client for page display. Therefore, according to the scheme of the invention, aiming at the calling requests of different services triggered by the same page access operation, the calling requests of part of abnormal services are forwarded to the simulation service to obtain the default response value which does not influence the normal display of the page, but the calling requests of all services are not forwarded to the real service, so that the normal display of other normal services can not be influenced when the part of services are abnormal, and the display abnormality of the whole page or the crash of a client side can not be caused.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating a method embodiment of a page request response of the present invention;
FIG. 2 is a flow chart diagram illustrating another embodiment of a page request response method of the present invention;
FIG. 3 is a flow chart illustrating a method of responding to a page request according to yet another embodiment of the present invention;
FIG. 4 is a schematic diagram of a server according to an embodiment of the present invention;
fig. 5 shows a schematic structural diagram of the client-side embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 is a flowchart illustrating a method for responding to a page request according to an embodiment of the present invention, where the method is applied to a server corresponding to a client. As shown in fig. 1, the method comprises the steps of:
step S110: and receiving a calling request of at least one service triggered by the page access operation of the client.
Specifically, when a page access operation is performed on a client, a call request of at least one service is triggered, where the at least one service refers to a service that can be provided by the accessed page. Different services initiate calling requests to the server through different interfaces, and correspondingly, the server can receive the calling requests of at least one service initiated by calling at least one interface.
For example, when a certain book is selected in the reading client, the operation of accessing the detail pages of the book is performed, and the detail pages of the book need to provide a plurality of services, such as basic information of the book (e.g., name, cover, etc.), book scoring, content introduction, book review, and author introduction, and the plurality of services respectively initiate a call request to the server through corresponding interfaces.
Step S120: and inquiring configuration information corresponding to the name space of any service.
The namespace is cluster directory information stored in data which needs to be presented in a page for the service, for example, if book review data is stored in the cluster directory 1, the namespace of the book review service is the cluster directory 1. And the configuration information corresponding to the name space comprises a configuration reflecting whether the service corresponding to the cluster directory can respond normally. For example, whether a service can respond normally is indicated by different identification values in the configuration information.
Step S130: judging whether the service needs degradation processing according to the configuration information; if yes, go to step S140; if not, go to step S150.
When the configuration information shows that the service requires degradation processing, i.e. it indicates that the service cannot respond normally, step S140 is executed to forward the service invocation request to a simulated service different from the service for response processing; when the configuration information shows that the service does not need to perform the degradation process, i.e. the service can respond normally, step S150 is executed to forward the service invocation request to the service for response process.
Step S140: and forwarding the calling request of the service to the simulation service so that the simulation service can acquire a default response value.
The simulation service is a service different from the current targeted service, and the simulation service is a general service and can perform response processing on various services which cannot normally respond.
The default response value is a preset response value returned by the call request for various services, and the default response value does not influence the normal display of the accessed page and even cause the client to crash. For example, for a call request of service m, if a response value of 0 is returned, which may result in that the entire page cannot be normally displayed, the default response value may be set to a value other than 0, such as 1; for another example, for some call requests of which the response value is 0 and which do not affect the service displayed on the page, the default response value may be uniformly set to 0.
Specifically, when the service needs degradation processing, the service invocation request is forwarded to the simulation service, and after receiving the service invocation request, the simulation service obtains a default response value preset for the service invocation request.
Step S150: and forwarding the calling request of the service to the corresponding service so that the service can obtain a normal response value.
The corresponding service refers to a service in the call request of the service, that is, the service is a real service.
The normal response value refers to a response value that can be returned by the real service when the service is normal.
Step S160: and returning the default response value and/or the normal response value to the client.
And the server returns the default response value returned by the simulation service and/or the normal response value returned by the real service to the client so that the client presents the accessed page.
According to the response method of the page request provided by the embodiment, after receiving a call request of at least one service triggered by a page access operation of a client, judging whether the service needs to be degraded or not for any service, if so, forwarding the call request of the service to a simulation service, so as to obtain a default response value which can not influence normal display of the page through the simulation service; if not, forwarding the service calling request to the real service so as to obtain a normal response value through the real service; by the method, the default response value and/or the normal response value of the call request corresponding to the at least one service can be obtained and returned to the client for page display. Therefore, according to the scheme of the embodiment, for the call requests of different services triggered by the same page access operation, the call requests of part of abnormal services are forwarded to the simulation service to obtain the default response value which does not affect the normal display of the page, and the call requests of all services are not forwarded to the real service, so that the normal display of other normal services can not be affected when the part of services are abnormal, and the display abnormality of the whole page or the crash of the client side cannot be caused.
Fig. 2 is a flowchart illustrating another embodiment of a method for responding to a page request according to the present invention, which is applied to a server corresponding to a client. As shown in fig. 2, the method comprises the steps of:
step S210: and receiving a calling request of at least one service triggered by the page access operation of the client.
A page access operation of a client triggers a call request of at least one service, wherein the at least one service refers to the service which can be provided by the accessed page, and the call request of one service is initiated by calling an interface. For example, a call request to check-in service is initiated by calling a check-in interface.
Step S220: for any service, determining a name space of the service according to the URI of the service, and further acquiring configuration information corresponding to the name space; wherein the invocation request carries the URI of the service.
Specifically, a URI (uniform resource identifier) of a service is carried in an invocation request of any service, and is matched to a namespace corresponding to the URI through a routing rule, where the namespace refers to cluster directory information stored in data that needs to be presented in a page for the service, and the matching process may be performed by a nginx control. After the namespace is obtained by matching, configuration information of the namespace is obtained, and the configuration information shows whether the service needs to be degraded or not.
Step S230: judging whether the service needs degradation processing according to the configuration information; if yes, go to step S240; if yes, go to step S250.
Specifically, whether a degradation identifier in the configuration information is a first identifier is judged, and if yes, it is judged that the service needs degradation processing; if not, the service is judged not to need the degradation processing. For example, when the degradation identifier is Y, the service is abnormal, and degradation processing is required; when the degradation identifier is N, the service is not abnormal, and the degradation processing is not needed.
Step S240: and forwarding the calling request of the service to the simulation service so that the simulation service can acquire a default response value.
Specifically, when the service needs degradation processing, a call request of the service is forwarded to the simulation service; the simulation service inquires whether response data configuration information of the service is stored in a database and/or a memory, and if the response data configuration information is inquired, a default response value is obtained according to the response data configuration information; and if the query is not received, acquiring a predefined default response value. The response data configuration information refers to response values configured for some services to avoid affecting page display and different from normal abnormal responses, for example, if a service abnormality returns a response value of 0 in a normal case, but if some services return 0 to cause a page not to be displayed normally, other response values are configured for the services. And the predefined default response value refers to a uniform return value applicable to the services except the service which needs to obtain the default response value according to the response data configuration information when the service is abnormal, for example, the services which need to obtain the default response value according to the response data configuration information are service a, service b and service c, and the default response value of the services except service a, service b and service c when the service is abnormal can be predefined to be 0. Through the method, in the implementation process, whether the response data configuration information of the service exists or not is preferably inquired, if yes, the response value configured in the response data configuration information is used as a default response value, and if not, the default response value predefined by a program is acquired, so that the response value of the abnormal service can be prevented from influencing page display.
Further, the response data configuration information of the service is written into the database and/or the memory through the response configuration page. The configuration entry can receive a request identifier input by a user and a corresponding default response value, the default response value comprises a response value of at least one page display tag, and the response value of the at least one page display tag is an essential condition for ensuring that a page can be normally displayed. For example, for a request at the beginning of a/b/c, the response value of code tag is configured to be "999" and the response value of body tag is configured to be "ok", so that the page is guaranteed not to crash. In practice, the required response value can be normally displayed according to the client page, the response configuration page is configured, after the configuration is completed, the response data configuration information needs to be written into the database, the response data configuration information written into the database can be inquired by the simulation service, and the response data configuration information can be ensured not to be lost after the simulation service is restarted; on the basis, the response data configuration information can be written into the memory of the simulation service at the same time, namely, the response data configuration information is written into the memory of the simulation service in two parts, the response data configuration information written into the memory of the simulation service can be immediately effective, the simulation service is not required to be restarted, and the query efficiency can be improved. For example, the response data configuration information is written into the mysql database and the redis memory of the simulation service, respectively, where writing into redis can ensure fast querying, while writing into mysql can ensure that the configuration is not lost.
Furthermore, when the simulation service is started by judging that the degradation processing is needed, the response data configuration information in the database is loaded into the memory of the simulation service, so that the simulation service can complete the query process through the memory, and the query speed is improved.
Step S250: and forwarding the service calling request to the corresponding service so that the service can obtain a normal response value.
Step S260: and returning the default response value and/or the normal response value to the client.
And the server returns the default response value returned by the simulation service and/or the real normal response value returned by the service to the corresponding interface of the service, and the client analyzes and displays the response value of each interface, wherein each interface renders the page part corresponding to the received response value. In the finally presented page, the page part corresponding to the default response value is displayed as a blank area, and the part corresponding to the normal response value is displayed as normal service information.
In order to facilitate understanding of the implementation process and effect of the present embodiment, the following is a complete example: assuming that a page access operation triggers a call request of 10 services in total, configuration information corresponding to respective namespaces of the 10 services shows that the copyright information service needs to be subjected to degradation processing, and the other 9 services do not need to be subjected to degradation processing, respectively forwarding the call requests of the 9 services which do not need to be subjected to degradation processing to corresponding real services to obtain normal response values and returning the normal response values; the copyright information service is forwarded to the simulation service, the simulation service inquires whether response data configuration information of the copyright information service exists, if the response data configuration information exists, a code tag configuration value '999' and a body tag configuration value 'ok' in the response data configuration information are returned as default response values; and rendering the interfaces corresponding to the 10 services according to the response values received by the interfaces respectively to obtain a finally displayed page, wherein the display of the area corresponding to the copyright information in the finally displayed page is a blank area, but the display of the rest areas is not influenced, and the use of the user is not influenced.
According to the response method of the page request provided by the embodiment, after a call request of at least one service triggered by the page access operation of a client is received, whether the service needs to be degraded or not is judged for any service, if yes, the call request of the service is forwarded to a simulation service, the simulation service inquires whether response data configuration information corresponding to the service exists or not, and a default response value is obtained according to an inquiry result, so that the default response value does not affect the display of the page; if not, forwarding the service calling request to the real service to acquire a normal response value; by the method, the default response value and/or the normal response value of the call request corresponding to the at least one service can be obtained and returned to the client for page display. Therefore, according to the scheme of the embodiment, for the call requests of different services triggered by the same page access operation, the call requests of part of abnormal services are forwarded to the simulation service to obtain the default response value which does not affect the normal display of the page, and the call requests of all services are not forwarded to the real service, so that the normal display of other normal services can not be affected when the part of services are abnormal, and the display abnormality of the whole page or the crash of the client side cannot be caused.
Fig. 3 is a flow chart showing a response method of the page request of the present invention, which is applied to the client. As shown in fig. 3, the method comprises the steps of:
step S310: and sending a calling request of at least one service triggered by the page access operation to the server according to the page access operation.
When a page access operation is executed at a client, a call request of at least one service is triggered, wherein the at least one service refers to a service which needs to be provided in an accessed page.
Step S320: and receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation.
The server acquires a corresponding response value for each service calling request and returns the response value to the client; for normal service, the client receives a normal response value; for abnormal services, the client receives a default response value, wherein the default response value is a preset response value returned by a call request for the same or different services, and the default response value does not influence the normal display of an accessed page.
Step S330: and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
And the client displays corresponding service information in the page according to the normal response value and displays a blank area in the page according to the default response value.
According to the response method of the page request provided by the embodiment, the client sends the call request of at least one service triggered by the page access operation to the server, and receives the default response value and/or the normal response value of each call request returned by the server, so that even if part of the services are abnormal, normal display of other service information in the page is not affected, and normal page access can be realized.
In some optional embodiments of the present invention, the receiving the default response value and/or the normal response value of the page returned by the server in response to the page access operation further includes: and receiving a default response value and/or a normal response value of the page returned by the server by using the response method of the page request of the server side. By the server side method, for abnormal services, the default response value which does not affect the page display can be obtained through the simulation service, and the return value of the abnormal services is ensured not to affect the display of normal services.
In some optional embodiments of the invention, presenting the page further comprises: and analyzing the default response value and/or the normal response value, and rendering and presenting an analysis result to obtain a page. And the server returns the default response value returned by the simulation service and/or the real normal response value returned by the service to the corresponding interface of the service, and the client analyzes and displays the response value of each interface, wherein each interface renders the page part corresponding to the received response value. In the finally presented page, the page part corresponding to the default response value is displayed as blank, and the part corresponding to the normal response value is displayed as normal service information.
An embodiment of the present invention provides a non-volatile computer storage medium, where the computer storage medium stores at least one executable instruction, and the computer executable instruction may execute a response method of a page request in any method embodiment described above.
The executable instructions may be specifically configured to cause the processor to:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
In an alternative, the executable instructions further cause the processor to:
forwarding the calling request of the service to a simulation service;
the simulation service inquires whether response data configuration information of the service is stored in a database and/or a memory, and if the response data configuration information of the service is inquired, a default response value is obtained according to the response data configuration information; and if the query is not received, acquiring a predefined default response value.
In an optional manner, the response data configuration information of the service is written into the database and/or the memory through a response configuration page.
In an optional manner, the invocation request carries a URI of the service;
the executable instructions further cause the processor to: and aiming at any service, determining the name space of the service according to the URI of the service, and further acquiring the configuration information corresponding to the name space.
In an alternative, the executable instructions further cause the processor to:
judging whether a degradation identifier in the configuration information is a first identifier or not, and if so, judging that the service needs degradation processing; if not, determining that the service does not need degradation processing.
Fig. 4 is a schematic structural diagram of an embodiment of a server according to the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the server.
As shown in fig. 4, the server may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein: the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408. A communication interface 404 for communicating with network elements of other devices, such as clients or other servers. The processor 402, configured to execute the program 410, may specifically perform relevant steps in the above-described response method embodiment for a page request of a server.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement an embodiment of the present invention. The server comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may specifically be configured to cause the processor 402 to perform the following operations:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
In an alternative, the program 410 causes the processor to:
forwarding the calling request of the service to a simulation service;
the simulation service inquires whether response data configuration information of the service is stored in a database and/or a memory, and if the response data configuration information of the service is inquired, a default response value is obtained according to the response data configuration information; and if the query is not received, acquiring a predefined default response value.
In an optional manner, the response data configuration information of the service is written into the database and/or the memory through a response configuration page.
In an optional manner, the invocation request carries a URI of the service;
the program 410 causes the processor to perform the following operations: and aiming at any service, determining the name space of the service according to the URI of the service, and further acquiring the configuration information corresponding to the name space.
In an alternative, the program 410 causes the processor to:
judging whether a degradation identifier in the configuration information is a first identifier or not, and if so, judging that the service needs degradation processing; if not, determining that the service does not need degradation processing.
Fig. 5 is a schematic structural diagram of an embodiment of the client according to the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the client.
As shown in fig. 5, the client may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508. A communication interface 504 for communicating with network elements of other devices, such as clients or other servers. The processor 502 is configured to execute the program 510, and may specifically perform relevant steps in the above-described response method embodiment for a page request of a client.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the invention. The one or more processors included in the client can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
In an alternative manner, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:
receiving a default response value and/or a normal response value of the page returned by the server by using the method of any one of the preceding claims 1 to 5.
In an alternative manner, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:
and analyzing the default response value and/or the normal response value, and rendering and presenting an analysis result to obtain a page.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.
The invention discloses: A1. a response method of a page request comprises the following steps:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
A2. The method of a1, wherein forwarding the service invocation request to a simulation service for the simulation service to obtain a default response value further comprises:
forwarding the calling request of the service to a simulation service;
the simulation service inquires whether response data configuration information of the service is stored in a database and/or a memory, and if the response data configuration information of the service is inquired, a default response value is obtained according to the response data configuration information; and if the query is not received, acquiring a predefined default response value.
A3. The method according to a2, wherein the response data configuration information of the service is written into a database and/or a memory through a response configuration page.
A4. The method of any of a1-A3, wherein the invocation request carries a URI of a service;
for any service, the querying configuration information corresponding to the namespace of the service further includes:
and aiming at any service, determining the name space of the service according to the URI of the service, and further acquiring the configuration information corresponding to the name space.
A5. The method of any of A1-A4, wherein the determining whether the service requires degradation processing based on the configuration information further comprises:
judging whether a degradation identifier in the configuration information is a first identifier or not, and if so, judging that the service needs degradation processing; if not, determining that the service does not need degradation processing.
The invention discloses: B6. a response method of a page request comprises the following steps:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
B7. The method according to B6, wherein the receiving the default response value and/or the normal response value of the page returned by the server in response to the page access operation further comprises:
receiving a default response value and/or a normal response value of the page returned by the server by using the method of any one of the preceding claims 1 to 5.
B8. The method of B6 or B7, wherein the presenting the page further comprises: and analyzing the default response value and/or the normal response value, and rendering and presenting an analysis result to obtain a page.
The invention discloses: C9. a server, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
C10 the server of C9, the executable instructions further cause the processor to:
forwarding the calling request of the service to a simulation service;
the simulation service inquires whether response data configuration information of the service is stored in a database and/or a memory, and if the response data configuration information of the service is inquired, a default response value is obtained according to the response data configuration information; and if the query is not received, acquiring a predefined default response value.
C11. According to the server of C10, the response data configuration information of the service is written into a database and/or a memory through a response configuration page.
C12. According to the server of any one of C9-C11, the call request carries a URI of a service;
the executable instructions further cause the processor to: and aiming at any service, determining the name space of the service according to the URI of the service, and further acquiring the configuration information corresponding to the name space.
C13. The server of any of C9-C12, the executable instructions further cause the processor to:
judging whether a degradation identifier in the configuration information is a first identifier or not, and if so, judging that the service needs degradation processing; if not, determining that the service does not need degradation processing.
The invention discloses: D14. a client, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
D15. The client of D14, the executable instructions further causing the processor to:
receiving a default response value and/or a normal response value of the page returned by the server by using the method of any one of the A1-A5.
D16. The client of D14 or D15, the executable instructions further cause the processor to:
and analyzing the default response value and/or the normal response value, and rendering and presenting an analysis result to obtain a page.
The invention discloses: E17. a computer storage medium having stored therein at least one executable instruction that causes a processor to:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
E18. The computer storage medium of E17, the executable instructions further cause the processor to:
forwarding the calling request of the service to a simulation service;
the simulation service inquires whether response data configuration information of the service is stored in a database and/or a memory, and if the response data configuration information of the service is inquired, a default response value is obtained according to the response data configuration information; and if the query is not received, acquiring a predefined default response value.
E19. According to the computer storage medium of E18, the response data configuration information of the service is written into a database and/or a memory through a response configuration page.
E20. The computer storage medium of any of E17-E19, the invocation request carrying a URI of the service;
the executable instructions further cause the processor to: and aiming at any service, determining the name space of the service according to the URI of the service, and further acquiring the configuration information corresponding to the name space.
E21. The computer storage medium of any one of E17-E20, the executable instructions further cause the processor to:
judging whether a degradation identifier in the configuration information is a first identifier or not, and if so, judging that the service needs degradation processing; if not, determining that the service does not need degradation processing.
The invention discloses: F22. a computer storage medium having stored therein at least one executable instruction that causes a processor to:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
F23. The computer storage medium of F22, the executable instructions further cause the processor to:
receiving a default response value and/or a normal response value of the page returned by the server by using the method of any one of the A1-A5.
F24. The computer storage medium of F22 or F23, the executable instructions further cause the processor to:
and analyzing the default response value and/or the normal response value, and rendering and presenting an analysis result to obtain a page.

Claims (10)

1. A response method of a page request comprises the following steps:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
2. The method of claim 1, wherein forwarding the invocation request for the service to a simulation service for the simulation service to obtain a default response value further comprises:
forwarding the calling request of the service to a simulation service;
the simulation service inquires whether response data configuration information of the service is stored in a database and/or a memory, and if the response data configuration information of the service is inquired, a default response value is obtained according to the response data configuration information; and if the query is not received, acquiring a predefined default response value.
3. The method of claim 2, wherein the response data configuration information of the service is written into a database and/or a memory through a response configuration page.
4. The method of any of claims 1-3, wherein the invocation request carries a URI of the service;
for any service, the querying configuration information corresponding to the namespace of the service further includes:
and aiming at any service, determining the name space of the service according to the URI of the service, and further acquiring the configuration information corresponding to the name space.
5. The method of any of claims 1-4, wherein the determining whether the service requires degradation processing according to the configuration information further comprises:
judging whether a degradation identifier in the configuration information is a first identifier or not, and if so, judging that the service needs degradation processing; if not, determining that the service does not need degradation processing.
6. A response method of a page request comprises the following steps:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
7. A server, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
8. A client, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
9. A computer storage medium having stored therein at least one executable instruction that causes a processor to:
receiving a calling request of at least one service triggered by page access operation of a client;
for any service, inquiring configuration information corresponding to the name space of the service;
judging whether the service needs degradation processing according to the configuration information; if so, forwarding the service calling request to a simulation service so that the simulation service can acquire a default response value; if not, forwarding the service calling request to a corresponding service so that the service can obtain a normal response value;
and returning the default response value and/or the normal response value to the client.
10. A computer storage medium having stored therein at least one executable instruction that causes a processor to:
sending a calling request of at least one service triggered by the page access operation to a server according to the page access operation;
receiving a default response value and/or a normal response value of the page returned by the server in response to the page access operation;
and presenting the page, wherein the display area corresponding to the default response value in the page is presented as a blank area.
CN201911150047.5A 2019-11-21 2019-11-21 Page request response method, server and computer storage medium Active CN110889073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911150047.5A CN110889073B (en) 2019-11-21 2019-11-21 Page request response method, server and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911150047.5A CN110889073B (en) 2019-11-21 2019-11-21 Page request response method, server and computer storage medium

Publications (2)

Publication Number Publication Date
CN110889073A true CN110889073A (en) 2020-03-17
CN110889073B CN110889073B (en) 2024-01-12

Family

ID=69748320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911150047.5A Active CN110889073B (en) 2019-11-21 2019-11-21 Page request response method, server and computer storage medium

Country Status (1)

Country Link
CN (1) CN110889073B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984448A (en) * 2020-08-14 2020-11-24 北京达佳互联信息技术有限公司 Page calling method, device, equipment and storage medium
CN112437148A (en) * 2020-11-20 2021-03-02 北京奇艺世纪科技有限公司 Service request processing method and device, service server and system
CN113704019A (en) * 2021-09-10 2021-11-26 中国银行股份有限公司 Fault-tolerant processing method and device

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833125A (en) * 2011-06-17 2012-12-19 腾讯科技(深圳)有限公司 Test server, test system adopting test server, and test method
CN103580937A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Web service simulating method and system and service agent system thereof
CN105656962A (en) * 2014-11-11 2016-06-08 阿里巴巴集团控股有限公司 Service calling method and device
CN107196777A (en) * 2016-03-14 2017-09-22 阿里巴巴集团控股有限公司 A kind of method and apparatus of application processing
JP2018098727A (en) * 2016-12-16 2018-06-21 沖電気工業株式会社 Service system, communication program, and communication method
CN108268375A (en) * 2018-01-12 2018-07-10 深圳壹账通智能科技有限公司 Applied program testing method, device, computer equipment and storage medium
CN108600311A (en) * 2018-03-21 2018-09-28 浙江口碑网络技术有限公司 The method and device of client simulation interface data
CN109240874A (en) * 2017-07-05 2019-01-18 北京国双科技有限公司 Website page method for detecting abnormality, apparatus and system
CN109981779A (en) * 2019-03-27 2019-07-05 掌阅科技股份有限公司 Service providing method, server and computer storage medium
CN110096659A (en) * 2019-03-27 2019-08-06 北京三快在线科技有限公司 A kind of page display method, device, equipment and readable storage medium storing program for executing
CN110290205A (en) * 2019-06-26 2019-09-27 贝壳技术有限公司 Service interface management method and device
CN110347946A (en) * 2019-05-31 2019-10-18 浙江口碑网络技术有限公司 A kind of page display method, device, computer equipment and storage medium
CN110413929A (en) * 2019-07-30 2019-11-05 北京达佳互联信息技术有限公司 Page display method and device
CN110430184A (en) * 2019-07-31 2019-11-08 腾讯科技(深圳)有限公司 Digital simulation method, apparatus, computer readable storage medium and computer equipment

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833125A (en) * 2011-06-17 2012-12-19 腾讯科技(深圳)有限公司 Test server, test system adopting test server, and test method
CN103580937A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Web service simulating method and system and service agent system thereof
CN105656962A (en) * 2014-11-11 2016-06-08 阿里巴巴集团控股有限公司 Service calling method and device
CN107196777A (en) * 2016-03-14 2017-09-22 阿里巴巴集团控股有限公司 A kind of method and apparatus of application processing
JP2018098727A (en) * 2016-12-16 2018-06-21 沖電気工業株式会社 Service system, communication program, and communication method
CN109240874A (en) * 2017-07-05 2019-01-18 北京国双科技有限公司 Website page method for detecting abnormality, apparatus and system
CN108268375A (en) * 2018-01-12 2018-07-10 深圳壹账通智能科技有限公司 Applied program testing method, device, computer equipment and storage medium
CN108600311A (en) * 2018-03-21 2018-09-28 浙江口碑网络技术有限公司 The method and device of client simulation interface data
CN109981779A (en) * 2019-03-27 2019-07-05 掌阅科技股份有限公司 Service providing method, server and computer storage medium
CN110096659A (en) * 2019-03-27 2019-08-06 北京三快在线科技有限公司 A kind of page display method, device, equipment and readable storage medium storing program for executing
CN110347946A (en) * 2019-05-31 2019-10-18 浙江口碑网络技术有限公司 A kind of page display method, device, computer equipment and storage medium
CN110290205A (en) * 2019-06-26 2019-09-27 贝壳技术有限公司 Service interface management method and device
CN110413929A (en) * 2019-07-30 2019-11-05 北京达佳互联信息技术有限公司 Page display method and device
CN110430184A (en) * 2019-07-31 2019-11-08 腾讯科技(深圳)有限公司 Digital simulation method, apparatus, computer readable storage medium and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱炳铨, 姜健宁, 章坚民, 赵舫, 黄良: "基于B/S/C结构和IEC61850MMS的电网故障信息系统", 电力系统自动化, no. 24, pages 45 - 49 *
王英明;郭艳梅;: "基于Android平台的掌上校园信息系统设计与实现", 通化师范学院学报, no. 06, pages 20 - 22 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984448A (en) * 2020-08-14 2020-11-24 北京达佳互联信息技术有限公司 Page calling method, device, equipment and storage medium
CN111984448B (en) * 2020-08-14 2023-12-12 北京达佳互联信息技术有限公司 Page calling method, device, equipment and storage medium
CN112437148A (en) * 2020-11-20 2021-03-02 北京奇艺世纪科技有限公司 Service request processing method and device, service server and system
CN112437148B (en) * 2020-11-20 2023-03-07 北京奇艺世纪科技有限公司 Service request processing method and device, service server and system
CN113704019A (en) * 2021-09-10 2021-11-26 中国银行股份有限公司 Fault-tolerant processing method and device

Also Published As

Publication number Publication date
CN110889073B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN108427731B (en) Page code processing method and device, terminal equipment and medium
CN111639279B (en) Graphic code generation method, target page loading method and device
CN110889073B (en) Page request response method, server and computer storage medium
CN109614766B (en) Method and device for carrying out block chaining and evidence saving on webpage through file acquisition
US9552600B1 (en) Generating and updating recommendations for merchants
CN109657434B (en) Application access method and device
CN111143739B (en) Page jump method, computing device and computer storage medium
CN112784184A (en) ADX-based advertisement landing page dynamic generation method, computer equipment and storage medium
CN111930786B (en) Resource acquisition request processing system, method and device
CN112711372B (en) Page response method in visual impairment mode, computing device and computer storage medium
CN113535267A (en) Applet page configuration method and device, electronic equipment and storage medium
CN111274516B (en) Page display method, page configuration method and device
CN112612982A (en) Webpage preloading method and device and computer equipment
US9858356B1 (en) Automated page generation using value-based recommendations
CN111475222A (en) Drift bottle processing method for electronic book application and electronic equipment
CN103559097A (en) Inter-process communication method and device in browser and browser
US7376594B2 (en) Method for distributing images via a network
CN111131419A (en) Information pushing method and server based on book pages
CN113989058A (en) Service generation method and device
CN111367519B (en) Page part using method and device, computing equipment and computer storage medium
CN112036974A (en) Service commodity online method, device, equipment and storage medium
CN108062224B (en) Data reading and writing method and device based on file handle and computing equipment
CN112748924B (en) Inventory display method and system
CN112134953B (en) Self-adaptive response method based on push message, computing device and storage medium
CN111563153B (en) Recommendation method and terminal based on clipboard information sharing implementation

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