CN111538722A - Service processing method, device, equipment and service system - Google Patents

Service processing method, device, equipment and service system Download PDF

Info

Publication number
CN111538722A
CN111538722A CN202010344794.9A CN202010344794A CN111538722A CN 111538722 A CN111538722 A CN 111538722A CN 202010344794 A CN202010344794 A CN 202010344794A CN 111538722 A CN111538722 A CN 111538722A
Authority
CN
China
Prior art keywords
service
processing request
proxy
service processing
agent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010344794.9A
Other languages
Chinese (zh)
Other versions
CN111538722B (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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010344794.9A priority Critical patent/CN111538722B/en
Publication of CN111538722A publication Critical patent/CN111538722A/en
Application granted granted Critical
Publication of CN111538722B publication Critical patent/CN111538722B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the specification discloses a service processing method, a device, equipment and a service system, wherein the method comprises the steps of intercepting a service processing request of a target service sent by a service initiator; generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request; based on the proxy object, providing the proxy service processing request to a service server of the target service, so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request; and acquiring a processing result corresponding to the proxy service processing request provided by the service server, determining a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing the processing result corresponding to the service processing request to the service initiator.

Description

Service processing method, device, equipment and service system
Technical Field
The present specification relates to the field of computer technologies, and in particular, to a service processing method, an apparatus, a device, and a service system.
Background
In an analysis platform for risk prevention and control, a technician triggers a cleaning operation on some characteristics contained in acquired user data, so that a characteristic cleaning task is generated, the characteristic cleaning within a certain period of time can be completed through a characteristic cleaning mechanism, when all the characteristics are cleaned successfully, a fusion task is continuously initiated on the characteristics, the fusion task can be merged according to the cleaning result, the fusion can be completed specifically depending on the capability of a large data layer, when the fusion task is successful, compensation processing needs to be continuously performed on the part of the characteristics, a compensation task is generated at the moment, and when the compensation task is successful, the processing on the data is completed.
For each of the above tasks, different states are generated, and when some task in the middle fails, a re-execution operation needs to be initiated. Based on this, it is necessary to separate the task from the service, and the execution result of the intermediate task does not need to be perceived by the service server.
Disclosure of Invention
An object of the embodiments of the present specification is to provide a service processing method, an apparatus, a device, and a service system, so as to provide a technical solution for task management and control that can manage and control tasks and is lighter in weight.
In order to implement the above technical solution, the embodiments of the present specification are implemented as follows:
a service processing method provided in an embodiment of the present specification, the method includes: and intercepting a service processing request of a target service sent by a service initiator. And generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request. And providing the proxy service processing request to a service server of the target service based on the proxy object so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request. And acquiring a processing result corresponding to the proxy service processing request provided by the service server, determining a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing the processing result corresponding to the service processing request to the service initiator.
A service processing method provided in an embodiment of the present specification, the method includes: the method comprises the steps of obtaining an agent service processing request aiming at a target service, which is provided by an agent task manager based on an agent object, wherein the agent service processing request is generated by the agent task manager based on an intercepted service processing request of the target service, which is sent by a service initiator, and the agent object is the agent object corresponding to the service initiator and generated by the agent task manager. And processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request. And providing a processing result corresponding to the proxy service processing request to the proxy task manager, so that the proxy task manager determines a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
An embodiment of the present specification provides a service processing apparatus, where the apparatus includes: and the interception module intercepts a service processing request of the target service sent by the service initiator. And the generating module is used for generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request. And the request sending module is used for providing the proxy service processing request to a service server of the target service based on the proxy object so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request. And the result acquisition module is used for acquiring a processing result corresponding to the proxy service processing request provided by the service server, determining the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing the processing result corresponding to the service processing request to the service initiator.
An embodiment of the present specification provides a service processing apparatus, where the apparatus includes: the acquisition module is used for acquiring an agent service processing request aiming at a target service, which is provided by an agent task manager based on an agent object, wherein the agent service processing request is generated by the agent task manager based on the intercepted service processing request of the target service, which is sent by a service initiator, and the agent object is the agent object corresponding to the service initiator and generated by the agent task manager. And the service processing module is used for processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request. And the result output module is used for providing the processing result corresponding to the proxy service processing request to the proxy task manager, so that the proxy task manager determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
An embodiment of the present specification provides a service processing device, where the service processing device includes: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: and intercepting a service processing request of a target service sent by a service initiator. And generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request. And providing the proxy service processing request to a service server of the target service based on the proxy object so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request. And acquiring a processing result corresponding to the proxy service processing request provided by the service server, determining a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing the processing result corresponding to the service processing request to the service initiator.
An embodiment of the present specification provides a service processing device, where the service processing device includes: the method comprises the steps of obtaining an agent service processing request aiming at a target service, which is provided by an agent task manager based on an agent object, wherein the agent service processing request is generated by the agent task manager based on an intercepted service processing request of the target service, which is sent by a service initiator, and the agent object is the agent object corresponding to the service initiator and generated by the agent task manager. And processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request. And providing a processing result corresponding to the proxy service processing request to the proxy task manager, so that the proxy task manager determines a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
The service system provided by the embodiment of the present specification includes an agent task manager and a service server, where: the agent task manager intercepts a service processing request of a target service sent by a service initiator, generates an agent object corresponding to the service initiator and an agent service processing request corresponding to the service processing request, and provides the agent service processing request to a service server of the target service based on the agent object. And the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the proxy service processing request to the proxy task manager. And the agent task manager determines a processing result corresponding to the service processing request based on the processing result corresponding to the agent service processing request, and provides the processing result corresponding to the service processing request to the service initiator.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a diagram illustrating an embodiment of a service processing method according to the present disclosure;
fig. 2 is another embodiment of a service processing method according to the present disclosure;
fig. 3 is a diagram of another embodiment of a service processing method according to the present disclosure;
FIG. 4 is a diagram illustrating a key class structure corresponding to an agent task manager according to the present disclosure;
FIG. 5 is a diagram illustrating a chain of responsibility for a motion controller according to the present disclosure;
fig. 6 is a diagram illustrating an embodiment of a service processing apparatus;
FIG. 7 is another embodiment of a service processing apparatus according to the present disclosure;
fig. 8 is an embodiment of a service processing device according to the present disclosure;
FIG. 9 is another embodiment of a service processing device according to the present disclosure;
FIG. 10 is a business system embodiment of the present description;
fig. 11 is another embodiment of a business system according to the present disclosure.
Detailed Description
The embodiment of the specification provides a service processing method, a device, equipment and a service system.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
Example one
As shown in fig. 1, an execution main body of the method may be an agent task manager, where the agent task manager may be a terminal device or a server, or may be an application program or a hardware device installed in the terminal device or the server, where the terminal device may be a mobile terminal device such as a mobile phone or a tablet computer, or may be a device such as a personal computer, where the server may be an independent server, or may be a server cluster formed by a plurality of servers, and the server may be a background server such as a financial service or an online shopping service, or a server of a risk prevention and control service in a certain field. The method may specifically comprise the steps of:
in step S102, a service processing request of a target service sent by a service initiator is intercepted.
The service initiator may be a party initiating a processing request of a certain service, the service initiator may be a user, or may be a technician of a corresponding service, that is, the technician of the corresponding service initiates the processing request of the service based on the triggering of the user, and so on. The target service may be any service, such as a financial service, a shopping service, a data cleansing, a data fusion service, and the like.
In implementation, in an analysis platform for risk prevention and control, a technician may trigger a cleaning operation on some features included in acquired user data, so as to generate a feature cleaning task, the feature cleaning for a certain period of time may be completed through a feature cleaning mechanism, when all the features are successfully cleaned, a fusion task may be continuously initiated on the features, the fusion task may perform a merging process according to the cleaning result, specifically, the fusion may be completed depending on the capability of a large data layer, when the fusion task is successful, the compensation process needs to be continuously performed on the part of the features, a compensation task may be generated at this time, and when the compensation task is successful, the processing on the data may be completed. For each of the above tasks, different states are generated, and when some task in the middle fails, a re-execution operation needs to be initiated. Based on this, it is necessary to separate the task from the service, and the execution result of the intermediate task does not need to be perceived by the service server. The embodiment of the present specification provides a technical solution, which may specifically include the following:
for the case that the service initiator is a user, an application program capable of triggering execution of one or more different services may be installed in the terminal device of the service initiator, and the application program may present relevant information of the service capable of being triggered to the service initiator, for example, a trigger key capable of providing one or more different services to the service initiator through a corresponding page, and if the service initiator clicks the trigger key, the terminal device may generate a service processing request of a service (i.e., a target service) corresponding to the trigger key, for example, a service processing request for processing online transaction data of a user (including cleaning, merging, compensating, and the like). Then, the service processing request of the target service may be sent to the service server of the target service, and the proxy task manager may intercept the service processing request of the target service in the process of sending the service processing request to the service server.
For the case that the service initiator is a technician, the user can provide the service processing platform with the relevant information of the service to be processed (i.e., the target service), such as the identifier (e.g., name or code) of the target service, according to the actual situation. After acquiring the relevant information of the target service provided by the user, the technician can determine that the user needs to perform service processing on the target service, at this time, the technician can send a service processing request of the target service to the service server, and in the process of sending the service processing request of the target service to the service server, the agent task manager can intercept the service processing request of the target service.
In step S104, a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request are generated.
In implementation, since the agent task manager does not belong to a party that really requests to process a target service, and the agent task manager does not belong to a specific user, but initiates a service processing request instead of a plurality of different users, in order to distinguish service processing initiated by different service initiators, the agent task manager may generate corresponding agent objects based on relevant information (such as an account, a name, a nickname, and the like of the service initiator) of the service initiator, and may enhance control over the original objects by the agent objects, for example, the agent task manager may generate corresponding agent objects through a preset algorithm based on the account of the service initiator, and the like, which may be specifically set according to actual conditions, which is not limited in the embodiments of the present specification.
In addition, the proxy task manager may further process the service processing request to generate a corresponding proxy service processing request, specifically, the proxy task manager may adjust a format of the service processing request to a service processing request with a predetermined format, and the adjusted service processing request may be used as the proxy service processing request. The main contents of the service processing request and the proxy service processing request may not be changed, and based on the above example, both the service processing request and the proxy service processing request may be used to request processing (including cleaning, merging, compensating, and the like) of online transaction data of a certain user.
In step S106, based on the proxy object, the proxy service processing request is provided to a service server of a target service, so that the service server processes the target service based on the proxy service processing request, and a processing result corresponding to the proxy service processing request is obtained.
In implementation, after obtaining the proxy object and the proxy service processing request, the proxy task manager may provide the proxy service processing request to a service server of a target service based on the proxy object, so as to trigger the service server to process the target service, specifically, after obtaining the proxy service processing request, the service server may analyze the proxy service processing request, determine relevant information of one or more operations to be executed corresponding to the proxy service processing request, and then, based on the determined relevant information of the operations to be executed, the service server may control the controller to execute the corresponding operations according to a preset execution sequence, if one or more of the operations to be executed fail to be executed (e.g., the fusion operation fails), the corresponding operation may be re-executed (i.e., the fusion operation is re-executed), until each operation to be executed is successfully executed, the target service can be processed based on the proxy service processing request by the above mode, and a processing result corresponding to the proxy service processing request is obtained.
In step S108, a processing result corresponding to the proxy service processing request provided by the service server is obtained, a processing result corresponding to the service processing request is determined based on the processing result corresponding to the proxy service processing request, and the processing result corresponding to the service processing request is provided to the service initiator.
In implementation, the proxy task manager may obtain a processing result corresponding to the proxy service processing request provided by the service server, analyze the processing result, determine content of the processing result, generate a processing result corresponding to the service processing request based on the determined content of the processing result, and then provide the generated processing result corresponding to the service processing request to the service initiator. For example, based on the above example, if the processing result corresponding to the proxy service processing request for processing the online transaction data of a certain user (including cleaning, fusing, and compensating, etc.) is to complete the cleaning, fusing, and compensating operations on the online transaction data of the user, the processing result corresponding to the corresponding service processing request should also be to complete the cleaning, fusing, and compensating operations on the online transaction data of the user, and at this time, the processing result corresponding to the service processing request may be provided to the service initiator, so that the service initiator may know that the processing (including cleaning, fusing, and compensating, etc.) on the online transaction data of the certain user is successful.
The embodiment of the present specification provides a service processing method, intercepting a service processing request of a target service sent by a service initiator, generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request, so that intercepting the service processing of the service initiator by a proxy task manager can separate a task from the service, and further, based on the proxy object, providing the proxy service processing request to a service server of the target service, so that the service server processes the target service based on the proxy service processing request, obtains a processing result corresponding to the proxy service processing request provided by the service server, and determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing a processing result corresponding to the service processing request to a service initiator, so that the execution result of the intermediate task does not need to be sensed by the service server, lightweight task management and control are completed through the dynamic proxy of the proxy task manager, and the expandability of the service server can be improved.
Example two
As shown in fig. 2, an execution main body of the method may be a service server, where the service server may be an independent server, or may also be a server cluster formed by a plurality of servers, and the service server may be a background server of financial services or online shopping services, or a server of risk prevention and control services in a certain field, for example. The method may specifically comprise the steps of:
in step S202, a proxy service processing request for the target service provided by the proxy task manager based on the proxy object is obtained, where the proxy service processing request is a request generated by the proxy task manager based on the intercepted service processing request for the target service sent by the service initiator, and the proxy object is a proxy object corresponding to the service initiator generated by the proxy task manager.
In step S204, the target service is processed based on the proxy service processing request, and a processing result corresponding to the proxy service processing request is obtained.
In step S206, the processing result corresponding to the proxy service processing request is provided to the proxy task manager, so that the proxy task manager determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
For the specific processing procedure of the step S202 to the step S206, reference may be made to the relevant contents in the first embodiment, and details are not described herein again.
The embodiment of the present specification provides a service processing method, which includes intercepting a service processing request of a target service sent by a service initiator through an agent task manager, generating an agent object corresponding to the service initiator and an agent service processing request corresponding to the service processing request, so that the service processing of the service initiator is intercepted by the agent task manager, and a task can be separated from the service, and further, based on the agent object, the agent service processing request is provided to a service server of the target service, so that the service server processes the target service based on the agent service processing request, obtains a processing result corresponding to the agent service processing request provided by the service server, and determines the processing result corresponding to the service processing request based on the processing result corresponding to the agent service processing request, and providing a processing result corresponding to the service processing request to a service initiator, so that the execution result of the intermediate task does not need to be sensed by the service server, lightweight task management and control are completed through the dynamic proxy of the proxy task manager, and the expandability of the service server can be improved.
EXAMPLE III
As shown in fig. 3, an embodiment of the present specification provides a service processing method, which may be implemented by a proxy task manager and a service server together, where the proxy task manager may be a terminal device or a server, or may be an application program or a hardware device installed in the terminal device or the server, where the terminal device may be a mobile terminal device such as a mobile phone or a tablet computer, or may be a device such as a personal computer, and where the server may be an independent server, or a server cluster formed by multiple servers. The business server may be an independent server, or a server cluster formed by a plurality of servers, and the business server may be a background server of financial business or online shopping business, or a server of risk prevention and control business in a certain field, and the like. In addition, the agent task manager and the service server may be devices independent of each other, or the agent task manager may be a component in the service server, where the component may be constructed based on a corresponding hardware component and a corresponding application program, or the component may be constructed by an application program written in a predetermined programming language.
The method may specifically comprise the steps of:
in step S302, the agent task manager intercepts a service processing request of a target service sent by a service initiator.
The target service may be a service corresponding to cleaning, fusion, or compensation of the target data.
In step S304, the proxy task manager sends the notification message received by the service processing request to the service initiator, and generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request.
In implementation, after the agent task manager intercepts a service processing request of a target service sent by a service initiator, in order to timely notify the service initiator that the service processing request of the target service has been received, the agent task manager is processing the target service, and may generate a corresponding notification message and send the notification message to the service initiator, so that the service initiator may know that the service processing request has been received, and the service server is ready to or starts to process the target service. It should be noted that, in order to improve processing efficiency, the proxy task manager may send the notification message to the service initiator in an asynchronous manner, and meanwhile, the proxy task manager may generate a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request, and a specific processing procedure may refer to the above related contents, which is not described herein again.
In step S306, the proxy task manager provides the proxy service processing request to the service server of the target service based on the proxy object.
Based on the processing in step S306, the service server may obtain a proxy service processing request for the target service, provided by the proxy task manager based on the proxy object, where the proxy service processing request is a request generated by the proxy task manager based on the intercepted service processing request for the target service sent by the service initiator, and the proxy object is a proxy object corresponding to the service initiator generated by the proxy task manager, based on the relevant content.
In step S308, the service server generates task states of one or more tasks corresponding to the proxy service processing request based on the proxy service processing request.
Based on that the target task is a service corresponding to cleaning, fusing, or compensating of the target data, the one or more tasks may include one or more of cleaning, fusing, and compensating of the target data, that is, if the target task is a single task, the task may be one of cleaning, fusing, and compensating of the target data, and if the target task is multiple tasks, the multiple tasks may be multiple ones of cleaning, fusing, and compensating of the target data, for example, the agent service processing request corresponds to three tasks, that is, a task cleaning, fusing, and compensating of the target data, and each task may be loaded to the state controller.
In implementation, a state controller may be disposed in the service server, and the state controller may be configured in a form of hardware and/or software, and may be configured to be responsible for uniformly saving states of the respective tasks, saving states of the current respective tasks, and the like. After the service server obtains the proxy service processing request, the proxy service processing request may be analyzed to determine a target service corresponding to the proxy service processing request and information (which may include the number of tasks, an identifier, and the like) of tasks that need to be executed to process the target service, and then, tasks that need to be executed may be created, and a task state may be set for each created task. Based on the related content, the task state set for each created task can be stored in the state controller, the task state of each task can be detected in real time through the state controller, and the task state stored in the state controller can be updated in time. The task to be executed is created and can be one task or a plurality of different tasks, and the task status can include non-execution, execution failure, execution success, and the like.
In step S310, the service server triggers, based on a task state of a task corresponding to the generated proxy service processing request, operation execution of a target service corresponding to the task to obtain a corresponding execution result, and takes the execution result as a processing result corresponding to the proxy service processing request; alternatively, the first and second electrodes may be,
the service server respectively triggers the operation execution of the target service corresponding to the plurality of different tasks based on the task states of the plurality of different tasks corresponding to the generated proxy service processing request and the execution sequence of the plurality of different tasks, obtains corresponding execution results, and takes the execution results as the processing results corresponding to the proxy service processing request.
In implementation, for a task state of a task corresponding to a generated proxy service processing request, the state controller may trigger operation execution of a target service corresponding to the task to obtain a corresponding execution result, and specifically, the service server may further be provided with an operation controller, where the operation controller may be in a chain structure of responsibility, and may trigger operation execution of the target service corresponding to the task through the state controller, and after the execution is completed, if the execution is successful, the corresponding execution result may be obtained. The execution result may be used as a processing result corresponding to the proxy service processing request.
For the case of task states of multiple tasks corresponding to the generated proxy service processing request, the service server may trigger the operation execution of the target services corresponding to the multiple different tasks respectively based on the task states of the multiple different tasks corresponding to the generated proxy service processing request and the execution order of the multiple different tasks, to obtain corresponding execution results, specifically, the service server may obtain the task states of the multiple different tasks corresponding to the generated proxy service processing request and the execution order of the multiple different tasks, and then, based on the task states of the multiple different tasks and the execution order of the multiple different tasks, trigger the operation execution of the target services corresponding to each task of the multiple tasks by the state controller, to obtain corresponding execution results, specifically, the service server may further be provided with an operation controller, the operation controller may be in a chain structure, and may trigger the operation of the target service corresponding to each of the plurality of tasks through the state controller, execute the target service according to the execution sequence of the plurality of different tasks, and after the execution is completed, if the execution is successful, obtain a corresponding execution result. The execution result may be used as a processing result corresponding to the proxy service processing request.
In step S312, if the operation of the target service corresponding to the task fails to be executed, the service server obtains indication information indicating whether the operation of the target service corresponding to the task can be executed again.
In practical applications, the set parameter for controlling operation may include, in addition to the indication information, other related data or information, such as the maximum number of times of re-execution of the operation, the time of re-execution of the operation, and the like, which may be specifically set according to practical situations, and this is not limited in this description embodiment.
In step S314, if the indication information indicates that the operation of the target service corresponding to the task can be re-executed, the service server re-executes the operation of the target service corresponding to the task according to the maximum number of times and/or the re-execution time that the operation of the target service corresponding to the task can be executed, until obtaining a corresponding execution result.
Wherein one or more of the indication information, the maximum number of times and the time for re-execution may be obtained through one or more of the following ways: obtaining from the proxy service processing request (that is, the proxy service processing request and the service processing request may carry the indication information, the maximum number of times, the time for re-execution, and the like); acquiring based on preset information; acquiring configuration data based on a target service; obtained from a predetermined database.
The preset information may be written in a program code by a technician through a preset programming language, or may also be information set in other manners, and the preset information may be specifically set according to an actual situation. The configuration data of the target service may be a configuration file preset for the target service, and the configuration data of the information may be added to the configuration file.
In step S316, the service server updates the task status of one or more tasks corresponding to the proxy service processing request based on the processing result corresponding to the proxy service processing request.
In implementation, the service server obtains a processing result corresponding to the proxy service processing request, and may update, by the state controller, the task states of one or more tasks corresponding to the proxy service processing request stored in the state controller based on the processing result corresponding to the proxy service processing request, so as to obtain the updated task state of each task.
In step S318, the service server provides the processing result corresponding to the proxy service processing request to the proxy task manager.
In step S320, the proxy task manager determines a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator.
Based on the above-mentioned related contents, taking an agent task manager and a service server as an example of the agent task manager and the service server running the JAVA program, the key class structure corresponding to the agent task manager may be as shown in fig. 4, where Request represents a service processing Request interface, http server represents a service processing Request of a service initiator, bizhttpservletreq represents a service processing Request packaged based on an http Request, ProxyRequest represents a generated proxy service processing Request, proxyopationhandler represents a processor of the agent task manager, and invocitionhandler represents a dynamic agent interface of JAVA.
The responsibility chain structure of the Action controller can be as shown in fig. 5, where ActionParameters represent parameters for controlling operation (such as setting whether an operation needs to be re-executed, the maximum number of re-executed times, etc.), an actionhandler represents an interface that can be used to obtain the ActionParameters or customized parameters and define an interface of an Action, an abstract actionhandler represents an operation that needs to be validated for registration, a defaultactionhandler represents an execution logic that encapsulates internal logic, provides a default mechanism, executes execution logic of each operation inside, and an Action representation interface that can define an operation interface, and basicticon represents a basic operation without any additional logic, such as no re-execution, etc.
The embodiment of the present specification provides a service processing method, intercepting a service processing request of a target service sent by a service initiator, generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request, so that intercepting the service processing of the service initiator by a proxy task manager can separate a task from the service, and further, based on the proxy object, providing the proxy service processing request to a service server of the target service, so that the service server processes the target service based on the proxy service processing request, obtains a processing result corresponding to the proxy service processing request provided by the service server, and determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing a processing result corresponding to the service processing request to a service initiator, so that the execution result of the intermediate task does not need to be sensed by the service server, lightweight task management and control are completed through the dynamic proxy of the proxy task manager, and the expandability of the service server can be improved.
In addition, the dynamic agent only based on JAVA completes lightweight task management and control, including functions of task state control, operation re-execution and the like, so that service processing is simplified and feasible, and the lightweight task management function can be introduced only by simple configuration after the jar packet is introduced, and the function can be expanded according to service customization and the like.
Example four
Based on the same idea, the service processing method provided in the embodiment of the present specification further provides a service processing apparatus, as shown in fig. 6.
The service processing device comprises: an interception module 601, a generation module 602, a request sending module 603 and a result obtaining module 604, wherein:
the intercepting module 601 intercepts a service processing request of a target service sent by a service initiator;
a generating module 602, configured to generate a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request;
a request sending module 603, configured to provide the proxy service processing request to a service server of the target service based on the proxy object, so that the service server processes the target service based on the proxy service processing request, and obtains a processing result corresponding to the proxy service processing request;
the result obtaining module 604 obtains a processing result corresponding to the proxy service processing request provided by the service server, determines a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator.
In this embodiment of this specification, the generating module 602 sends a notification message received by the service processing request to the service initiator, and generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request.
In the embodiment of the present specification, the target service is a service corresponding to cleaning, fusion, or compensation of target data.
The embodiment of the present specification provides a service processing apparatus, which intercepts a service processing request of a target service sent by a service initiator, generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request, such that intercepting the service processing of the service initiator by a proxy task manager can separate a task from the service, and further provides the proxy service processing request to a service server of the target service based on the proxy object, so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request, obtains a processing result corresponding to the proxy service processing request provided by the service server, and determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing a processing result corresponding to the service processing request to a service initiator, so that the execution result of the intermediate task does not need to be sensed by the service server, lightweight task management and control are completed through the dynamic proxy of the proxy task manager, and the expandability of the service server can be improved.
In addition, the dynamic agent only based on JAVA completes lightweight task management and control, including functions of task state control, operation re-execution and the like, so that service processing is simplified and feasible, and the lightweight task management function can be introduced only by simple configuration after the jar packet is introduced, and the function can be expanded according to service customization and the like.
EXAMPLE five
Based on the same idea, embodiments of the present specification further provide a service processing apparatus, as shown in fig. 7.
The service processing device comprises: an obtaining module 701, a service processing module 702, and a result output module 703, wherein:
an obtaining module 701, configured to obtain an agent service processing request for a target service, provided by an agent task manager based on an agent object, where the agent service processing request is a request generated by the agent task manager based on an intercepted service processing request of the target service sent by a service initiator, and the agent object is an agent object corresponding to the service initiator and generated by the agent task manager;
a service processing module 702, configured to process the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
a result output module 703, configured to provide a processing result corresponding to the proxy service processing request to the proxy task manager, so that the proxy task manager determines, based on the processing result corresponding to the proxy service processing request, a processing result corresponding to the service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
In an embodiment of this specification, the apparatus further includes:
the state generation module is used for generating task states of one or more tasks corresponding to the proxy service processing request based on the proxy service processing request;
the result output module 703 includes:
the state updating unit is used for updating the task states of one or more tasks corresponding to the proxy service processing request based on the processing result corresponding to the proxy service processing request;
and the result output unit is used for providing the processing result corresponding to the proxy service processing request to the proxy task manager.
In this embodiment of this specification, the service processing module 702, based on a task state of a task corresponding to the generated proxy service processing request, triggers operation execution of the target service corresponding to the task to obtain a corresponding execution result, and takes the execution result as a processing result corresponding to the proxy service processing request; or respectively triggering the operation execution of the target service corresponding to the plurality of different tasks based on the generated task states of the plurality of different tasks corresponding to the proxy service processing request and the execution sequence of the plurality of different tasks to obtain corresponding execution results, and taking the execution results as the processing results corresponding to the proxy service processing request.
In an embodiment of this specification, the apparatus further includes:
an indication information obtaining module, configured to obtain, if execution of the operation of the target service corresponding to the task fails, indication information indicating whether the operation of the target service corresponding to the task can be re-executed;
and a re-execution module, configured to re-execute the operation of the target service corresponding to the task according to the maximum number of times and/or re-execution time that the operation of the target service corresponding to the task can be executed, if the indication information indicates that the operation of the target service corresponding to the task can be re-executed, until a corresponding execution result is obtained.
In an embodiment of the present specification, one or more of the indication information, the maximum number of times, and the time for re-execution are obtained by one or more of:
obtaining from the proxy service processing request;
acquiring based on preset information;
acquiring configuration data based on the target service;
obtained from a predetermined database.
In an embodiment of the present specification, the one or more tasks include one or more of a cleaning task, a fusion task, and a compensation task on the target data.
The embodiment of the present specification provides a service processing apparatus, which intercepts a service processing request of a target service sent by a service initiator through a proxy task manager, and generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request, so that the service processing of the service initiator is intercepted by the proxy task manager, and a task can be separated from the service, and further, based on the proxy object, the proxy service processing request is provided to a service server of the target service, so that the service server processes the target service based on the proxy service processing request, obtains a processing result corresponding to the proxy service processing request provided by the service server, and determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing a processing result corresponding to the service processing request to a service initiator, so that the execution result of the intermediate task does not need to be sensed by the service server, lightweight task management and control are completed through the dynamic proxy of the proxy task manager, and the expandability of the service server can be improved.
In addition, the dynamic agent only based on JAVA completes lightweight task management and control, including functions of task state control, operation re-execution and the like, so that service processing is simplified and feasible, and the lightweight task management function can be introduced only by simple configuration after the jar packet is introduced, and the function can be expanded according to service customization and the like.
EXAMPLE six
Based on the same idea, the service processing apparatus provided in the embodiment of the present specification further provides a service processing device, as shown in fig. 8.
The service processing device may be the proxy task manager provided in the foregoing embodiment.
The business processing apparatus, which may have a large difference due to different configurations or performances, may include one or more processors 801 and a memory 802, and one or more stored applications or data may be stored in the memory 802. Wherein the memory 802 may be a transient storage or a persistent storage. The application program stored in memory 802 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for a business processing device. Still further, the processor 801 may be configured to communicate with the memory 802 such that a series of computer-executable instructions in the memory 802 are executed on the business processing device. The traffic processing apparatus may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input-output interfaces 805, one or more keyboards 806.
In particular, in this embodiment, the business processing apparatus includes a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the business processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
intercepting a service processing request of a target service sent by a service initiator;
generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request;
based on the proxy object, providing the proxy service processing request to a service server of the target service, so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
and acquiring a processing result corresponding to the proxy service processing request provided by the service server, determining a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing the processing result corresponding to the service processing request to the service initiator.
In this embodiment of this specification, the generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request includes:
and sending a notification message received by the service processing request to the service initiator, and generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request.
In the embodiment of the present specification, the target service is a service corresponding to cleaning, fusion, or compensation of target data.
The embodiments of the present specification provide a service processing device, which intercepts a service processing request of a target service sent by a service initiator, generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request, such that intercepting the service processing of the service initiator by a proxy task manager can separate a task from the service, and further provides the proxy service processing request to a service server of the target service based on the proxy object, so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request, obtains a processing result corresponding to the proxy service processing request provided by the service server, and determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing a processing result corresponding to the service processing request to a service initiator, so that the execution result of the intermediate task does not need to be sensed by the service server, lightweight task management and control are completed through the dynamic proxy of the proxy task manager, and the expandability of the service server can be improved.
In addition, the dynamic agent only based on JAVA completes lightweight task management and control, including functions of task state control, operation re-execution and the like, so that service processing is simplified and feasible, and the lightweight task management function can be introduced only by simple configuration after the jar packet is introduced, and the function can be expanded according to service customization and the like.
EXAMPLE seven
Based on the same idea, embodiments of the present specification further provide a service processing device, as shown in fig. 9.
The service processing device may be the service server provided in the foregoing embodiment.
The business processing apparatus, which may have a large difference due to different configurations or performances, may include one or more processors 901 and a memory 902, and one or more stored applications or data may be stored in the memory 902. Memory 902 may be, among other things, transient storage or persistent storage. The application program stored in memory 902 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for a business processing device. Still further, processor 901 may be configured to communicate with memory 902 to execute a series of computer-executable instructions in memory 902 on a business processing device. The traffic processing apparatus may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input-output interfaces 905, one or more keyboards 906.
In particular, in this embodiment, the business processing apparatus includes a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the business processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
acquiring an agent service processing request aiming at a target service, which is provided by an agent task manager based on an agent object, wherein the agent service processing request is generated by the agent task manager based on an intercepted service processing request of the target service, which is sent by a service initiator, and the agent object is the agent object corresponding to the service initiator and generated by the agent task manager;
processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
and providing a processing result corresponding to the proxy service processing request to the proxy task manager, so that the proxy task manager determines a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
In this embodiment of this specification, after acquiring the proxy service processing request for the target service provided by the proxy task manager based on the proxy object, the method further includes:
generating task states of one or more tasks corresponding to the agent service processing request based on the agent service processing request;
the providing the processing result corresponding to the agent service processing request to the agent task manager includes:
updating the task state of one or more tasks corresponding to the agent service processing request based on the processing result corresponding to the agent service processing request;
and providing a processing result corresponding to the agent service processing request to the agent task manager.
In this embodiment of this specification, the processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request includes:
triggering the operation execution of the target service corresponding to the task based on the generated task state of the task corresponding to the proxy service processing request to obtain a corresponding execution result, and taking the execution result as a processing result corresponding to the proxy service processing request; alternatively, the first and second electrodes may be,
based on the generated task states of a plurality of different tasks corresponding to the agent service processing request and the execution sequence of the plurality of different tasks, respectively triggering the operation execution of the target service corresponding to the plurality of different tasks to obtain corresponding execution results, and taking the execution results as the processing results corresponding to the agent service processing request.
In the embodiment of this specification, the method further includes:
if the operation execution of the target service corresponding to the task fails, acquiring indication information whether the operation of the target service corresponding to the task can be executed again;
and if the indication information indicates that the operation of the target service corresponding to the task can be re-executed, re-executing the operation of the target service corresponding to the task according to the maximum number of times and/or the re-execution time that the operation of the target service corresponding to the task can be executed until a corresponding execution result is obtained.
In an embodiment of the present specification, one or more of the indication information, the maximum number of times, and the time for re-execution are obtained by one or more of:
obtaining from the proxy service processing request;
acquiring based on preset information;
acquiring configuration data based on the target service;
obtained from a predetermined database.
In an embodiment of the present specification, the one or more tasks include one or more of a cleaning task, a fusion task, and a compensation task on the target data.
The embodiment of the present specification provides a service processing device, which intercepts a service processing request of a target service sent by a service initiator through a proxy task manager, and generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request, so that the service processing of the service initiator is intercepted by the proxy task manager, and a task can be separated from the service, and further, based on the proxy object, the proxy service processing request is provided to a service server of the target service, so that the service server processes the target service based on the proxy service processing request, obtains a processing result corresponding to the proxy service processing request provided by the service server, and determines a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing a processing result corresponding to the service processing request to a service initiator, so that the execution result of the intermediate task does not need to be sensed by the service server, lightweight task management and control are completed through the dynamic proxy of the proxy task manager, and the expandability of the service server can be improved.
In addition, the dynamic agent only based on JAVA completes lightweight task management and control, including functions of task state control, operation re-execution and the like, so that service processing is simplified and feasible, and the lightweight task management function can be introduced only by simple configuration after the jar packet is introduced, and the function can be expanded according to service customization and the like.
Example eight
As shown in fig. 10, the embodiment of the present specification provides a business system, which may be a business system of any business, for example, the business system may be a business system of an online shopping business, a business system of a financial business, a business system of a data management business, a business system of risk prevention and control in a certain field, and the like. The business system may include an agent task manager 1001 and a business server 1002, wherein:
the agent task manager 1001 intercepts a service processing request of a target service sent by a service initiator, generates an agent object corresponding to the service initiator and an agent service processing request corresponding to the service processing request, and provides the agent service processing request to a service server 1002 of the target service based on the agent object;
the service server 1002 processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the proxy service processing request to the proxy task manager 1001;
the agent task manager 1001 determines a processing result corresponding to the service processing request based on a processing result corresponding to the agent service processing request, and provides the processing result corresponding to the service processing request to the service initiator.
For the above specific processing procedure, reference may be made to relevant contents in the first embodiment and the third embodiment, which are not described herein again.
It should be noted that the agent task manager 1001 and the service server 1002 may be devices independent from each other, or the agent task manager 1001 may be a component in the service server 1002, where the component may be constructed based on a corresponding hardware component and a corresponding application program, or the component may be constructed by an application program written in a predetermined programming language.
In the case where the proxy task manager 1001 is a component in the service server 1002, as shown in fig. 11, in order to simplify the processing procedure and improve the processing efficiency, the proxy task manager 1001 is introduced into the service server 1002 by being encapsulated into a predetermined executable packet.
The executable data package may be a data package that can be directly used by a predetermined compiler or a compiling tool, and the executable data package may include multiple types or may be written in multiple different programming languages, which is not limited in this specification.
In implementation, according to actual situations, the proxy task manager 1001 may be packaged into an executable data package of a certain type, and through the above packaging, a corresponding executable data package may be obtained, and when the service server 1002 needs to be upgraded or the proxy task manager 1001 (or proxy function, etc.) needs to be added to the service server 1002, the above packaged executable data package may be directly implanted into the service server 1002, so that the proxy task manager 1001 is presented in the service server 1002, and the extensibility of the service server 1002 is improved.
Optionally, the encapsulated executable packet may be an executable jar packet.
In implementation, for a service system developed based on the JAVA programming language, the proxy task manager may be encapsulated into an executable jar data packet, so that the executable jar data packet may be obtained, and when the service server 1002 needs to be upgraded or the proxy task manager 1001 (or proxy function, etc.) needs to be added to the service server 1002, the encapsulated executable jar data packet may be directly implanted into the service server 1002.
Besides, the introduction of the proxy task manager 1001 into the service server 1002 may be implemented in other various ways besides the introduction into the service server 1002 by the way in which the proxy task manager 1001 is encapsulated into a predetermined executable data packet, and the following provides an alternative processing way, which may specifically include the following: the agent task manager 1001 is pre-built in the service server 1002 through a preset component building mechanism.
The component building mechanism can build a corresponding component mechanism through a preset component or project building tool in a preset mode or flow. The component construction mechanism may include multiple different types of components or items, and the corresponding component construction mechanism may be different and may be specifically set according to an actual situation, which is not limited in this specification.
In implementation, the component construction mechanism may be various, and an optional component construction mechanism is provided as follows, that is, if the preset component construction mechanism is a maven mechanism, the specific processing may be as follows: first, a maven project, i.e., the proxy task manager 1001, may be created, which may include, for example: selecting and establishing a MavenProject; selecting a project path; selecting a type of item; inputting item identification (i.e., GroupID) and sub-item identification (i.e., ArtifactID), and constructing a Package. Then, a maven project can be configured, i.e., the project is changed into a dynamic Web project; a deployment assembly is set. And finally, a framework can be constructed, namely, a needed jar data packet is added into the pom. In the above manner, when the service server 1002 needs to be upgraded or the proxy task manager 1001 (or proxy function, etc.) needs to be added to the service server 1002, the proxy task manager 1001 can be built in the service server 1002 through the component building mechanism.
In this embodiment of the present specification, the proxy task manager 1001 sends a notification message received by the service processing request to the service initiator, and generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request.
In the embodiment of the present specification, the target service is a service corresponding to cleaning, fusion, or compensation of target data.
In this embodiment of the present specification, the service server 1002 generates task states of one or more tasks corresponding to the proxy service processing request based on the proxy service processing request; the providing the processing result corresponding to the agent service processing request to the agent task manager includes: updating the task state of one or more tasks corresponding to the agent service processing request based on the processing result corresponding to the agent service processing request; the processing result corresponding to the proxy service processing request is provided to the proxy task manager 1001.
In this embodiment of this specification, the service server 1002, based on a task state of a task corresponding to the generated proxy service processing request, triggers operation execution of the target service corresponding to the task to obtain a corresponding execution result, and takes the execution result as a processing result corresponding to the proxy service processing request; or respectively triggering the operation execution of the target service corresponding to the plurality of different tasks based on the generated task states of the plurality of different tasks corresponding to the proxy service processing request and the execution sequence of the plurality of different tasks to obtain corresponding execution results, and taking the execution results as the processing results corresponding to the proxy service processing request.
In this embodiment of the present specification, if the operation execution of the target service corresponding to the task fails, the service server 1002 obtains indication information indicating whether the operation of the target service corresponding to the task can be executed again; and if the indication information indicates that the operation of the target service corresponding to the task can be re-executed, re-executing the operation of the target service corresponding to the task according to the maximum number of times and/or the re-execution time that the operation of the target service corresponding to the task can be executed until a corresponding execution result is obtained.
In an embodiment of the present specification, one or more of the indication information, the maximum number of times, and the time for re-execution are obtained by one or more of:
obtaining from the proxy service processing request;
acquiring based on preset information;
acquiring configuration data based on the target service;
obtained from a predetermined database.
In an embodiment of the present specification, the one or more tasks include one or more of a cleaning task, a fusion task, and a compensation task on the target data.
The embodiment of the present specification provides a service system, which intercepts a service processing request of a target service sent by a service initiator through a proxy task manager, generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request, such that the service processing of the service initiator is intercepted by the proxy task manager, so as to separate a task from the service, and further, based on the proxy object, the proxy service processing request is provided to a service server of the target service, such that the service server processes the target service based on the proxy service processing request, obtains a processing result corresponding to the proxy service processing request provided by the service server, and determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing a processing result corresponding to the service processing request to a service initiator, so that the execution result of the intermediate task does not need to be sensed by the service server, lightweight task management and control are completed through the dynamic proxy of the proxy task manager, and the expandability of the service server can be improved.
In addition, the dynamic agent only based on JAVA completes lightweight task management and control, including functions of task state control, operation re-execution and the like, so that service processing is simplified and feasible, and the lightweight task management function can be introduced only by simple configuration after the jar packet is introduced, and the function can be expanded according to service customization and the like.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description 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, and the like) having computer-usable program code embodied therein.
Embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 business processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable business processing 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 business processing 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 business processing 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 a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description 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, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (21)

