CN106656622B - Method and device for configuring interface calling task - Google Patents
Method and device for configuring interface calling task Download PDFInfo
- Publication number
- CN106656622B CN106656622B CN201611266513.2A CN201611266513A CN106656622B CN 106656622 B CN106656622 B CN 106656622B CN 201611266513 A CN201611266513 A CN 201611266513A CN 106656622 B CN106656622 B CN 106656622B
- Authority
- CN
- China
- Prior art keywords
- interface
- task
- interceptor
- configurator
- logic
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method for configuring an interface calling task, which comprises the following steps: when the server detects that the client triggers the current service logic of the target interface, the server releases the logic interception between the target interface and the task configurator by the back interceptor, extracts the new service logic from the task configurator, and sends feedback response information to the client according to the current service logic and the new service logic; when the client calls the interface, the invention carries out new task configuration by entering the interception mode completed by the current business logic, realizes the update or dynamic release of the application, reduces the development cost of software upgrade and improves the timeliness of the update of the application.
Description
Technical Field
The invention relates to the technical field of system task registration, in particular to a method and a device for configuring an interface calling task.
Background
With the rapid development of the internet field, various terminal devices are gradually intelligentized and networked; it becomes more and more important how to update the application program of the terminal device more conveniently and quickly by using the internet and make the developer of the service end obtain profit.
At present, aiming at the problems of application updating, dynamic release and the like of terminal equipment, a new application program is generally developed by a service end operation background, and a client downloads an updated application to further realize application updating; the application updating and upgrading mode is high in cost and risk, and the server side cannot flexibly release dynamic information, so that the application updating timeliness is poor.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method for configuring an interface calling task, aiming at realizing application updating with low cost, low risk and high efficiency.
In order to achieve the above object, the present invention provides a method for configuring an interface call task, where the method for configuring the interface call task includes the following steps:
when the server detects a target interface called by the client, acquiring a post-interceptor and a task configurator which are logically connected in the target interface;
when the server detects that the client triggers the current business logic of the target interface, the interceptor releases the logic interception between the target interface and the task configurator;
and the server side extracts the new service logic from the task configurator and sends feedback response information to the client side according to the current service logic and the new service logic.
Optionally, the server includes an interface and an operation background,
when the server detects a target interface called by the client, the step of acquiring the interceptor and the task configurator which are sequentially connected with the target interface comprises the following steps:
the server side designs an interface into a front interceptor, a service processor and a rear interceptor which are sequentially and logically connected based on a responsibility chain design mode so as to interact with the task configurator;
when the server detects a task configuration request, the operation background acquires a currently deployed interface and establishes logical connection between the back interceptor and the task configurator in the interface.
Optionally, when the server detects a task configuration request, the operation background acquires a currently deployed interface, and establishes a logical connection between the back interceptor and the task configurator in the interface, including:
when the server side detects a task configuration request, the operation background acquires a currently deployed interface and judges whether logic connection between a post-interceptor and a task configurator in the interface needs to be established or not based on current business logic;
and if the logical connection between the post interceptor and the task configurator in the interface needs to be established, adding the post interceptor to the currently deployed interface, and adding the task configurator to the post interceptor.
Optionally, when the server detects that the client triggers the current service logic of the target interface, the step of releasing the logic interception between the target interface and the task configurator by the back interceptor includes:
the server receives the trigger information uploaded by the client and judges whether the trigger information is matched with standard information corresponding to the current business logic;
and when the triggering information is matched with the standard information, judging that the client triggers the current business logic of the target interface.
Optionally, the step of the server extracting the new service logic from the task configurator and sending the feedback response information to the client according to the current service logic and the new service logic includes:
when the server detects that the dynamic request is issued, the operation background resets new service logic or adds an interceptor and a task configurator based on a post-interceptor and a task configurator which are logically connected in the target interface so as to update the new service logic.
In addition, to achieve the above object, the present invention further provides an interface invoking task configuration device, where the interface invoking task configuration device includes:
the calling acquisition module is used for acquiring a post interceptor and a task configurator which are logically connected in a target interface when the server detects the target interface called by the client;
the processing interception module is used for releasing the logic interception between the target interface and the task configurator by the interceptor after the service end detects that the client triggers the current business logic of the target interface;
and the response feedback module is used for the server side to extract the new service logic from the task configurator and send feedback response information to the client side according to the current service logic and the new service logic.
Optionally, the server includes an interface and an operation background, and the device for invoking task configuration by the interface further includes:
the interface design module is used for designing an interface into a front interceptor, a service processor and a rear interceptor which are sequentially and logically connected based on a responsibility chain design mode by the server so as to interact with the task configurator;
and the task configuration module is used for acquiring the currently deployed interface by the operation background when the server detects the task configuration request, and establishing the logical connection between the back interceptor and the task configurator in the interface.
Optionally, the task configuration module includes:
the acquisition judging unit is used for acquiring a currently deployed interface by the operation background when the server detects a task configuration request, and judging whether the logic connection between the post-interceptor and the task configurator needs to be established or not based on the current business logic;
and the configuration service unit is used for adding the back interceptor to the currently deployed interface and adding the task configurator to the back interceptor if the logical connection between the back interceptor and the task configurator in the interface needs to be established.
Optionally, the device for configuring the interface call task includes a trigger judgment module, where the trigger judgment module is configured to:
the server receives the trigger information uploaded by the client and judges whether the trigger information is matched with standard information corresponding to the current business logic;
and when the triggering information is matched with the standard information, judging that the client triggers the current business logic of the target interface.
Optionally, the device for configuring the interface call task includes a dynamic publishing module, where the dynamic publishing module is configured to:
when the server detects that the dynamic request is issued, the operation background resets new service logic or adds an interceptor and a task configurator based on a post-interceptor and a task configurator which are logically connected in the target interface so as to update the new service logic.
According to the method for calling the task configuration through the interface, when a server detects a target interface called by a client, a rear interceptor and a task configurator which are logically connected in the target interface are obtained; when the server detects that the client triggers the current business logic of the target interface, the interceptor releases the logic interception between the target interface and the task configurator; the server side extracts new service logic from the task configurator and sends feedback response information to the client side according to the current service logic and the new service logic; when a client calls an interface, acquiring an interceptor and a task configurator which are configured in advance by an operation background, judging whether logic interception between a target interface and the task configurator is released by the interceptor according to the condition of calling the task configuration by the existing interface, and loading and updating the current service logic without developing new interface configuration new service logic, thereby reducing interface development cost, avoiding repeated development of the client of terminal equipment, simultaneously avoiding downloading upgrading version updating application by the client, reducing application upgrading cost and ensuring timeliness of dynamic release.
Drawings
FIG. 1 is a schematic block diagram of a method for interface call task configuration according to the present invention;
FIG. 2 is a diagram illustrating a specific scenario in which embodiments of a method for interface call task configuration according to the present invention are combined;
FIG. 3 is a flowchart illustrating the steps of the method for interface call task configuration according to the present invention;
FIG. 4 is a flowchart illustrating a first embodiment of a method for interface call task configuration according to the present invention;
FIG. 5 is a flowchart illustrating a second embodiment of a method for interface call task configuration according to the present invention;
FIG. 6 is a flowchart illustrating a third embodiment of a method for interface call task configuration according to the present invention;
FIG. 7 is a functional block diagram of an embodiment of an apparatus for interface invocation task configuration according to the present invention;
FIG. 8 is a functional block diagram of an apparatus for interface invocation task configuration according to another embodiment of the present invention;
FIG. 9 is a functional block diagram illustrating a refinement of the task configuration module of FIG. 8;
fig. 10 is an illustration of background operations performed in the method for configuring interface call tasks according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic frame diagram for assisting understanding of the present invention, and the method is mainly applied to a server and a plurality of clients with different task schedules, where the clients in the method are composed of an MCU, a memory, and a business logic module; the MCU (microprocessor) is used for controlling and coordinating with other modules, the memory is used for storing necessary data in the system, and the service logic module is used for controlling various service processing logics of the terminal, receiving server data and sending requests to the server; the server is composed of an API server (the API server is mainly applied to the development of a program Interface, for the convenience of understanding and explanation in the invention, the Interface which can be called can comprise an API Interface, a data Interface, an Interface and other expression forms, namely, an API application program is connected with the API, an API Interface operating system is reserved for a calling Interface of the application program, the application program can enable the operating system to execute commands of the application program by calling the API Interface, the main function of the API is to provide a universal function set, a programmer can develop the application program by calling the API function and can lighten programming tasks, the API is also a middleware which can provide data sharing for various platforms) and an operation background, wherein the API Interface is used for receiving, sending and processing service processing requests sent by terminal equipment, and the operation background is used for control, processing and storing business data of an API server interface and task configuration on the API interface; the API interface presets a front interceptor, a service processor and a back interceptor (wherein, the interceptor is an object for dynamically intercepting an Action call, and provides a mechanism to enable a developer to define codes executed before and after an Action is executed, and also can prevent the execution of the Action before the execution of the Action, and also provides a way of extracting a reusable part in the Action, and part of the interceptors are also used for intercepting before a certain method or field is accessed and then adding some operations before or after the method or field is accessed), the front interceptor is executed before the service processor of the interface is processed, and the back interceptor is executed after the service processor of the interface is processed.
As shown in fig. 2, fig. 2 is a scene schematic diagram of a method for configuring an interface call task, in which modules such as a front interceptor, a back interceptor, an interface service processor, and the like are respectively implemented when a background interface is developed; the method comprises the steps that an interface deployed by a current server side can be dynamically obtained on an operation background, and a rear interceptor and corresponding task configuration are configured for the interface which is appointed to need to be configured with a task; as shown in fig. 10, fig. 10 is a schematic diagram of a specific scenario in which an operation background acquires a server interface and configures task content, and user reward information (such as user points, experience values, virtual money, and the like) after a current service logic is completed may be configured in task configuration of post-interception.
As shown in fig. 4, in a first embodiment of a method for invoking task configuration by an interface according to the present invention, the method for invoking task configuration by an interface includes the following steps:
step S10, when the server detects the target interface called by the client, the back interceptor and the task configurator which are logically connected in the target interface are obtained;
specifically, when the server detects a client call interface, the API interface called by the client is used as a target interface, and the API server obtains a back interceptor and a task configurator that are configured corresponding to the target interface (referring to fig. 1, the front interceptor, the service processor, and the back interceptor are essentially service logics, and what is obtained in step S10 is the back interceptor, it needs to be noted that the task configurator is a new service logic corresponding to a new task developed by an operation background based on the current service logic of the called target interface in a back interception mode.
Step S20, when the server detects that the client triggers the current business logic of the target interface, the logic interception between the target interface and the task configurator is released by the interceptor;
the service end judges whether the client end completes the current service logic according to the processing condition of the client end to the current service logic of the target interface, the calling of the service logic is successfully completed at the data interface, the service end recognizes that the client end triggers the current service logic of the target interface, and the logic interception between the target interface and the task configurator is released by the interceptor (namely, the target interface calls the new service logic which is correspondingly triggered and is pre-configured in the interceptor and the task configurator by the target interface according to the current service logic).
Specifically, the client opens the application of the game for the smart television user, the operation is performed in a networking mode, the user needs to call different interfaces in the game step, the operation is performed according to the current business logic corresponding to the current task connected by the data interface, the user completes the specific game stage corresponding to the current task and needs to obtain 1000 points, when the score obtained by the user game is greater than or equal to 1000, the data interface enters a newly developed game stage or receives game coins and the like corresponding to the current game stage according to the specific game stage corresponding to the current task, the rear interceptor of the API interface responds according to the game setting, namely the service end determines that the client triggers the current business logic of the target interface, and the interceptor releases the logic interception between the target interface and the task configurator.
And step S30, the server side extracts the new service logic from the task configurator and sends feedback response information to the client side according to the current service logic and the new service logic.
The server extracts new service logic from the task configurator (as shown in fig. 3, after the client finishes the current service logic, the client processes the new service logic after the current service logic is finished according to feedback information), and in the new service processing logic of the back interceptor configured by the target interface, the server realizes the new service processing logic in the back interceptor according to the return value of the target interface and the current service logic on the target interface, and responds to the new service logic after the current service logic of a specific client user is finished (for example, the intelligent television game feedback information received at the client API interface rewards 2 gold coins when the user finishes the level card and obtains 1000 minutes, correspondingly obtains 1500 minutes and rewards 3 gold coins, etc., and the user obtains different reward information according to game settings, in the back interceptor connected with the server API, setting a service for acquiring points, opening a new gate or other service logics); and the server sends feedback response information (information such as gold coins, credits and the like acquired during game) to the client according to the current service logic and the new service logic so that the client can check the operation in time.
In this embodiment, when the server detects a target interface called by the client, a post-interceptor and a task configurator which are logically connected in the target interface are obtained, when the server detects that the client triggers the current service logic of the target interface, the logic interception between the target interface and the task configurator by the post-interceptor is released, the server extracts the new service logic from the task configurator, and sends feedback response information to the client according to the current service logic and the new service logic; compared with the prior art, the method has the advantages that the new API interface needs to be developed again by the operation background of the server side, a new version of the client side is developed at the same time, the cost of application development is reduced based on the task configuration of the interception mode, real-time information can be obtained without downloading a new application upgrading version by a user, and the user experience is improved.
A second embodiment is proposed on the basis of the first embodiment of the method for configuring an interface call task, as shown in fig. 5, where the server includes an API server and an operation background, and step S10 includes:
step S01, the server side designs the interface into a front interceptor, a service processor and a rear interceptor which are sequentially and logically connected based on a responsibility chain design mode so as to interact with the task configurator;
it should be noted that, the front interceptor, the service processor and the back interceptor are respectively implemented in the interface according to a responsibility Chain design mode (a responsibility Chain design mode, which is also called a responsibility Chain mode and is an object behavioral mode) to interact with the task configurator, wherein the responsibility Chain design mode is used for avoiding the coupling of a request sender and a receiver, making it possible for a plurality of objects to receive the request, connecting the objects into a Chain, and transmitting the request along the Chain until an object processes the request; with reference to fig. 1, the pre-interceptor is executed before the current business logic process (may be used for the determination of client permissions or for the pre-preparation of other business processes); the service processor can be understood as realizing the storage of the current service logic, the rear interceptor executes after the current service logic is processed, and loads or adds a task after the current service logic is processed; the front interceptor, the service processor and the back interceptor can be used for realizing the current service logic and the new service logic.
Step S02, when the server detects the task configuration request, the operation background acquires the interface deployed at present, and establishes the logical connection between the back interceptor and the task configurator in the interface.
With reference to fig. 2, when the operation background of the server detects a task configuration request, the server obtains all currently deployed API interfaces by using a Reflection technology (Reflection technology is an important mechanism in the internet technology, and by Reflection, members of each type in the networking technology, including methods, attributes, events, constructors, and the like, and also obtaining names, qualifiers, parameters, and the like of each member, can be obtained at runtime) of the computer, so that the operation background reads the interface list, and establishes a logical connection between a post-interceptor and a task configurator in the API interfaces, so as to implement task configuration of the API interfaces.
In this embodiment, the service end designs the API interface as a front interceptor, a service processor, and a back interceptor, which are logically connected in sequence, based on a responsibility chain design mode to interact with the task configurator, and when the service end detects a task configuration request, the operation background acquires the currently deployed API interface and establishes a logical connection between the back interceptor in the API interface and the task configurator; the interception mode is utilized in the task configuration, so that a new API interface and a corresponding task completion condition reporting interface are not required to be developed when a new task is added, the business logic corresponding to the new task is directly configured for the API interface in an operation background, the calling logic of the interface is realized at a terminal, and the cost and risk of application development are reduced.
Optionally, with reference to fig. 5, step S02 of the method for invoking task configuration by the interface of the present invention further includes:
step S021, when the server detects a task configuration request, the operation background acquires a currently deployed interface, and judges whether the logic connection between the post-interceptor and the task configurator needs to be established in the interface or not based on the current business logic;
with reference to fig. 2 and 5, when the service end detects a task configuration request, the operation background acquires a currently deployed interface, and determines, according to a specific situation of a current service logic, that a logical connection between the interceptor and the task configurator needs to be established (i.e., whether to perform task configuration on the interface), where each existing interface is configured with a service logic, that is, the current service logic, and new service logics that need to be configured after different service logics are completed are different, or new service logics do not need to be configured after execution of some interface service logics is completed, so that it is necessary to determine different interfaces to determine whether to establish a logical connection between the interceptor and the task configurator (i.e., whether to perform task configuration is needed).
Step S022, if the logical connection between the post interceptor and the task configurator in the interface needs to be established, adding the post interceptor to the currently deployed interface, and adding the task configurator to the post interceptor.
Judging and confirming the logical connection between the back interceptor and the task configurator in the interface (confirming the task configuration of the interface), establishing the logical connection between the back interceptor and the task configurator on an operation background of the server by combining with the method shown in fig. 3 and 10, adding the back interceptor configuration to the corresponding data interface, further adding the task configurator to the back interceptor needing to configure the task to realize the loading of the new service logic, wherein it needs to be explained that the logical connection between the back interceptor and the task configurator in the API interface is established, that is, the new service logic is loaded on the basis of the current service logic for the calling of the client, and when the server detects that the client calls the target interface in step S10, the corresponding API interface acquires the back interceptor and the task configurator.
In this embodiment, when a service end detects a task configuration request, an operation background acquires a currently deployed interface, and judges whether to establish a logical connection between a post-interceptor and a task configurator in the interface based on current business logic, if the logical connection between the post-interceptor and the task configurator in the interface needs to be established, the currently deployed interface is added with the post-interceptor, and the post-interceptor is added with the task configurator; by adding the interceptor configuration to the existing interface of the current service logic and further adding the task configurator to the interceptor to add the new service logic, the application update is realized by the interceptor configuration and the new task configuration, the development at both ends of the client and the server in the prior art is replaced, and the development cost and the risk of the application are reduced.
Referring to fig. 6, the third embodiment is correspondingly proposed in the present invention, and the method for interface call task configuration includes step S40:
the server receives the trigger information uploaded by the client and judges whether the trigger information is matched with standard information corresponding to the current business logic;
the client operates according to the current business logic of the called target interface, the server receives the operation information of the client, the operation information uploaded by the client is used as trigger information, the server receives the trigger information uploaded by the client and judges whether the trigger information is matched with the standard information corresponding to the current business logic or not, specifically, a client user operates according to a game task, the server can receive the information of the client, the game task is divided into 1000 points (1000 points can be used as standard information) by integration, the operation of the client is 900 points, the 900 points cannot be matched with the standard information corresponding to the current business logic, and the trigger information can be matched with the standard information corresponding to the current business logic only when the operation point of the client is larger than or equal to 1000 points.
And when the triggering information is matched with the standard information, judging that the client triggers the current business logic of the target interface.
The current service logic is operated on the client side, when the trigger information is matched with the standard information, the client side is judged to trigger the current service logic of the target interface (for example, the client side needs 1000 points in the existing game, the client side finishes the comparison of the trigger information of the game and the standard information, the client side obtains 1000 points and compares the 1000 points with the standard information to obtain 1 gold coin under different conditions, when the client side obtains 1500 minutes, 2 gold coins are obtained through the matching of the standard information), and when the trigger information of the client side is matched with the standard information, the client side is judged to trigger the current service logic of the target interface.
In this embodiment, the service end receives trigger information uploaded by the client, judges whether the trigger information matches standard information corresponding to the current service logic, and determines that the client triggers the current service logic of the target interface when the trigger information matches the standard information; after the target interface called by the client, the server can receive the operation information of the client, match the operation information with the standard information as the trigger information, and if the operation information is matched with the standard information, judge that the client triggers the current business logic of the target interface, so that the response of newly set interfaces is reduced, the program is simpler and more convenient, the operation efficiency is improved, and the user experience is also improved.
Optionally, referring to fig. 6, the method for interface call task configuration according to the present invention further includes:
and step 50, when the server detects that the dynamic request is issued, resetting new service logic or adding an interceptor and a task configurator based on a post-interceptor and a task configurator which are logically connected in the target interface by the operation background so as to update the new service logic.
When the server detects that a dynamic request is issued, the operation background configures a post-interceptor and a task configurator based on the interface corresponding to the current service logic, and additionally configures new service logic (namely, a new task or user integral, an experience value, virtual currency, added level and the like after the task is completed) based on a post-interception mode, resets the new service logic or adds the interceptor and the task configurator to update the new service logic, namely, changes the new service logic based on the new service logic, or additionally adds other service logic to update the new service logic.
In this embodiment, when the server detects that a dynamic request is issued, the operation background resets a new service logic or adds an interceptor and a task configurator based on a post-interceptor and a task configurator which are logically connected in a target interface, so as to update the new service logic; the new dynamic state is released in time in a more flexible mode, a user at the client can obtain the new dynamic state of a new task without downloading upgrading application, and new task configuration and dynamic release are carried out based on an interception mode, so that the client can obtain the new task and the new dynamic state in time, and the physical examination and the client viscosity of the user are increased at the same time.
With reference to fig. 2 and fig. 7, in an embodiment of an apparatus for interface invoking task configuration according to the present invention, the apparatus for interface invoking task configuration includes:
the calling acquisition module 10 is configured to acquire a post-interceptor and a task configurator which are logically connected in a target interface when the server detects the target interface called by the client;
specifically, when the server detects that the client calls the API interface, the call acquisition module 10 takes the API interface called by the client as a target API interface, and the API server acquires a back interceptor and a task configurator that are configured corresponding to the target API interface (referring to fig. 1, the front interceptor, the service processor, and the back interceptor are essentially service logic, and the back interceptor is acquired in the call acquisition module 10, it is to be noted that the task configurator is a new service logic corresponding to a new task developed by the operation background based on the current service logic of the called target API interface in a back interception mode.
The processing interception module 20 is configured to, when the server detects that the client triggers the current service logic of the target interface, remove the logic interception between the target interface and the task configurator by the interceptor;
the server determines whether the client completes the current service logic according to the current service logic processing condition of the client on the target interface, the calling of the service logic is successfully completed on the data interface, the service processing interception module 20 recognizes that the client triggers the current service logic of the target interface, and the logic interception between the target interface and the task configurator by the interceptor is released (namely, the target interface calls the new service logic which is configured in the interceptor and the task configurator by the corresponding triggered target interface in advance according to the current service logic).
Specifically, the client opens the application of the game for the smart television user, the operation is performed in a networking mode, the user needs to call different interfaces in the game step, the operation is performed according to the current business logic corresponding to the current task connected by the interfaces, the user completes the specific game stage corresponding to the current task and needs to obtain 1000 points, when the score obtained by the user game is greater than or equal to 1000, the data interface enters a newly developed game stage according to the specific game stage corresponding to the current task or receives game coins and the like corresponding to the current game stage, the rear interceptor of the data interface responds according to the game setting, namely the server side determines that the client triggers the current business logic of the target interface, and the interceptor cancels the logic interception between the target interface and the task configurator.
And the response feedback module 30 is used for the server side to extract the new service logic from the task configurator and send feedback response information to the client side according to the current service logic and the new service logic.
The server extracts new service logic from the task configurator (as shown in fig. 3, after the client finishes the current service logic, the client processes the new service logic after the current service logic is finished according to feedback information), and in the new service processing logic of the back interceptor entering the target API configuration, the server response feedback module 30 implements the new service processing logic in the back interceptor according to the return value of the target interface and the current service logic on the target interface, and responds to the new service logic after the current service logic of the specific client user is finished (for example, the intelligent television game feedback information received at the client data interface is received, when the user has finished the gate card obtaining 1000 minutes, 2 gold coins are rewarded, corresponding to obtain 1500 minutes, 3 gold coins are rewarded, etc., and the user obtains different reward information according to the game setting, in the back interceptor connected with the server API server, setting a service for acquiring points, opening a new gate or other service logics); and the server sends feedback response information (information such as gold coins, credits and the like acquired during game) to the client according to the current service logic and the new service logic so that the client can check the operation in time.
In this embodiment, when the server detects a target interface called by the client, a post-interceptor and a task configurator which are logically connected in the target interface are obtained, when the server detects that the client triggers the current service logic of the target interface, the logic interception between the target interface and the task configurator by the post-interceptor is released, the server extracts the new service logic from the task configurator, and sends feedback response information to the client according to the current service logic and the new service logic; compared with the prior art, the method has the advantages that the new data interface needs to be developed again by the operation background of the server side, a new version of the client side is developed at the same time, the cost of application development is reduced based on the task configuration of the interception mode, real-time information can be obtained without downloading a new application upgrading version by a user, and the user experience is improved.
On the basis of an embodiment of a device for interface call task configuration according to the present invention, another embodiment is provided, as shown in fig. 8, where the server includes an interface and an operation background, and the device for interface call task configuration includes:
the interface design module 01 is used for designing an interface into a front interceptor, a service processor and a rear interceptor which are sequentially and logically connected on the basis of a responsibility chain design mode by a server so as to interact with the task configurator;
it should be noted that, the front interceptor, the service processor and the back interceptor are respectively implemented in the interface according to a responsibility Chain design mode (a responsibility Chain design mode, which is also called a responsibility Chain mode and is an object behavioral mode) to interact with the task configurator, wherein the responsibility Chain design mode is used for avoiding the coupling of a request sender and a receiver, making it possible for a plurality of objects to receive the request, connecting the objects into a Chain, and transmitting the request along the Chain until an object processes the request; with reference to fig. 1, the pre-interceptor is executed before the current business logic process (may be used for the determination of client permissions or for the pre-preparation of other business processes); the service processor can be understood as realizing the storage of the current service logic, the rear interceptor executes after the current service logic is processed, and loads or adds a task after the current service logic is processed; the front interceptor, the service processor and the back interceptor in the interface design module 01 can be used to implement the current service logic and the new service logic.
And the task configuration module 02 is configured to, when the server detects a task configuration request, the operation background acquires a currently deployed interface, and establishes a logical connection between the back interceptor and the task configurator in the interface.
With reference to fig. 2, when the operation background of the server detects a task configuration request, the server obtains all currently deployed interfaces by using a Reflection technology (Reflection technology is an important mechanism in the internet technology, and by Reflection, members of each type in the networking technology, including methods, attributes, events, constructors, and the like, and also obtaining names, qualifiers, parameters, and the like of each member, can be obtained at runtime) of a computer, so that the operation background reads the interface list, and the task configuration module 02 establishes a logical connection between the back interceptor and the task configurator in the interfaces, so as to implement task configuration of the interfaces.
In this embodiment, the service end designs interfaces as a front interceptor, a service processor and a back interceptor which are logically connected in sequence based on a responsibility chain design mode so as to interact with the task configurator, and when the service end detects a task configuration request, the operation background acquires the currently deployed interface and establishes logical connection between the back interceptor in the interfaces and the task configurator; the interception mode is utilized in task configuration, so that a new interface and a corresponding task completion condition reporting interface are not required to be developed when a new task is added, the business logic corresponding to the new task is directly configured for the API interface in an operation background, the calling logic of the interface is realized at a terminal, and the cost and risk of application development are reduced.
Optionally, referring to fig. 9, the task configuration module 02 in the device for interface call task configuration according to the present invention further includes:
the acquisition and judgment unit 021 is configured to, when the server detects a task configuration request, the operation background acquires a currently deployed interface, and judges whether a logical connection between the post-interceptor and the task configurator in the interface needs to be established based on current service logic;
with reference to fig. 2 and 5, when the service end detects a task configuration request, the operation background acquisition and determination unit 021 acquires a currently deployed interface, and determines, according to a specific situation of a current service logic, that a logical connection between the interceptor and the task configurator in the API interfaces needs to be established (i.e., whether to perform task configuration on the API interfaces), where each existing API interface is configured with a service logic, that is, the current service logic, and new service logics that need to be configured after different service logics are completed are different, or new service logics do not need to be configured after the service logics of some API interfaces are completed, so that it is necessary to determine different API interfaces to determine whether to establish a logical connection between the interceptor and the task configurator (i.e., whether to perform task configuration).
And a configuration service unit 022, configured to add a back interceptor to a currently deployed interface and add a task configurator to the back interceptor if a logical connection between the back interceptor and the task configurator needs to be established.
Judging and confirming the logical connection between the back interceptor and the task configurator in the data interface (confirming the task configuration of the data interface), establishing the logical connection between the back interceptor and the task configurator on the operation background of the service end in combination with fig. 3 and 10, configuring the interceptor configuration after the service unit 022 adds the corresponding API service interface, further adding the task configurator to the back interceptor needing to configure the task to realize the loading of the new service logic, it needs to be stated that the logical connection between the back interceptor and the task configurator in the interface is established, that is, the new service logic is loaded on the basis of the current service logic to be called by the client, and combining the back interceptor and the task configurator which are obtained by the corresponding API interface when the service end detects that the client calls the target interface in the call obtaining module 10.
In this embodiment, when a service end detects a task configuration request, an operation background acquires a currently deployed interface, and judges whether to establish a logical connection between a post-interceptor and a task configurator in the interface based on current business logic, if the logical connection between the post-interceptor and the task configurator in the interface needs to be established, the currently deployed interface is added with the post-interceptor, and the post-interceptor is added with the task configurator; by adding the interceptor configuration to the existing interface of the current service logic and further adding the task configurator to the interceptor to add the new service logic, the application update is realized by the interceptor configuration and the new task configuration, the development at both ends of the client and the server in the prior art is replaced, and the development cost and the risk of the application are reduced.
Referring to fig. 8, in another embodiment of the device for interface call task configuration according to the present invention, the device for interface call task configuration includes a trigger determining module 40, where the trigger determining module 40 is configured to:
the server receives the trigger information uploaded by the client and judges whether the trigger information is matched with standard information corresponding to the current business logic;
the client operates according to the current business logic of the called target interface, the server receives the operation information of the client, the trigger judgment module 40 takes the operation information uploaded by the client as trigger information, the server receives the trigger information uploaded by the client and judges whether the trigger information is matched with the standard information corresponding to the current business logic or not, specifically, a client user operates according to a game task, the server can receive the information of the client, if the game task is set to be 1000 points by integration (1000 points can be used as standard information), the operation of the client is 900 points, the 900 points cannot be matched with the standard information corresponding to the current business logic, and only when the operation score of the client is greater than or equal to 1000 points, the trigger information can be matched with the standard information corresponding to the current business logic.
And when the triggering information is matched with the standard information, judging that the client triggers the current business logic of the target interface.
The current service logic is operated at the client, when the trigger information is matched with the standard information, the trigger judgment module 40 judges that the client triggers the current service logic of the target interface (for example, the client needs 1000 credits in the existing game, the client finishes the comparison of the trigger information of the game and the standard information, the client obtains 1000 credits and compares the 1000 credits with the standard information to obtain 1 gold coin under different conditions, when the client obtains 1500 minutes, 2 gold coins are obtained by matching the standard information), and when the trigger information of the client is matched with the standard information, the client triggers the current service logic of the target interface.
In this embodiment, the service end receives trigger information uploaded by the client, judges whether the trigger information matches standard information corresponding to the current service logic, and determines that the client triggers the current service logic of the target interface when the trigger information matches the standard information; after the target interface called by the client, the server can receive the operation information of the client, match the operation information with the standard information as the trigger information, and if the operation information is matched with the standard information, judge that the client triggers the current service logic of the target API interface, so that the response of newly setting the API interface is reduced, the program is simpler and more convenient, the operation efficiency is improved, and the user experience is also improved.
Optionally, referring to fig. 8, the interface of the present invention further includes a dynamic publishing module 50, where the dynamic publishing module 50 is configured to:
when the server detects that the dynamic request is issued, the operation background resets new service logic or adds an interceptor and a task configurator based on a post-interceptor and a task configurator which are logically connected in the target interface so as to update the new service logic.
When the server detects that a dynamic request is issued, the operation background dynamic issuing module 50 configures a post-interceptor and a task configurator based on the API interface corresponding to the current service logic, and additionally configures new service logic (i.e., a new task or a user score, an experience value, virtual currency, an added level and the like after the task is completed) based on the post-interception mode, resets the new service logic or adds the interceptor and the task configurator to update the new service logic, changes the new service logic based on the new service logic, or additionally adds other service logic to update the new service logic.
In this embodiment, when the server detects that a dynamic request is issued, the operation background resets a new service logic or adds an interceptor and a task configurator based on a post-interceptor and a task configurator which are logically connected in the target API interface, so as to update the new service logic; the new dynamic state is released in time in a more flexible mode, a user at the client can obtain the new dynamic state of a new task without downloading upgrading application, and new task configuration and dynamic release are carried out based on an interception mode, so that the client can obtain the new task and the new dynamic state in time, and the physical examination and the client viscosity of the user are increased at the same time.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A method for interface calling task configuration is characterized in that the method for interface calling task configuration comprises the following steps:
when the server detects a target interface called by the client, acquiring a post-interceptor and a task configurator which are logically connected in the target interface;
when the server detects that the client triggers the current business logic of the target interface, the interceptor releases the logic interception between the target interface and the task configurator;
and the server side extracts the new service logic from the task configurator and sends feedback response information to the client side according to the current service logic and the new service logic.
2. The method for interface call task configuration according to claim 1, wherein the server comprises an interface and an operation background,
when the server detects a target interface called by the client, the step of acquiring the post interceptor and the task configurator which are logically connected in the target interface comprises the following steps:
the server side designs an interface into a front interceptor, a service processor and a rear interceptor which are sequentially and logically connected based on a responsibility chain design mode so as to interact with the task configurator;
when the server detects a task configuration request, the operation background acquires a currently deployed interface and establishes logical connection between the back interceptor and the task configurator in the interface.
3. The method for invoking task configuration by an interface according to claim 2, wherein the step of obtaining the currently deployed interface by the operation background and establishing the logical connection between the back interceptor and the task configurator in the interface when the server detects the task configuration request comprises:
when the server side detects a task configuration request, the operation background acquires a currently deployed interface and judges whether logic connection between a post-interceptor and a task configurator in the interface needs to be established or not based on current business logic;
and if the logical connection between the post interceptor and the task configurator in the interface needs to be established, adding the post interceptor to the currently deployed interface, and adding the task configurator to the post interceptor.
4. The method for interface call task configuration according to claim 3, wherein the step of releasing the logic interception between the target interface and the task configurator by the post-interceptor when the server detects that the client triggers the current business logic of the target interface comprises:
the server receives the trigger information uploaded by the client and judges whether the trigger information is matched with standard information corresponding to the current business logic;
and when the triggering information is matched with the standard information, judging that the client triggers the current business logic of the target interface.
5. The method for interface call task configuration according to any one of claims 1 to 4, wherein the step of the server extracting the new service logic from the task configurator and sending the feedback response information to the client according to the current service logic and the new service logic is followed by:
when the server detects that the dynamic request is issued, the operation background resets new service logic or adds an interceptor and a task configurator based on a post-interceptor and a task configurator which are logically connected in the target interface so as to update the new service logic.
6. An apparatus for interface invoking task configuration, the apparatus for interface invoking task configuration comprising:
the calling acquisition module is used for acquiring a post interceptor and a task configurator which are logically connected in a target interface when the server detects the target interface called by the client;
the processing interception module is used for releasing the logic interception between the target interface and the task configurator by the interceptor after the service end detects that the client triggers the current business logic of the target interface;
and the response feedback module is used for the server side to extract the new service logic from the task configurator and send feedback response information to the client side according to the current service logic and the new service logic.
7. The apparatus for interface call task configuration according to claim 6, wherein the server includes an interface and an operation background, and the apparatus for interface call task configuration further includes:
the interface design module is used for designing an interface into a front interceptor, a service processor and a rear interceptor which are sequentially and logically connected based on a responsibility chain design mode by the server so as to interact with the task configurator;
and the task configuration module is used for acquiring the currently deployed interface by the operation background when the server detects the task configuration request, and establishing the logical connection between the back interceptor and the task configurator in the interface.
8. The apparatus for interface invocation task configuration according to claim 7, wherein said task configuration module includes:
the acquisition judging unit is used for acquiring a currently deployed interface by the operation background when the server detects a task configuration request, and judging whether the logic connection between the post-interceptor and the task configurator needs to be established or not based on the current business logic;
and the configuration service unit is used for adding the back interceptor to the currently deployed interface and adding the task configurator to the back interceptor if the logical connection between the back interceptor and the task configurator in the interface needs to be established.
9. The apparatus for interface call task configuration according to claim 8, wherein the apparatus for interface call task configuration comprises a trigger determination module, and the trigger determination module is configured to:
the server receives the trigger information uploaded by the client and judges whether the trigger information is matched with standard information corresponding to the current business logic;
and when the triggering information is matched with the standard information, judging that the client triggers the current business logic of the target interface.
10. The apparatus for interface calling task configuration according to any one of claims 6 to 9, wherein the apparatus for interface calling task configuration comprises a dynamic publishing module, configured to:
when the server detects that the dynamic request is issued, the operation background resets new service logic or adds an interceptor and a task configurator based on a post-interceptor and a task configurator which are logically connected in the target interface so as to update the new service logic.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611266513.2A CN106656622B (en) | 2016-12-29 | 2016-12-29 | Method and device for configuring interface calling task |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611266513.2A CN106656622B (en) | 2016-12-29 | 2016-12-29 | Method and device for configuring interface calling task |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106656622A CN106656622A (en) | 2017-05-10 |
CN106656622B true CN106656622B (en) | 2020-04-24 |
Family
ID=58837686
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611266513.2A Active CN106656622B (en) | 2016-12-29 | 2016-12-29 | Method and device for configuring interface calling task |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106656622B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110025955B (en) * | 2018-01-11 | 2022-12-02 | 武汉斗鱼网络科技有限公司 | Information processing method, terminal, computer-readable storage medium, and computer device |
CN113055702B (en) * | 2018-02-08 | 2023-06-27 | 广州虎牙信息科技有限公司 | Method, system and client for displaying business components |
CN110990076A (en) * | 2019-11-20 | 2020-04-10 | 杭州安恒信息技术股份有限公司 | Hot plug component chain calling method based on responsibility chain mode |
CN112925578B (en) * | 2021-01-28 | 2024-01-30 | 北京达佳互联信息技术有限公司 | Task processing method, device and storage medium |
CN112988225B (en) * | 2021-03-12 | 2024-04-05 | 中国平安财产保险股份有限公司 | Annotation configuration method, device, equipment and storage medium |
CN113612972B (en) * | 2021-08-09 | 2023-12-05 | 深圳市猿人创新科技有限公司 | Communication method and device of terminal monitoring equipment, electronic equipment and storage medium |
CN114422358B (en) * | 2022-01-26 | 2024-01-30 | 中国农业银行股份有限公司 | API gateway configuration updating method and equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103316472A (en) * | 2013-05-17 | 2013-09-25 | 南京睿悦信息技术有限公司 | Android device gas platform system based on Bluetooth handle and implementation method of Android device gas platform system |
CN103412766A (en) * | 2013-09-05 | 2013-11-27 | 曙光云计算技术有限公司 | User right-based data access method and device |
CN103761235A (en) * | 2013-11-18 | 2014-04-30 | 芜湖大学科技园发展有限公司 | Distribution method and application of universal power data platform |
CN104914976A (en) * | 2014-03-12 | 2015-09-16 | 中兴通讯股份有限公司 | Data processing method, data processing device and terminal |
CN104981796A (en) * | 2013-01-28 | 2015-10-14 | 华为技术有限公司 | Mechanism to dereference layered URI in web browsers using Javascript |
CN105893847A (en) * | 2016-04-22 | 2016-08-24 | 北京金山安全软件有限公司 | Method and device for protecting safety protection application program file and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5587884B2 (en) * | 2008-08-06 | 2014-09-10 | モービック・ネットワークス | Content caching in a radio access network (RAN) |
-
2016
- 2016-12-29 CN CN201611266513.2A patent/CN106656622B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104981796A (en) * | 2013-01-28 | 2015-10-14 | 华为技术有限公司 | Mechanism to dereference layered URI in web browsers using Javascript |
CN103316472A (en) * | 2013-05-17 | 2013-09-25 | 南京睿悦信息技术有限公司 | Android device gas platform system based on Bluetooth handle and implementation method of Android device gas platform system |
CN103412766A (en) * | 2013-09-05 | 2013-11-27 | 曙光云计算技术有限公司 | User right-based data access method and device |
CN103761235A (en) * | 2013-11-18 | 2014-04-30 | 芜湖大学科技园发展有限公司 | Distribution method and application of universal power data platform |
CN104914976A (en) * | 2014-03-12 | 2015-09-16 | 中兴通讯股份有限公司 | Data processing method, data processing device and terminal |
CN105893847A (en) * | 2016-04-22 | 2016-08-24 | 北京金山安全软件有限公司 | Method and device for protecting safety protection application program file and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN106656622A (en) | 2017-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106656622B (en) | Method and device for configuring interface calling task | |
US20190087161A1 (en) | Build and deploy cloud device application on cloud and devices | |
CN104063239B (en) | Application program update method and server, the client of mobile terminal | |
CN112784989B (en) | Inference system, inference method, electronic device, and computer storage medium | |
CN108399331B (en) | Application process trial method and system | |
CN108228810B (en) | Form linkage configuration method and system and form updating method and system | |
CN107844306B (en) | Application program repairing method and device, storage medium and terminal | |
CN106993233A (en) | Information processing method and device based on net cast | |
WO2008000501A2 (en) | System and method for object state management | |
CN106126273A (en) | A kind of method of upgrading BIOS | |
KR100941540B1 (en) | System and method for setting configuration-value inthereof | |
CN108874427B (en) | Updating progress obtaining method and device and readable storage medium | |
CN112491948A (en) | Non-invasive monomer application micro-service method and device and computer equipment | |
CN112118318A (en) | Vehicle upgrading method, terminal device, vehicle and computer storage medium | |
CN112085491B (en) | Charging system access method, cloud platform, electronic equipment and computer readable medium | |
CN110502536A (en) | Method, apparatus and storage medium based on cache database verification business uniqueness | |
CN109683992B (en) | Method and apparatus for managing objects | |
CN114358302A (en) | Artificial intelligence AI training method, system and equipment | |
CN109857444B (en) | Application program updating method and device, electronic equipment and readable storage medium | |
CN110941485A (en) | Game task running method and device and electronic terminal | |
CN114363225A (en) | MTQQ protocol-based device debugging mode, system and storage medium | |
CN109327499A (en) | Management method and device, storage medium, the terminal of business interface | |
CN110489147A (en) | Things-internet gateway remote upgrade method, device and computer readable storage medium | |
CN113434234A (en) | Page jump method, device, computer readable storage medium and processor | |
CN113778554A (en) | Plug-in processing method, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |