[go: up one dir, main page]

CN113055415B - Service providing method, service consumption method, device and equipment - Google Patents

Service providing method, service consumption method, device and equipment Download PDF

Info

Publication number
CN113055415B
CN113055415B CN201911369184.8A CN201911369184A CN113055415B CN 113055415 B CN113055415 B CN 113055415B CN 201911369184 A CN201911369184 A CN 201911369184A CN 113055415 B CN113055415 B CN 113055415B
Authority
CN
China
Prior art keywords
target application
notification information
service
server
state
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.)
Active
Application number
CN201911369184.8A
Other languages
Chinese (zh)
Other versions
CN113055415A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201911369184.8A priority Critical patent/CN113055415B/en
Publication of CN113055415A publication Critical patent/CN113055415A/en
Application granted granted Critical
Publication of CN113055415B publication Critical patent/CN113055415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04L67/63Routing a service request depending on the request content or context
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Economics (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Telephonic Communication Services (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明实施例提供一种服务提供方法、服务消费方法、装置及设备,方法包括:在服务器提供的目标应用的工作状态发生变更时,获取与服务器通信的至少一个服务消费对象;向服务消费对象发送用于标识目标应用的工作状态的通知信息,以使服务消费对象根据通知信息对目标应用进行调整。本实施例在目标应用的工作状态发生变更时,通过获取与服务器通信的至少一个服务消费对象,向服务消费对象发送用于标识目标应用的工作状态的通知信息,有效地实现了服务消费对象可以及时感知到目标应用的工作状态,在目标应用更新的过程中可以尽可能的保障服务无损,避免在目标应用不可用的状态时,数据处理请求会失败或者超时的情况,保证了目标应用的可用性和稳定性。

The embodiment of the present invention provides a service providing method, a service consuming method, an apparatus and a device, and the method includes: when the working state of a target application provided by a server changes, obtaining at least one service consuming object communicating with the server; sending notification information for identifying the working state of the target application to the service consuming object, so that the service consuming object adjusts the target application according to the notification information. In this embodiment, when the working state of the target application changes, by obtaining at least one service consuming object communicating with the server, the notification information for identifying the working state of the target application is sent to the service consuming object, which effectively enables the service consuming object to perceive the working state of the target application in a timely manner, and can ensure the service as lossless as possible during the target application update process, avoiding the situation where the data processing request fails or times out when the target application is unavailable, thereby ensuring the availability and stability of the target application.

Description

Service providing method, service consumption method, device and equipment
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a service providing method, a service consumption method, a device, and equipment.
Background
During application release and update, the real-time performance of the distributed system under the large-scale cluster is difficult to ensure, so that the service consumer cannot sense the state information of the service provider provided by the directory service in real time, and therefore, a part or all of the service consumers still request the service provider in the offline update state. However, since the provider is already in a service unavailable state, the request may fail or timeout, resulting in reduced service availability.
Disclosure of Invention
The embodiment of the invention provides a service providing method, a service consuming method, a device and equipment, which are used for solving the problem that in the prior art, the service availability is reduced because a provider is in a service unavailable state and a request fails or overtime.
In a first aspect, an embodiment of the present invention provides a service providing method, including:
when the working state of a target application provided by a server is changed, acquiring at least one service consumption object communicated with the server;
and sending notification information for identifying the working state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information.
In a second aspect, an embodiment of the present invention provides a server, including:
The acquisition module is used for acquiring at least one service consumption object communicated with the server when the working state of the target application provided by the server is changed;
And the first processing module is used for sending notification information for identifying the working state of the target application to the service consumption object so that the service consumption object adjusts the target application according to the notification information.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is configured to store one or more computer instructions, and the one or more computer instructions implement a service providing method in the first aspect when executed by the processor.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program, where the computer program makes a computer implement a service providing method in the first aspect.
When the working state of the target application provided by the server is changed, at least one service consumption object communicated with the server is obtained, and then notification information for identifying the working state of the target application is sent to the service consumption object, so that the service consumption object can adjust the target application according to the notification information, the service consumption object can timely and rapidly sense the working state of the target application, further, the service damage is guaranteed as much as possible in the updating process of the target application, the situation that a data processing request fails or overtime is avoided when the target application is in an unavailable state, the availability and stability of the target application are guaranteed, the practicability of the method is further improved, and the popularization and application of the market are facilitated.
In a fifth aspect, an embodiment of the present invention provides a service consumption method, including:
When the working state of a target application provided by a server is changed, receiving notification information which is sent by the server and is used for identifying the working state of the target application;
And adjusting the target application according to the notification information so as to apply based on the adjusted target application.
In a sixth aspect, an embodiment of the present invention provides a service consumption apparatus, including:
the receiving module is used for receiving notification information which is sent by the server and used for identifying the working state of the target application when the working state of the target application provided by the server is changed;
and the second processing module is used for adjusting the target application according to the notification information so as to apply based on the adjusted target application.
In a seventh aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is configured to store one or more computer instructions, and where the one or more computer instructions when executed by the processor implement one of the service consumption methods in the fifth aspect.
In an eighth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program, where the computer program causes a computer to implement a service consumption method in the fifth aspect.
When the working state of the target application provided by the server is changed, the service consumption object can not send a data processing request to the server based on the target application by receiving the notification information sent by the server and used for identifying the working state of the target application and then adjusting the target application according to the notification information, so that invalid or failed data processing request can be effectively avoided when the working state of the target application is in a down state, and when the working state of the target application is in an up state, the service consumption object can send the data processing request to the service based on the target application, thereby ensuring the quality and efficiency of data processing, further improving the practicability of the method and being beneficial to popularization and application of markets.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a service providing method according to an embodiment of the present invention;
FIG. 2 is a second flowchart of a service providing method according to an embodiment of the present invention;
fig. 3 is a flowchart III of a service providing method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another method for consuming services according to an embodiment of the present invention;
FIG. 5 is a second flowchart of another service consumption method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram I of interaction between a server and a service consumption object according to an embodiment of the present invention;
FIG. 7 is a second schematic diagram of interaction between a server and a service consumption object according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a service providing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device corresponding to the service providing apparatus provided in the embodiment shown in fig. 8;
Fig. 10 is a schematic structural diagram of a service consumption device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device corresponding to the service consumption device provided in the embodiment shown in fig. 10.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two, but does not exclude the case of at least one.
It should be understood that the term "and/or" as used herein is merely an association relationship describing the associated object, and means that there may be three relationships, e.g., a and/or B, and that there may be three cases where a exists alone, while a and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The words "if", as used herein, may be interpreted as "at" or "when" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such product or system. Without further limitation, an element defined by the phrase "comprising one of the elements" does not exclude the presence of additional identical elements in a commodity or system comprising the element.
In order to facilitate understanding of the technical solution of the present application, the following description of the prior art will be briefly given:
Stability is an important indicator of all distributed applications. During application release and update, since real-time performance of a distributed system under a large-scale cluster is difficult to ensure, for a service consumer, service provider state information acquired by virtue of a directory service cannot be perceived in real time, which results in that a part or all of the service consumers still request the service application in the offline update state. Since the service application is already in a service unavailable state, the request may fail or timeout, resulting in reduced service availability. Therefore, how to maximize the guaranteed service without loss and reduce the number of request failures due to issues, failures, etc. is an important problem that all middleware needs to solve.
For traditional website-type traffic, the release of service applications is typically divided into three steps of traffic removal, application update, and traffic redistribution. In the process of application publishing, in order to ensure that the service is lossless, the request to the publishing node can be reduced by updating the downstream server list of the gateway. However, the method has three obvious problems that 1, the gateway node is strongly depended on, the centralization and non-real-time problems exist, 2, the manual operation is needed, the risk is high, the maintenance cost is high, and 3, when the service is stopped, the arrived request cannot be processed, and the request fails.
For example, for a remote service invocation (Remote Procedure Call, abbreviated as RPC) based service framework, the service automatic registration and discovery mechanism is a necessary function, and the registration and discovery process needs to update the directory service, and for an oversized cluster, it is difficult to synchronize the offline of one service to clients corresponding to all service subscribers in real time. However, already offline services remain "available" to subscribers of these unexplored service listings. Thus, service providers that are not actually available are still requested. While the RPC framework provides a fault tolerant mechanism, the status of these requests is virtually agnostic: whether or not the service provider has been reached? but not return a response? and there is also a great risk to the consistency of the service.
Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and features in the embodiments may be combined with each other.
In order to solve the above-mentioned problems in the prior art, the embodiment provides a service providing method, and specifically, an execution body of the method may be a server, and those skilled in the art will understand that the server may be implemented as software or a combination of software and hardware. Specifically, the method may include:
S101, when the working state of a target application provided by a server is changed, at least one service consumption object communicated with the server is obtained.
Wherein a server is a device for providing service applications to the outside, corresponding to a service provider, it is understood that one server may provide one or more service applications to the outside, and a target application may be any one of the one or more service applications. The service consumption object may refer to an apparatus or device for applying, consuming, or a service application provided by a server, for example, the service consumption object may be an application program provided for a user to apply a certain service application, or the service consumption object may be a terminal device provided for a user to apply a certain service application, or the service consumption object may also be a server provided for a user to apply a certain service application.
When the server provides the target application, the server can adjust or control the working state of the provided target application, the working state of the target application can comprise a normal state and an off-line/stop working state, and when the server adjusts the working state of the target application, the working state of the target application can be changed. For example, when the current working state of the target application provided by the server is a normal state, the current working state of the target application can be adjusted to be an offline/stop working state by the server, so that the working state of the target application is changed, and the changing operation at the moment is an offline operation. Similarly, when the current working state of the target application is an offline/stop working state, the current working state of the target application can be adjusted to a normal working state by the server, so that the working state of the target application is changed, and the changing operation at the moment is the online operation.
It can be understood that the situation that the working state of the target application is changed is not limited to the above-mentioned illustration, and those skilled in the art may also set the situation according to specific application scenarios and application requirements, for example, the situation that the working state of the target application is changed may also include that the working state of the target application is adjusted from the first normal state to the second normal state, and so on, which will not be described herein.
Specifically, when it is determined that the working state of the target application provided by the server is changed, in order to enable the server to timely notify the working state of the target application to a service consumption object related to the target application, the service consumption object may be a part of service consumption objects or may be all service consumption objects, and at least one service consumption object in communication with the server may be obtained, where the service consumption object is a service consumer who invokes the target application. Specifically, the specific acquisition mode of the service consumption object is not limited, and a person skilled in the art can set the specific acquisition mode according to specific application requirements, for example, service consumption object information which is communicated with the server is stored on the server, and at least one service consumption object which is communicated with the server can be determined by acquiring the service consumption object information. Of course, those skilled in the art may acquire the service consumption object in other manners, so long as the accuracy and reliability of acquiring the service consumption object can be ensured, which is not described herein.
And S102, sending notification information for identifying the working state of the target application to the service consumption object so that the service consumption object adjusts the target application according to the notification information.
After obtaining at least one service consumption object in communication with the server, in order to enable the service consumption object to know in time that the working state of the target application has changed, specifically, the server may send notification information directly/actively to the service consumption object (the service consumption object may be a part of service consumption objects or may be all service consumption objects), where the notification information is used to identify that the working state of the target application has changed, so that the service consumption object may adjust the target application according to the notification information, for example, when the working change state of the target application is in a offline state, the service consumption object may mask the target application according to the notification information, so that the service consumption object may not make a data processing request based on the target application. When the work change state of the target application is an online state, the service consumption object can release the shielding operation on the target application according to the notification information, so that the service consumption object can make a data processing request based on the target application.
Further, in order to improve the accuracy and reliability of the method, after the at least one service consumption object in communication with the server is acquired, a target service consumption object corresponding to the target application may be further determined in the at least one service consumption object through a correspondence relationship between the server and the target application. Specifically, when the server and the target application are in a one-to-one correspondence, that is, the server only provides one target application to the outside and does not provide other service applications to the outside, at this time, at least one service consumption object in communication with the server may be directly determined as a target service consumption object corresponding to the target application. When the server and the target application are in a one-to-many correspondence, that is, the server not only provides one target application but also provides other service applications to the outside, at this time, the target service consumption object corresponding to the target application is at least a part of at least one service consumption object in communication with the server, specifically, an application identifier of the target application may be obtained, at least one service consumption object is screened by the application identifier, and the service consumption object corresponding to the application identifier is determined as the target service consumption object corresponding to the target application. After the target service consumption object corresponding to the target application is obtained, notification information for identifying the working state of the target application can be sent to the target service consumption object, so that the target service consumption object adjusts the target application according to the notification information, the notification information is effectively sent in a targeted manner, data transmission resources are saved, the service consumption object can timely acquire the working state of the target application, the adjustment can be timely performed according to the working state of the target application, and the stability and the reliability of data processing are guaranteed.
According to the service providing method provided by the embodiment, when the working state of the target application provided by the server is changed, at least one service consumption object communicated with the server is obtained, and then the notification information for identifying the working state of the target application is sent to the service consumption object, so that the service consumption object can adjust the target application according to the notification information, the service consumption object can timely and quickly sense the working state of the target application, further, service damage can be guaranteed as much as possible in the updating process of the target application, the situation that a data processing request fails or overtime is avoided when the target application is in an unavailable state, the availability and stability of the target application are guaranteed, the practicability of the method is further improved, and the popularization and application of a market are facilitated.
Fig. 2 is a flowchart of a second service providing method according to an embodiment of the present invention, and based on the foregoing embodiment, with continued reference to fig. 2, before the working state of the target application provided by the server is changed, the method in this embodiment may further include:
s001, acquiring a state change instruction sent by the service management platform, wherein the state change instruction comprises an application identifier of the target application.
The state change instruction comprises an application offline instruction and an application online instruction, wherein the application offline instruction is used for adjusting the working state of the target application from a normal working state to an offline/stop working state, and the application online instruction is used for adjusting the working state of the target application from the offline/stop working state to the normal working state. Specifically, a user may adjust/change the working state of the target application provided in the server through the service management platform, for example, the user may input an execution operation to the service management platform, the service management platform generates a state change instruction through the execution operation input by the user, where the state change instruction includes an application identifier of the target application, and the service management platform may send the state change instruction to the server, so that the server may obtain the state change instruction sent by the service management platform.
And S002, determining a target application corresponding to the application identifier in the plurality of applications, and adjusting the working state of the target application based on the state change instruction.
Since the server may provide one or more service applications, after the server obtains the state change instruction, the target application may be determined from the plurality of applications according to the application identifier included in the state change instruction, and after the target application is determined, the working state of the target application may be adjusted based on the state change instruction. Specifically, a manner in which the working state of the target application can be adjusted based on the state change instruction includes:
s0021, adjusting the working state of the target application to be a down state based on the application down instruction.
Specifically, when the state change instruction includes an application offline instruction, the working state of the target application can be adjusted from a normal working state to an offline state (offline state, stop working state) and the like based on the application offline instruction, so that the stable and effective adjustment of the working state of the target application is realized, and the flexible and reliable use of the method is ensured.
Or yet another way in which the adjustment of the operating state of the target application based on the state change instruction may be implemented includes:
s0022, adjusting the working state of the target application to be an online state based on the application online instruction.
Specifically, when the state change instruction includes an application online instruction, the working state of the target application can be adjusted from a offline state to an online state (normal working state) based on the application online instruction, so that the stable and effective adjustment of the working state of the target application is realized, and the flexible and reliable use of the method is ensured.
Further, in order to improve the stability and reliability of the use of the method, the method in this embodiment may further include:
And S003, after the working state of the target application is changed, sending change feedback information of the target application to the service management platform.
Specifically, after the server adjusts the working state of the target application based on the state change instruction, the working state of the target application may be changed according to the state change instruction, so that the service management platform may timely learn information of the target application in the server after determining that the working state of the target application has been changed, the server may send, to the service management platform, change feedback information corresponding to the target application, where the change feedback information is used to inform the service management platform whether the state change operation of the target application is successful, where the change feedback information may be information for identifying that the change operation is successful when the state change operation of the target application is successful, and where the change feedback information may be information for identifying that the change operation is failed when the state change operation of the target application is failed.
In the embodiment, the working state of the target application is conveniently adjusted based on the requirement of the user by acquiring the state change instruction sent by the service management platform and adjusting the working state of the target application based on the state change instruction, so that the use requirement of the user is met, the use flexibility and reliability of the method are improved, and the practicability of the method is further ensured.
Further, since the situation that the working state of the target application is changed may include a situation that the target application is on line and a situation that the target application is off line, and different situations may correspond to different notification information, one way that the service consumption object can send the notification information for identifying the working state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information includes:
and S1021, sending first notification information for identifying that the working state of the target application is in a offline state to the service consumption object, so that the service consumption object shields the target application according to the first notification information.
Specifically, when the working state of the target application is changed and the working state of the target application is adjusted to be in a offline state, in order to enable the service consumption object to know that the working state of the target application is adjusted to be in a offline state in time, the server can send first notification information to the service consumption object, where the first notification information is used to identify that the working state of the target application is in a offline state, so that the service consumption object can shield the target application according to the received first notification information, that is, the service consumption object can not send a data processing request based on the target application any more, further the problem that in the prior art, the service availability is reduced because the provider is already in a service unavailable state, and the usability of the target application is ensured is effectively solved.
Or another way of sending notification information for identifying the working state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information, includes:
and S1022, sending second notification information for identifying that the working state of the target application is the up state to the service consumption object, so that the service consumption object can cancel shielding the target application according to the second notification information.
Specifically, when the working state of the target application is changed and the working state of the target application is adjusted to be in an on-line state, in order to enable the service consumption object to know that the working state of the target application is adjusted to be in an on-line state in time, the server can send second notification information to the service consumption object, wherein the second notification information is used for identifying that the working state of the target application is in an on-line state, so that the service consumption object can cancel the shielding target application according to the received second notification information, namely, the service consumption object can send a data processing request based on the target application, further the problem that in the prior art, the service availability is reduced because the provider is in an unavailable service state, and the availability of the target application is ensured.
Fig. 3 is a flowchart III of a service providing method according to an embodiment of the present invention, and, based on any one of the foregoing embodiments, with continued reference to fig. 3, in order to improve the stability and reliability of use of the method, the method in this embodiment may further include:
s201, receiving a data processing request sent by a service consumption object aiming at a target application.
And S202, performing data processing operation based on the target application and the data processing request, and obtaining a processing result corresponding to the data processing request.
And S203, sending the processing result to the service consumption object.
Specifically, before the service consumption object does not mask the target application, the service consumption object may send a data processing request to the server for the target application, and when the service consumption object has masked the target application, the service consumption object may not send a data processing request to the server for the target application. It should be noted that before the service consumption object does not mask the target application, the following situations may be included, namely, a, the working state of the target application is in an on-line state, b, the working state of the target application is being changed from the on-line state to the off-line state, and c, the working state of the target application is already changed to the off-line state, but the service consumption object does not mask the target application.
When the server receives a data processing request sent by a service consumption object aiming at a target application, in order to ensure the availability of the target application and the quality of data processing, the server can perform corresponding data processing operation through the target application and the data processing request, can obtain a processing result corresponding to the data processing request, and after the processing result is obtained, the server can send the processing result to the service consumption object, so that the service consumption object can obtain the processing result corresponding to the data processing request, and further the quality and reliability of data processing are effectively improved.
It should be noted that, whether the service consumption object masks the target application or not, the server may send information to the service consumption object, but when the service consumption object masks the target application, the service consumption object cannot send a data processing request to the server for the target application, and when the service consumption object cancels the target application, the service consumption object may send the data processing request to the server for the target application.
In order to solve the above-mentioned problems in the prior art, the embodiment provides a service consumption method, specifically, an execution subject of the method may be a service consumption device, and those skilled in the art will understand that the service consumption device may be implemented as software or a combination of software and hardware. Specifically, the method may include:
And S301, when the working state of the target application provided by the server is changed, receiving notification information which is sent by the server and is used for identifying the working state of the target application.
The change of the working state of the target application comprises the change of the working state of the target application to a offline state and the change of the working state of the target application to an online state; when the change of the operating state of the target application includes the change of the operating state of the target application to the offline state, the notification information may include first notification information for identifying that the operating state of the target application is the offline state. When the change of the operating state of the target application includes the change of the operating state of the target application to the online state, the notification information may include second notification information for identifying that the operating state of the target application is online.
It can be understood that the situation that the working state of the target application is changed is not limited to the above-mentioned illustration, and those skilled in the art may also set the situation according to specific application scenarios and application requirements, for example, the situation that the working state of the target application is changed may also include that the working state of the target application is adjusted from the first normal state to the second normal state, and so on, which will not be described herein. Correspondingly, the notification information is not limited to the first notification information and the second notification information, and may further include third notification information for identifying that the working state of the target application is adjusted from the first normal state to the second normal state, and the like, which are not described herein.
When the working state of the target application provided by the server is changed, the server can send notification information for identifying the working state of the target application to the service consumption device, so that the service consumption device can receive the notification information sent by the server.
And S302, adjusting the target application according to the notification information so as to perform application based on the adjusted target application.
After the notification information is acquired, the service consumption device can adjust the notification information to the target application, so that the situation that the service availability is reduced due to failure or timeout of the request because the provider is in the service unavailable state is avoided. Wherein, since the notification information may include the first notification information and the second notification information, and different notification information may perform different adjustment operations on the target application, specifically, when the notification information includes the first notification information for identifying that the working state of the target application is the offline state, adjusting the target application according to the notification information may include:
s3021, shielding the target application according to the first notification information.
Since the first notification information is used for identifying that the working state of the target application is in the down state, in this case, in order to avoid a situation that the service availability is reduced due to failure or timeout of the request because the target application is already in the service unavailable state, the service consumption device may mask the target application according to the first notification information, so that the service consumption device may not make a data processing request based on the target application.
It may be appreciated that, after the target application is masked according to the first notification information, the method in this embodiment may further include:
And S3022, sending first response information corresponding to the first notification information to the server, wherein the first response information is used for identifying that the service consumption device shields the target application.
Specifically, after the service consumption device masks the target application according to the first notification information, the target application has been identified as an unavailable state to the service consumption device. At this time, in order to enable the server to timely know the adjustment status information of the service consumption device on the target application, the service consumption device may send first response information corresponding to the first notification information to the server, where the first response information is used to inform the server that the service consumption device has shielded the target application, that is, for the service consumption device, it is not possible to send a data processing request to the server based on the target application, so that occurrence of an invalid or failed data processing request is effectively avoided, and the server can timely sense the status information of the service consumption device on the target application, so that the stability and reliability of use of the method are ensured.
In addition, when the notification information includes second notification information for identifying that the operation state of the target application is an up state, adjusting the target application according to the notification information may include:
and S3023, canceling the shielding target application according to the second notification information.
Since the second notification information is used for identifying that the working state of the target application is the up state, in order to ensure the data processing quality and efficiency of the target application, the service consumption device can cancel the shielding target application according to the second notification information, so that the service consumption device can make a data processing request based on the target application.
It may be appreciated that, after the target application is unmasked according to the second notification information, the method in this embodiment may further include:
and S3024, sending second response information corresponding to the second notification information to the server, wherein the second response information is used for identifying that the service consumption device has cancelled the shielding target application.
Specifically, after the service consumption device unmasked the target application according to the second notification information, the target application has been identified as an available state to the service consumption device. At this time, in order to enable the server to timely know the adjustment state information of the service consumption device to the target application, the service consumption device may send second response information corresponding to the second notification information to the server, where the second response information is used to inform the server that the service consumption device has cancelled shielding the target application, that is, for the service consumption device, the service consumption device may send a data processing request to the server again based on the target application, so as to effectively ensure quality and efficiency of data processing, and enable the server to timely sense the state information of the service consumption device to the target application, and ensure stability and reliability of use of the method.
According to the service consumption method, when the working state of the target application provided by the server is changed, the notification information for identifying the working state of the target application is sent by the server, and then the target application is adjusted according to the notification information, so that the service consumption device can not send a data processing request to the server based on the target application when the working state of the target application is in a down state, and the invalid or failed data processing request can be effectively avoided, and when the working state of the target application is in an up state, the service consumption device can send the data processing request to the service based on the target application, so that the quality and efficiency of data processing are guaranteed, the practicability of the method is further improved, and the popularization and the application of the market are facilitated.
Fig. 5 is a second flowchart of another service consumption method according to an embodiment of the present invention, where, based on the foregoing embodiment, with continued reference to fig. 5, the method in this embodiment may further include:
And S401, before the target application is shielded according to the first notification information, sending a data processing request for the target application to a server.
S402, receiving a processing result corresponding to the data processing request sent by the server.
In particular, the service consumption device may send a data processing request to the server for the target application before the service consumption device does not mask the target application, whereas the service consumption device may not send a data processing request to the server for the target application when the service consumption device has masked the target application. It should be noted that before the service consumption device does not mask the target application, the service consumption device may include a cases where the working state of the target application is in an on-line state, b where the working state of the target application is being changed from an on-line state to an off-line state, and c where the working state of the target application has been changed to an off-line state, but the service consumption device does not mask the target application.
When the server receives a data processing request sent by the service consumption device for the target application, in order to ensure the availability of the target application and the quality of data processing, the server can perform corresponding data processing operation through the target application and the data processing request, can obtain a processing result corresponding to the data processing request, and after the processing result is obtained, the server can send the processing result to the service consumption device, so that the service consumption device can receive the processing result corresponding to the data processing request sent by the server, and further the quality and reliability of data processing are effectively improved.
It should be noted that, whether the service consumption device masks the target application or not, the service consumption device may receive the information sent by the server, but only when the service consumption device masks the target application, the service consumption device cannot send a data processing request to the server for the target application, and when the service consumption device cancels the target application, the service consumption device may send the data processing request to the server for the target application.
When the service providing method is executed by the server and the service consumption device, the application (service corresponding to the application) can be ensured to be lossless as much as possible in the process of updating or offline of the application. Specifically, the method comprises an elegant online process and an elegant offline process, wherein the elegant online process refers to no request abnormality in the online process of the service application, and the elegant offline process refers to no request abnormality in the offline process of the service application.
Referring to fig. 6, the graceful offline process includes the steps of:
Step 1, a user performs service offline operation on a service management platform 601, the service management platform 601 generates a control instruction for stopping service and can send the control instruction to a server corresponding to a service provider 602;
step 2, after receiving the control instruction, the server corresponding to the service provider 602 may perform the offline operation on the target application corresponding to the server, and actively send the offline notification to the service consumption devices corresponding to all the service consumers 603 connected to the target application.
And 3, after the service consumption device receives the offline notification, the offline target application can be shielded according to the offline notification.
And 4, after the offline target application is shielded according to the offline notification, the service consumption device sends response information of the offline notification to the server, wherein the response information is used for identifying the target application of which the service consumption device is shielded from offline.
And 5, for the data processing requests which have arrived at the server, the server waits for the data processing requests to be processed, obtains processing results corresponding to the data processing requests, avoids request failure, and can send the processing results to the service consumption device.
And step 6, the service consumption device can receive the processing result sent by the server, namely, the service consumption device waits for the processing of the data processing request which reaches the server, the shielding operation of the service consumption device on the target application is only one-way shielding, and the response of the data processing request is not influenced.
And 7, stopping the target application by the server after all the in-transit data processing requests are processed.
Step 8, the server sends notice information of successful service stopping to the service management platform 601, and at this time, the service consumption device does not send a data processing request based on the target application of the shielding.
In addition, referring to fig. 7, the graceful online process includes the steps of:
step 11, a user performs service online operation on the service management platform 701, and the service management platform 701 generates a control instruction of service online and can send the control instruction to a server corresponding to the service provider 702;
Step 12, after receiving the control instruction, the server may perform a re-online operation on the target application, and notify all the service consumption devices corresponding to the service consumers 703 to send an online notification, so that the service consumption devices re-enable the service;
and step 13, after the service consumption device receives the online notification, the target application can be added to a preset available provider list.
At step 14, the service consumption device may make a normal data processing request based on the target application and may forward the data processing request to the target application.
Step 15, after adding the target application to the preset available provider list, the service consumption device may send response information of the online notification to the server, so that the server may learn that the service consumption device has added the target application to the preset available provider list.
Step 16, the server sends notification information of successful service online to the service management platform 701, and at this time, the service consumption device may send a data processing request based on the target application.
The service providing method provided by the application embodiment effectively realizes (1) that a bidirectional communication mode is provided in an RPC framework, and a realization server on the basis can actively inform a service consumption device of performing shielding operation, and the data processing request of a subsequent service consumption device is prevented from reaching the server by actively sending the shielding notification, so that the problem that traffic is continuously entered when a target application is off line, and the process is stopped when the request cannot be processed is solved. (2) Real-time performance and stability are ensured by means of active notification and point-to-point combined notification, so that the situation that a service consumption device cannot be notified in real time due to a directory service-based offline mechanism in the prior art is avoided. (3) The process is fully automatic, the centering is realized, manual operation is not needed, and time and labor are saved. (4) The method has the advantages that the method realizes the notification process of elegant online and offline, ensures the maximum effort delivery, improves the reliability of distributed service, reduces the error rate of requests, and can carry out notification in real time, obviously reduce the update speed of target application, reduce the start-stop speed of the target application from 45 seconds to 5 seconds before according to the existing data, and further improve the update quality and efficiency of the target application.
It should be noted that, in this embodiment, the method of providing or consuming a service may be performed by a service consumption device instead of using the above-mentioned two-way communication mechanism, and the service consumption device may determine whether the target application (service) is available through a continuous short polling or long polling server, that is, detect whether the target application is offline in time, where the service consumption device may mask the target application when the target application is unavailable, and may cancel the masking of the target application when the target application is available. This approach, while having a large performance penalty, has a similar effect to that of the implementation described above.
Fig. 8 is a schematic structural diagram of a service providing apparatus according to an embodiment of the present invention, and referring to fig. 8, this embodiment provides a service providing apparatus, which may perform the above-mentioned service providing method, and specifically, the service providing apparatus may include:
an obtaining module 11, configured to obtain at least one service consumption object in communication with the server when the working state of the target application provided by the server is changed;
The first processing module 12 is configured to send notification information for identifying an operating state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information.
Optionally, before the working state of the target application provided by the server is changed, the obtaining module 11 and the first processing module 12 in this embodiment may be further configured to perform the following steps:
the acquiring module 11 is configured to acquire a state change instruction sent by the service management platform, where the state change instruction includes an application identifier of the target application;
the first processing module 12 is configured to determine a target application corresponding to the application identifier from among the plurality of applications, and adjust an operating state of the target application based on the state change instruction.
Optionally, the state change instruction includes an application offline instruction, and when the first processing module 12 adjusts the working state of the target application based on the state change instruction, the first processing module 12 may be configured to execute to adjust the working state of the target application to the offline state based on the application offline instruction.
Optionally, when the first processing module 12 sends notification information for identifying the working state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information, the first processing module 12 may be configured to send first notification information for identifying that the working state of the target application is in the offline state to the service consumption object, so that the service consumption object masks the target application according to the first notification information.
Optionally, the state change instruction includes an application online instruction, and when the first processing module 12 adjusts the working state of the target application based on the state change instruction, the first processing module 12 may be configured to execute to adjust the working state of the target application to an online state based on the application online instruction.
Optionally, when the first processing module 12 sends notification information for identifying the working state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information, the first processing module 12 may be configured to send second notification information for identifying that the working state of the target application is in an up state to the service consumption object, so that the service consumption object unmasked the target application according to the second notification information.
Optionally, the first processing module 12 in this embodiment may be further configured to send change feedback information of the target application to the service management platform after the working state of the target application is changed.
Optionally, the first processing module 12 in this embodiment may be further configured to receive a data processing request sent by the service consumption object for the target application, perform a data processing operation based on the target application and the data processing request, obtain a processing result corresponding to the data processing request, and send the processing result to the service consumption object.
The apparatus shown in fig. 8 may perform the method of the embodiment shown in fig. 1-3 and fig. 6-7, and reference is made to the relevant description of the embodiment shown in fig. 1-3 and fig. 6-7 for parts of this embodiment not described in detail. The implementation process and technical effects of this technical solution are described in the embodiments shown in fig. 1 to 3 and fig. 6 to 7, and are not described herein.
In one possible design, the service providing apparatus shown in fig. 8 may be implemented as an electronic device, which may be a desktop computer, a server, or other devices. As shown in fig. 9, the electronic device may include a first processor 21 and a first memory 22. The first memory 22 is used for storing a program for supporting the electronic device to execute the service providing method provided in the embodiments shown in fig. 1 to 3 and fig. 6 to 7, and the first processor 21 is configured to execute the program stored in the first memory 22.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the first processor 21, are capable of performing the steps of:
When the working state of a target application provided by a server is changed, acquiring at least one service consumption object communicated with the server;
And sending notification information for identifying the working state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information.
Optionally, the first processor 21 is configured to perform all or part of the steps in the embodiments shown in fig. 1-3 and fig. 6-7.
The electronic device may further include a first communication interface 23 in a structure for the electronic device to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium, which is used for storing computer software instructions for an electronic device, and includes a program for executing the service providing method in the method embodiments shown in fig. 1 to 3 and fig. 6 to 7.
Fig. 10 is a schematic structural diagram of a service consumption device according to an embodiment of the present invention, and referring to fig. 10, this embodiment provides a service consumption device, which may execute the above-mentioned service consumption method, and specifically, the service consumption device may include:
The receiving module 31 is configured to receive notification information sent by the server and used for identifying the working state of the target application when the working state of the target application provided by the server is changed;
the second processing module 32 is configured to adjust the target application according to the notification information, so as to apply based on the adjusted target application.
Optionally, the change of the working state of the target application includes the change of the working state of the target application to the offline state, and the notification information includes first notification information for identifying that the working state of the target application is the offline state.
Alternatively, the second processing module 32 may be configured to perform masking of the target application based on the first notification information when the second processing module 32 adjusts the target application based on the notification information.
Optionally, after masking the target application according to the first notification information, the second processing module 32 in this embodiment may be further configured to send first response information corresponding to the first notification information to the server, the first response information being configured to identify that the service consumption device has masked the target application.
Optionally, the change of the working state of the target application includes changing the working state of the target application to an online state, and the notification information includes second notification information for identifying that the working state of the target application is online.
Alternatively, the second processing module 32 may be configured to perform the unmasking of the target application based on the second notification information when the second processing module 32 adjusts the target application based on the notification information.
Optionally, the second processing module 32 in this embodiment may be further configured to send second response information corresponding to the second notification information to the server after the unmasking the target application according to the second notification information, the second response information being configured to identify that the service consumption apparatus has unmasked the target application.
Alternatively, the second processing module 32 in this embodiment may be further configured to send a data processing request for the target application to the server before masking the target application according to the first notification information, and receive a processing result corresponding to the data processing request sent by the server.
The service consumption device shown in fig. 10 may perform the method of the embodiment shown in fig. 4 to 7, and for parts of this embodiment not described in detail, reference is made to the relevant description of the embodiment shown in fig. 4 to 7. The implementation process and the technical effect of this technical solution are described in the embodiments shown in fig. 4 to 7, and are not described herein.
In one possible design, the service consumption apparatus shown in fig. 10 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, or other devices. As shown in fig. 11, the electronic device may include a second processor 41 and a second memory 42. The second memory 42 is used for storing a program for supporting the electronic device to execute the service consumption method provided in the embodiment shown in fig. 4 to 7 described above, and the second processor 41 is configured to execute the program stored in the second memory 42.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the second processor 41, are capable of performing the steps of:
when the working state of the target application provided by the server is changed, receiving notification information which is sent by the server and is used for identifying the working state of the target application;
and adjusting the target application according to the notification information so as to apply based on the adjusted target application.
Optionally, the second processor 41 is configured to perform all or part of the steps in the embodiments shown in fig. 4-7 described above.
The electronic device may further include a second communication interface 43 in the structure of the electronic device, for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, where the computer storage medium includes a program for executing the service consumption method according to the above-described method embodiments shown in fig. 4 to fig. 7.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by adding necessary general purpose hardware platforms, or may be implemented by a combination of hardware and software. Based on such understanding, the foregoing aspects, in essence and portions contributing to the art, may be embodied in the form of a computer program product, which may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transitory medi a), such as modulated data signals and carrier waves.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present invention.

Claims (15)

1. A service providing method, comprising:
when the working state of a target application provided by a server is changed, acquiring at least one service consumption object communicated with the server;
Sending notification information for identifying the working state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information;
The sending notification information for identifying the working state of the target application to the service consumption object so that the service consumption object adjusts the target application according to the notification information comprises the steps of sending first notification information for identifying that the working state of the target application is in a offline state to the service consumption object so that the service consumption object shields the target application according to the first notification information;
The method comprises the steps of receiving a data processing request sent by a service consumption object for a target application before shielding the target application according to first notification information, carrying out data processing operation based on the target application and the data processing request to obtain a processing result corresponding to the data processing request, and sending the processing result to the service consumption object, wherein the processing result is sent to the service consumption object, and the data processing request which has arrived at a server waits for the data processing request to be processed, and the processing result corresponding to the data processing request is obtained.
2. The method of claim 1, wherein prior to the change in the operational state of the server-provided target application, the method further comprises:
Acquiring a state change instruction sent by a service management platform, wherein the state change instruction comprises an application identifier of the target application;
and determining a target application corresponding to the application identifier in a plurality of applications, and adjusting the working state of the target application based on the state change instruction.
3. The method of claim 2, wherein the state change instruction comprises an application offline instruction, wherein adjusting the operational state of the target application based on the state change instruction comprises:
and adjusting the working state of the target application to be a offline state based on the application offline instruction.
4. The method of claim 2, wherein the state change instruction comprises an application online instruction, and wherein adjusting the operational state of the target application based on the state change instruction comprises:
And adjusting the working state of the target application to be an online state based on the application online instruction.
5. The method of claim 4, wherein sending notification information to the service consumption object identifying an operational state of the target application, such that the service consumption object adjusts the target application according to the notification information, comprises:
And sending second notification information for identifying that the working state of the target application is an up state to the service consumption object, so that the service consumption object unmasked the target application according to the second notification information.
6. The method according to any one of claims 2-5, further comprising:
and after the working state of the target application is changed, sending change feedback information of the target application to the service management platform.
7. A method of service consumption, comprising:
When the working state of a target application provided by a server is changed, receiving notification information which is sent by the server and is used for identifying the working state of the target application;
Adjusting the target application according to the notification information so as to apply based on the adjusted target application;
The method comprises the steps of receiving notification information, wherein the change of the working state of a target application comprises the change of the working state of the target application into a offline state, the notification information comprises first notification information for identifying the working state of the target application as the offline state, and the adjustment of the target application according to the notification information comprises the steps of shielding the target application according to the first notification information;
and receiving a processing result corresponding to the data processing request sent by the server, wherein the data processing request which has arrived at the server waits for the data processing request to be processed, and receives the processing result corresponding to the data processing request.
8. The method of claim 7, wherein after masking the target application according to the first notification information, the method further comprises:
And sending first response information corresponding to the first notification information to the server, wherein the first response information is used for identifying that the service consumption device shields the target application.
9. The method of claim 7, wherein the change in the operating state of the target application includes a change in the operating state of the target application to an on-line state, and wherein the notification information includes second notification information identifying that the operating state of the target application is an on-line state.
10. The method of claim 9, wherein adjusting the target application based on the notification information comprises:
And canceling shielding of the target application according to the second notification information.
11. The method of claim 10, wherein after unmasking the target application according to the second notification information, the method further comprises:
and sending second response information corresponding to the second notification information to the server, wherein the second response information is used for identifying that the service consumption device unmasked the target application.
12. A service providing apparatus, comprising:
The acquisition module is used for acquiring at least one service consumption object communicated with the server when the working state of the target application provided by the server is changed;
The system comprises a first processing module, a service consumption object, a server and a data processing request, wherein the first processing module is used for sending notification information for identifying the working state of the target application to the service consumption object, so that the service consumption object adjusts the target application according to the notification information, and particularly is used for sending first notification information for identifying the working state of the target application to the service consumption object to be in a offline state, so that the service consumption object shields the target application according to the first notification information, and before shielding the target application according to the first notification information, the data processing request sent by the service consumption object for the target application is received, data processing operation is carried out based on the target application and the data processing request, a processing result corresponding to the data processing request is obtained, the processing result is sent to the service consumption object, and the data processing request is waited for being processed after the data processing request of a server is arrived, and the processing result corresponding to the data processing request is obtained.
13. An electronic device comprising a memory, a processor, wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions when executed by the processor implement the service providing method of any of claims 1-6.
14. A service consumption device, comprising:
the receiving module is used for receiving notification information which is sent by the server and used for identifying the working state of the target application when the working state of the target application provided by the server is changed;
The system comprises a first processing module, a second processing module and a server, wherein the first processing module is used for adjusting the target application according to the notification information, the second processing module is used for adjusting the target application according to the notification information, the change of the working state of the target application comprises the change of the working state of the target application to the off-line state, the notification information comprises first notification information used for identifying the working state of the target application to be the off-line state, the adjustment of the target application according to the notification information comprises the steps of shielding the target application according to the first notification information, sending a data processing request for the target application to the server before the target application is shielded according to the first notification information, receiving a processing result corresponding to the data processing request sent by the server, and waiting for the data processing request which reaches the server to be processed, and receiving the processing result corresponding to the data processing request.
15. An electronic device comprising a memory, a processor, wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions when executed by the processor implement the service consumption method of any of claims 7-11.
CN201911369184.8A 2019-12-26 2019-12-26 Service providing method, service consumption method, device and equipment Active CN113055415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911369184.8A CN113055415B (en) 2019-12-26 2019-12-26 Service providing method, service consumption method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911369184.8A CN113055415B (en) 2019-12-26 2019-12-26 Service providing method, service consumption method, device and equipment

Publications (2)

Publication Number Publication Date
CN113055415A CN113055415A (en) 2021-06-29
CN113055415B true CN113055415B (en) 2024-12-03

Family

ID=76505562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911369184.8A Active CN113055415B (en) 2019-12-26 2019-12-26 Service providing method, service consumption method, device and equipment

Country Status (1)

Country Link
CN (1) CN113055415B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420220B (en) * 2021-06-30 2022-04-05 杭州海康威视数字技术股份有限公司 Service recommendation method and device, server and terminal
CN115604342B (en) * 2022-09-29 2024-04-16 重庆长安汽车股份有限公司 Data processing method, server, computer readable storage medium
CN119854357B (en) * 2025-01-10 2025-10-31 重庆长安科技有限责任公司 Service state notification method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291446A (en) * 2003-10-23 2011-12-21 微软公司 Flexible architecture for notifying applications of state changes
CN103516746A (en) * 2012-06-26 2014-01-15 中兴通讯股份有限公司 Method for pushing service change information, device and system thereof

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7913105B1 (en) * 2006-09-29 2011-03-22 Symantec Operating Corporation High availability cluster with notification of resource state changes
CN101237335B (en) * 2007-02-02 2011-03-09 阿里巴巴集团控股有限公司 Method and system for real time notifying event status change
US8407776B2 (en) * 2011-02-11 2013-03-26 Good Technology Corporation Method, apparatus and system for provisioning a push notification session
CN103685396B (en) * 2012-09-14 2017-04-19 北京神州泰岳软件股份有限公司 Method and system for realizing message pushing
JP6045973B2 (en) * 2012-11-19 2016-12-14 株式会社Nttドコモ Information processing apparatus, status notification method, and status notification program
CN103235686A (en) * 2013-03-29 2013-08-07 北京智谷睿拓技术服务有限公司 Application management method and device
CN105208047B (en) * 2014-05-29 2018-12-14 阿里巴巴集团控股有限公司 Inserting method and server on distribution system services device
US9924017B2 (en) * 2015-05-28 2018-03-20 Livio, Inc. Methods and systems for a vehicle computing system to launch an application
US20180077681A1 (en) * 2016-09-15 2018-03-15 Huawei Technologies Co., Ltd. Method and apparatus for paging an application on a user equipment
CN106921733B (en) * 2017-02-08 2020-08-14 阿里巴巴集团控股有限公司 Cluster notification pushing method and device and electronic equipment
US10275235B2 (en) * 2017-09-18 2019-04-30 International Business Machines Corporation Adaptable management of web application state in a micro-service architecture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291446A (en) * 2003-10-23 2011-12-21 微软公司 Flexible architecture for notifying applications of state changes
CN103516746A (en) * 2012-06-26 2014-01-15 中兴通讯股份有限公司 Method for pushing service change information, device and system thereof

Also Published As

Publication number Publication date
CN113055415A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
US9912538B2 (en) Synchronization of configuration file of virtual application distribution chassis
US10802906B2 (en) Monitoring method and apparatus of server, and storage medium
CN112351051B (en) Cloud service processing method, device, cloud server, system and storage medium
CN113055415B (en) Service providing method, service consumption method, device and equipment
EP3703337B1 (en) Mobile edge host-machine service notification method and apparatus
GB2407887A (en) Automatically modifying fail-over configuration of back-up devices
US9413851B2 (en) Information processing system, information processing device, client terminal, and computer readable medium
CN110557357A (en) A remote procedure call protocol adaptive method, related device and server
CN114189525B (en) Service request method and device and electronic equipment
CN112398689B (en) Network recovery method and device, storage medium and electronic equipment
US11658870B2 (en) Method and apparatus for restoring network device to factory defaults, and network device
CN111414247A (en) Server switching method, device, management node and storage medium
US8977595B1 (en) Message-recovery file log locating and monitoring
US20110264777A1 (en) Communications device and method
CN111240760B (en) Application publishing method, system, storage medium and equipment based on registry
US9819732B2 (en) Methods for centralized management API service across disparate storage platforms and devices thereof
WO2020252724A1 (en) Log processing method and device, and computer-readable storage medium
CN110995829A (en) Instance calling method and device and computer storage medium
US12120203B2 (en) UDP message distribution method, UDP message distribution apparatus, electronic device and computer readable storage medium
CN113535402A (en) Load balancing processing method and device based on 5G MEC and electronic equipment
KR101883671B1 (en) Method and management server for dtitributing node
US11757984B2 (en) Processing communication sessions
CN116455963A (en) Cluster node registration method, medium, device and computing equipment
US11757987B2 (en) Load balancing systems and methods
CN114968636A (en) A method and device for troubleshooting

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