1. A method of traffic processing, the method comprising:
intercepting a service processing request of a target service sent by a service initiator;
generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request;
based on the proxy object, providing the proxy service processing request to a service server of the target service, so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
and acquiring a processing result corresponding to the proxy service processing request provided by the service server, determining a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing the processing result corresponding to the service processing request to the service initiator.
2. The method of claim 1, wherein generating the proxy object corresponding to the service initiator and the proxy service processing request corresponding to the service processing request comprises:
and sending a notification message received by the service processing request to the service initiator, and generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request.
3. The method of claim 1, wherein the target service is a service corresponding to a cleaning process, a fusion process, or a compensation process performed on target data.
4. A method of traffic processing, the method comprising:
acquiring an agent service processing request aiming at a target service, which is provided by an agent task manager based on an agent object, wherein the agent service processing request is generated by the agent task manager based on an intercepted service processing request of the target service, which is sent by a service initiator, and the agent object is the agent object corresponding to the service initiator and generated by the agent task manager;
processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
and providing a processing result corresponding to the proxy service processing request to the proxy task manager, so that the proxy task manager determines a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
5. The method of claim 4, after the obtaining agent task manager processes the request for the agent service for the target service based on the agent object, the method further comprising:
generating task states of one or more tasks corresponding to the agent service processing request based on the agent service processing request;
the providing the processing result corresponding to the agent service processing request to the agent task manager includes:
updating the task state of one or more tasks corresponding to the agent service processing request based on the processing result corresponding to the agent service processing request;
and providing a processing result corresponding to the agent service processing request to the agent task manager.
6. The method according to claim 5, wherein the processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request includes:
triggering the operation execution of the target service corresponding to the task based on the generated task state of the task corresponding to the proxy service processing request to obtain a corresponding execution result, and taking the execution result as a processing result corresponding to the proxy service processing request; alternatively, the first and second electrodes may be,
based on the generated task states of a plurality of different tasks corresponding to the agent service processing request and the execution sequence of the plurality of different tasks, respectively triggering the operation execution of the target service corresponding to the plurality of different tasks to obtain corresponding execution results, and taking the execution results as the processing results corresponding to the agent service processing request.
7. The method of claim 6, further comprising:
if the operation execution of the target service corresponding to the task fails, acquiring indication information whether the operation of the target service corresponding to the task can be executed again;
and if the indication information indicates that the operation of the target service corresponding to the task can be re-executed, re-executing the operation of the target service corresponding to the task according to the maximum number of times and/or the re-execution time that the operation of the target service corresponding to the task can be executed until a corresponding execution result is obtained.
8. The method of claim 7, one or more of the indication, the maximum number, and the time to re-execute is obtained by one or more of:
obtaining from the proxy service processing request;
acquiring based on preset information;
acquiring configuration data based on the target service;
obtained from a predetermined database.
9. The method of claim 7, the one or more tasks including performing one or more of a cleaning task, a fusion task, and a compensation task on the target data.
10. A traffic processing apparatus, the apparatus comprising:
the intercepting module intercepts a service processing request of a target service sent by a service initiator;
the generating module generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request;
the request sending module is used for providing the proxy service processing request to a service server of the target service based on the proxy object so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
and the result acquisition module is used for acquiring a processing result corresponding to the proxy service processing request provided by the service server, determining the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing the processing result corresponding to the service processing request to the service initiator.
11. The apparatus of claim 10, wherein the generating module sends a notification message received by the service processing request to the service initiator, and generates a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request.
12. A traffic processing apparatus, the apparatus comprising:
the system comprises an acquisition module, a service processing module and a service processing module, wherein the acquisition module is used for acquiring an agent service processing request aiming at a target service, which is provided by an agent task manager based on an agent object, the agent service processing request is generated by the agent task manager based on an intercepted service processing request of the target service, which is sent by a service initiator, and the agent object is the agent object corresponding to the service initiator and generated by the agent task manager;
the service processing module is used for processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
and the result output module is used for providing the processing result corresponding to the proxy service processing request to the proxy task manager, so that the proxy task manager determines the processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
13. The apparatus of claim 12, the apparatus further comprising:
the state generation module is used for generating task states of one or more tasks corresponding to the proxy service processing request based on the proxy service processing request;
the result output module includes:
the state updating unit is used for updating the task states of one or more tasks corresponding to the proxy service processing request based on the processing result corresponding to the proxy service processing request;
and the result output unit is used for providing the processing result corresponding to the proxy service processing request to the proxy task manager.
14. The apparatus according to claim 13, wherein the service processing module, based on a task state of a task corresponding to the generated proxy service processing request, triggers operation execution of the target service corresponding to the task to obtain a corresponding execution result, and takes the execution result as a processing result corresponding to the proxy service processing request; or respectively triggering the operation execution of the target service corresponding to the plurality of different tasks based on the generated task states of the plurality of different tasks corresponding to the proxy service processing request and the execution sequence of the plurality of different tasks to obtain corresponding execution results, and taking the execution results as the processing results corresponding to the proxy service processing request.
15. A traffic processing device, the traffic processing device comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
intercepting a service processing request of a target service sent by a service initiator;
generating a proxy object corresponding to the service initiator and a proxy service processing request corresponding to the service processing request;
based on the proxy object, providing the proxy service processing request to a service server of the target service, so that the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
and acquiring a processing result corresponding to the proxy service processing request provided by the service server, determining a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and providing the processing result corresponding to the service processing request to the service initiator.
16. A traffic processing device, the traffic processing device comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring an agent service processing request aiming at a target service, which is provided by an agent task manager based on an agent object, wherein the agent service processing request is generated by the agent task manager based on an intercepted service processing request of the target service, which is sent by a service initiator, and the agent object is the agent object corresponding to the service initiator and generated by the agent task manager;
processing the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request;
and providing a processing result corresponding to the proxy service processing request to the proxy task manager, so that the proxy task manager determines a processing result corresponding to the service processing request based on the processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the service processing request to the service initiator corresponding to the proxy object.
17. A business system comprising an agent task manager and a business server, wherein:
the agent task manager intercepts a service processing request of a target service sent by a service initiator, generates an agent object corresponding to the service initiator and an agent service processing request corresponding to the service processing request, and provides the agent service processing request to a service server of the target service based on the agent object;
the service server processes the target service based on the proxy service processing request to obtain a processing result corresponding to the proxy service processing request, and provides the processing result corresponding to the proxy service processing request to the proxy task manager;
and the agent task manager determines a processing result corresponding to the service processing request based on the processing result corresponding to the agent service processing request, and provides the processing result corresponding to the service processing request to the service initiator.
18. The business system of claim 17 wherein said proxy task manager is incorporated into said business server by being encapsulated as a predetermined executable data packet.
19. The business system of claim 18 wherein said executable data packet is an executable jar data packet.
20. The business system of claim 17, wherein said agent task manager is pre-built in said business server through a pre-defined component building mechanism.
21. The business system of claim 20 wherein said predetermined component construction mechanism is a maven mechanism.
CN202010344794.9A 2020-04-27 2020-04-27 Service processing method, device, equipment and service system Active CN111538722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010344794.9A CN111538722B (en) 2020-04-27 2020-04-27 Service processing method, device, equipment and service system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010344794.9A CN111538722B (en) 2020-04-27 2020-04-27 Service processing method, device, equipment and service system

Publications (2)

Publication Number Publication Date
CN111538722A true CN111538722A (en) 2020-08-14
CN111538722B CN111538722B (en) 2023-07-18

Family

ID=71975487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010344794.9A Active CN111538722B (en) 2020-04-27 2020-04-27 Service processing method, device, equipment and service system

Country Status (1)

Country Link
CN (1) CN111538722B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090193131A1 (en) * 2006-08-21 2009-07-30 Huawei Technologies Co., Ltd. Communication network system and method for providing a service broker function, and service broker apparatus
CN106293808A (en) * 2016-07-26 2017-01-04 北京北森云计算股份有限公司 The compiling of multilingual cloud realizes the method and system of systemic-function dynamic interception extension
US20170220380A1 (en) * 2016-02-01 2017-08-03 Microsoft Technology Licensing, Llc Proxy object system
CN108346028A (en) * 2017-01-24 2018-07-31 阿里巴巴集团控股有限公司 A kind of business approval processing method, apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090193131A1 (en) * 2006-08-21 2009-07-30 Huawei Technologies Co., Ltd. Communication network system and method for providing a service broker function, and service broker apparatus
US20170220380A1 (en) * 2016-02-01 2017-08-03 Microsoft Technology Licensing, Llc Proxy object system
CN106293808A (en) * 2016-07-26 2017-01-04 北京北森云计算股份有限公司 The compiling of multilingual cloud realizes the method and system of systemic-function dynamic interception extension
CN108346028A (en) * 2017-01-24 2018-07-31 阿里巴巴集团控股有限公司 A kind of business approval processing method, apparatus and system

Also Published As

Publication number Publication date
CN111538722B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
US10797886B2 (en) Blockchain consensus method and device
US11943317B2 (en) Multi-server node service processing and consensus method and device based on heartbeat detection messages
EP3550803B1 (en) Block chain service acceptance and consensus method and device
CN107368507B (en) Block chain-based consensus method and device
CN108418851B (en) Policy issuing system, method, device and equipment
CN107038042B (en) Service execution method and device
CN111343181B (en) Message processing method and system, data pool and computer readable storage medium
CN110427237B (en) Method and device for cross-application access to target page and electronic equipment
CN110782253A (en) Transaction processing method, device and equipment based on block chain
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN111443944B (en) Program construction method, device and equipment
US10922202B2 (en) Application service-level configuration of dataloss failover
CN110022351B (en) Service request processing method and device
CN111538722B (en) Service processing method, device, equipment and service system
CN113992429B (en) Event processing method, device and equipment
CN114968422A (en) Method and device for automatically executing contracts based on variable state
CN114518894A (en) Program update processing method and device
CN113852686B (en) Block chain network communication method, device, equipment and readable storage medium
CN115841335B (en) Data processing method, device and equipment
CN110704039B (en) Configuration data processing method and device in application development process
CN115964074A (en) Component-based service processing method and device, electronic equipment and storage medium
CN116303631A (en) Service processing method and device
CN113934474A (en) Service processing method and device and electronic equipment
CN118051220A (en) Program configuration processing method and device
CN115859266A (en) Micro-service management method, device, medium and computing equipment

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