CN114461358A - Service processing method and system - Google Patents

Service processing method and system Download PDF

Info

Publication number
CN114461358A
CN114461358A CN202111583509.XA CN202111583509A CN114461358A CN 114461358 A CN114461358 A CN 114461358A CN 202111583509 A CN202111583509 A CN 202111583509A CN 114461358 A CN114461358 A CN 114461358A
Authority
CN
China
Prior art keywords
service
provider
object generation
scheduling policy
determining
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.)
Pending
Application number
CN202111583509.XA
Other languages
Chinese (zh)
Inventor
刘江浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202111583509.XA priority Critical patent/CN114461358A/en
Publication of CN114461358A publication Critical patent/CN114461358A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the specification provides a service processing method and a service processing system, wherein the method comprises the following steps: receiving an object generation request sent by a task processing module, wherein the object generation request carries object attribute information, and the object attribute information is one or more attributes of an instantiated object; determining a service provider based on the object attribute information, and determining a service scheduling policy based on the service provider, wherein the service scheduling policy is a policy for acquiring an object generation service; acquiring the object generation service based on the service scheduling policy; and generating the instantiation object based on the object generation service, and sending the instantiation object to the task processing module. The method realizes the flexible and quick determination of the object generation service according to the requirements based on the service scheduling strategy, and the instantiation object is quickly generated by the object generation service, so that the problem of increased operation and maintenance cost caused by adopting a customized packaging mode is solved.

Description

Service processing method and system
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a service processing method.
Background
With the continuous development of computer technology, an internet mechanism is required to acquire a required SDK (software development kit) product from an SDK provider according to its own requirements in the process of developing computer software, so as to save development cost, thereby achieving the purpose of efficiently developing computer software through the SDK product.
In the prior art, an SDK provider needs to access provider capabilities provided by a provider, and package the provider capabilities according to the requirements of different internet organizations in a customized packaging manner, thereby providing packages meeting specific requirements for the different internet organizations.
However, the customized packaging method packages the supplier capabilities one by one, and the supplier capabilities cannot be flexibly and quickly packaged under the conditions of a large number of application scenes, different requirements of different organizations, stability of the SDK product and other factors, so that the operation and maintenance cost of the SDK product is greatly increased. And, further, the subsequent cannot generate the SDK product required by the internet organization quickly.
Disclosure of Invention
In view of this, the present specification provides a service processing method. One or more embodiments of the present specification also relate to a service processing system, a service processing apparatus, a computing device, a computer-readable storage medium, and a computer program, so as to solve the technical deficiencies of the prior art.
According to a first aspect of embodiments herein, there is provided a service processing method including:
receiving an object generation request sent by a task processing module, wherein the object generation request carries object attribute information, and the object attribute information is one or more attributes of an instantiated object;
determining a service provider based on the object attribute information, and determining a service scheduling policy based on the service provider, wherein the service scheduling policy is a policy for acquiring an object to generate service;
obtaining the object generation service based on the service scheduling policy;
and generating the instantiation object based on the object generation service, and sending the instantiation object to the task processing module.
According to a second aspect of embodiments herein, there is provided a service processing system comprising a task processing module, an object generation module, wherein,
the task processing module is configured to receive a target task, generate an object generation request based on object attribute information carried in the target task, and send the object generation request to the object generation module;
the object generation module is configured to receive an object generation request sent by a task processing module, where the object generation request carries object attribute information, the object attribute information is one or more attributes of an instantiated object, a service provider is determined based on the object attribute information, and a service scheduling policy is determined based on the service provider, where the service scheduling policy is a policy for acquiring an object generation service, the object generation service is acquired based on the service scheduling policy, the instantiated object is generated based on the object generation service, and the instantiated object is sent to the task processing module;
the task processing module is further configured to process the target task based on the received instantiation object.
According to a third aspect of embodiments herein, there is provided a service processing apparatus including:
the task processing module is configured to receive an object generation request sent by the task processing module, wherein the object generation request carries object attribute information, and the object attribute information is one or more attributes of an instantiated object;
a determining module configured to determine a service provider based on the object attribute information and determine a service scheduling policy based on the service provider, wherein the service scheduling policy is a policy for acquiring an object to generate a service;
an acquisition module configured to acquire the object generation service based on the service scheduling policy;
a generating module configured to generate the instantiation object based on the object generation service and send the instantiation object to the task processing module.
According to a fourth aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions, which when executed by the processor, implement the steps of the service processing method.
According to a fifth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the service processing method.
According to a sixth aspect of embodiments herein, there is provided a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the service processing method.
The service processing method provided by the specification comprises the steps of receiving an object generation request sent by a task processing module, wherein the object generation request carries object attribute information, and the object attribute information is one or more attributes of an instantiated object; determining a service provider based on the object attribute information, and determining a service scheduling policy based on the service provider, wherein the service scheduling policy is a policy for acquiring an object to generate service; obtaining the object generation service based on the service scheduling policy; and generating the instantiation object based on the object generation service, and sending the instantiation object to the task processing module.
Specifically, the method determines a service provider based on object attribute information carried in an object generation request, and based on a service scheduling policy determined by the service provider, flexible and quick determination according to requirements is realized, and an object generation service required by an instantiated object is generated, so that the instantiated object is quickly generated through the object generation service, and the problem of increased operation and maintenance cost caused by adopting a customized packaging mode is solved; and by sending the instantiation object to the task processing module, the task processing module can generate the SDK product quickly based on the instantiation object.
Drawings
FIG. 1 is a schematic diagram of an architecture of a service processing system according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a service processing system applied in an SDK product scenario according to an embodiment of the present specification;
FIG. 3 is a flow diagram of a method for service processing provided by one embodiment of the present description;
fig. 4 is a schematic flowchart illustrating a method for determining a target service provider in a service processing method according to an embodiment of the present specification;
FIG. 5 is a flow chart illustrating a processing procedure of a service processing method according to an embodiment of the present specification;
fig. 6 is a schematic structural diagram of a service processing apparatus according to an embodiment of the present specification;
fig. 7 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, as those skilled in the art will be able to make and use the present disclosure without departing from the spirit and scope of the present disclosure.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present specification relate are explained.
And (3) SDK: a software development kit is generally a collection of development tools used by some software engineers to build application software for a specific software package, software framework, hardware platform, operating system, and the like.
Hot plugging: when the developer uses the SDK capability, the SDK provider does not need to be compiled and packaged again, and only needs to select different supplier libraries to integrate by a client according to different requirements.
Class (Class): is the basis for realizing information encapsulation by Object-oriented programming (OOP). A class is a user-defined type of reference data, also called a class type. Each class contains a description of the data and a set of functions that operate on the data or pass messages. Instances of classes are referred to as objects.
Object: an object is a specific instance of a class.
Factory type: refers to a class in java (a door-to-object programming language) that a portion of the class must be created by its getInstance method.
getInstance: is a function that can be used in java to create instances of classes using a singleton schema.
With the continuous development of computer technology, in the process of developing computer software, a mechanism is required to acquire a required SDK (software development kit) product from an SDK provider according to the self requirement in order to save the development cost, so that the purpose of efficiently developing the computer software can be achieved through the SDK product.
When an SDK provider (an SDK manufacturer) accesses the capability of a provider and generates an SDK product based on the capability of the provider, the SDK provider often faces the access of the capability of a plurality of providers, and the stability and the success rate of the capability of the providers are uneven; meanwhile, the SDK demander may also have an appeal of alternative access or specific provider access to the problems of the provider, such as package size, service factors, bidding, and the like. In the face of a large number of customer scenarios, different requirements of different customers, product stability and other factors, one mode provided by the specification is to adopt a customized packaging scheme aiming at a scenario accessed by multiple suppliers or specified suppliers, package the SDK capability (supplier capability) and a supplier library together or realize customized dependence, and provide a package meeting specific requirements for SDK demanders.
However, if the SDK provider combines and packages the provider capabilities one by one for different scenes, the operation and maintenance cost of the SDK provider will be greatly increased, the research and development efficiency is greatly reduced, and the ROI (return on investment) of the SDK provider is reduced. At the same time, the access of the client is troublesome, and the SDK product must be replaced when the SDK provider or the SDK demander replaces the supplier. And if the SDK product conflicts with other supplier libraries integrated by the client, the conflict problem cannot be solved well.
In view of this, in the present specification, there is provided a service processing method, and the present specification simultaneously relates to a service processing system, a service processing apparatus, a computing device, a computer-readable storage medium, and a computer program, which are described in detail one by one in the following embodiments.
Fig. 1 shows a schematic structural diagram of a service processing system provided according to an embodiment of the present specification, the service processing system includes a task processing module 102 and an object generating module 104, wherein,
the task processing module is configured to receive a target task, generate an object generation request based on object attribute information carried in the target task, and send the object generation request to the object generation module;
the object generation module is configured to receive an object generation request sent by a task processing module, where the object generation request carries object attribute information, the object attribute information is one or more attributes of an instantiated object, a service provider is determined based on the object attribute information, and a service scheduling policy is determined based on the service provider, where the service scheduling policy is a policy for acquiring an object generation service, the object generation service is acquired based on the service scheduling policy, the instantiated object is generated based on the object generation service, and the instantiated object is sent to the task processing module;
the task processing module is further configured to process the target task based on the received instantiation object.
In practical application, the service processing system can quickly support access to an ToB product in the face of an unavailable customer appeal, the ToB product can be set according to a practical application scene, and the ToB product is not specifically limited in the specification; for example, the ToB product may be an SDK product; when the service processing system is applied to the SDK product scenes, the service processing system has strong universality on the SDK product, can realize flexible access of the capabilities of multiple suppliers, and does not need to customize different SDK products aiming at different scenes. For ease of understanding, the following description is given in the context of a service processing system applied to an SDK product.
In an actual application, the service processing system can be applied to a scenario of an SDK product, and in the scenario of the SDK product, the service processing system can generate an object for processing a request to be processed sent by an SDK demander based on the object generation module 104, and implement the SDK product for processing the request to be processed based on the instantiated object through the task processing module 102, that is, the service processing system can support implementation of the SDK product. Correspondingly, the instantiation object may be understood as an object that processes a target task, for example, an object obtained by instantiating a class. The SDK demander may be understood as a mechanism for developing computer software, such as an internet mechanism, and in practical applications, the SDK demander obtains a required SDK product from an SDK provider in order to provide development efficiency and reduce development cost, so as to implement a part of functions of the computer software based on the SDK product.
The target task can be understood as a request that an SDK demander indicates an SDK product to perform a specific operation, namely a request to be processed, and in practical application, the target task is different when the SDK product is different; for example, where the SDK product is a payment SDK, the target task may be a request to instruct the payment SDK to perform a transfer operation. In the case where the SDK product is a data analysis SDK, the target task may be a request to instruct the data analysis SDK product to perform a data analysis operation.
The task processing module 102 may be understood as a module capable of processing a target task, and in a scenario where the service processing system provided in the present specification is applied to an SDK product, the task processing module 102 may be a service function logic of the SDK, and also an external capability provided by an SDK manufacturer, that is, a capability provided by the SDK manufacturer to an SDK demander; in the case where the SDK products are different, the capability is also different, for example, the capability may be a transfer capability, a data analysis capability, a data search capability, or the like.
The service provider may be understood as a provider that provides various computer software capabilities, for example, a vendor that is capable of providing various computer software capabilities to SDK vendors, such as a data analysis organization, an internet financial organization, a communications organization, and so on. Correspondingly, the object generation service can be understood as the computer software capability provided by the supplier to the SDK vendor; because the suppliers are different, the suppliers provide different capabilities, for example, the suppliers are data analysis organizations, and the computer software capability provided by the suppliers can be data analysis capability; the provider is an internet financial institution, and the computer software capability provided by the provider may be transfer capability; in actual practice, the computer software capabilities provided by the vendor are also referred to as atomic capabilities, and are implemented based on classes created by the vendor.
The object generation module 104 may be understood as a module that generates an instantiated object based on an object generation service in a service processing system, and in a case where the object generation service is a computer software capability provided by a provider and the computer software capability is implemented by a class, the object generation module 104 may be a module that instantiates the class that implements the computer software capability, thereby obtaining the object. Based on the above, the object obtained by instantiating the class can realize the computer software capability provided by the supplier, so that the request of the SDK demander is processed based on the computer software capability.
In practical applications, there are multiple providers accessing SDK providers, and the capabilities provided by the providers may be the same or different; therefore, in the case of acquiring the atomic capability provided by the vendor and generating the object based on the atomic capability, how to determine which vendor's atomic capability needs to be acquired may be determined by the service scheduling policy, that is, the service scheduling policy may be understood as a policy for determining a specific vendor from a plurality of vendors accessing the SDK provider, so as to facilitate the subsequent generation of the instantiated object according to the acquired atomic capability of the specific vendor. Or, the service scheduling policy may be understood as a policy that determines a specific provider from a plurality of providers accessing the SDK provider and obtains an atomic capability of the specific provider, so as to facilitate generation of an instantiated object from the atomic capability of the subsequent specific provider.
Meanwhile, the object generation module 104 can also abstract one or more provider capabilities of the same type into an interface by making an abstract design for the provider capabilities used by the task processing module 102. Thus, the object generation module 104 is not specifically implemented, but merely provides an interface. For example, the provider a provides a "short message obtaining capability a", the provider B provides a "short message obtaining capability B", and the "short message obtaining capability a" and the "short message obtaining capability B" are the same type of capability, based on which the object generating module 104 can abstract the "short message obtaining capability a" and the "short message obtaining capability B" into a short message obtaining interface. In practical application, before accessing the capability of a provider, the object generation module 104 needs to abstract the capability provided by the provider, abstract a core interface, and obtain an abstract interface; for the upper layer task processing module 102, it is not necessary to care which provider provides the access capability, but only the target task needs to be processed based on the object sent by the object generating module 104. After accessing the capabilities of the providers, each provider creates a separate module at the time of access, and relies on the abstract interface of the object generation module 104 to create an implementation class for access in the module, and the implementation class needs to implement the abstract interface to provide the capabilities for access. And the implementation class needs to register itself with the factory class of the object generation module 104.
The object attribute information may be set according to an actual application scenario, and this is not specifically limited in this specification, for example, the object attribute information may be an identifier of a provider that is specified by the SDK demander and used for generating the instantiated object, a network type of the SDK demander, a specified parameter of the SDK demander, or a service type of the instantiated object that is required by the SDK demander, where the service type may be a type of computer software capability that can be implemented by the instantiated object, and the service type may be, for example, data analysis, data search, one-key login, or the like. In practical applications, many SDK demanders can directly specify that an instantiation object is generated by the capability of a specific supplier through a request sent to an SDK product, so as to implement a specific operation through the instantiation object, for example, the SDK demander a sends a processing request of "one-touch login" to the SDK product, and carries an identifier of the communication supplier a and an identifier of the data acquisition supplier B in the processing request, and after receiving the processing request, the SDK product can obtain the communication capability provided by the communication supplier a and the data acquisition capability provided by the data acquisition supplier B based on the identifier of the communication supplier a and the identifier of the data acquisition supplier B carried by the processing request; an instantiation object capable of realizing the one-key login function is generated based on the communication capacity and the data acquisition capacity. Or the SDK demander B sends a processing request for "data analysis" to the SDK product, where the processing request only carries a service type of the instantiation object required by the SDK demander B, and the service type may be data analysis; based on this, after receiving the processing request, the SDK product can determine, based on the service type carried by the processing request, a vendor that can generate an instantiated object that implements the data analysis capability, where the vendor may be vendor C and vendor D; the capabilities provided by the supplier C and the capabilities provided by the supplier D are acquired, and instantiated objects capable of implementing a "data analysis" function are generated based on the capabilities of both. Based on this, the object generation request may be understood as a task that instructs the object generation module 104 to generate an instantiated object.
Specifically, the task processing module 102 in the service processing system can receive a target task carrying object attribute information, and then the task processing module 102 generates an object generation request capable of instructing the object generation module 104 to generate an instantiated object based on the object attribute information, and sends the object generation request to the object generation module 104.
An object generation module 104 in the service processing system can receive an object generation request sent by the task processing module 102, and determine a service provider based on object attribute information carried in the object generation request, where the object attribute information is one or more attributes corresponding to an instantiated object. After the service provider is determined, a service scheduling policy that generates a policy of a service for obtaining the object can be determined based on the service provider, and then the object generation module 104 can obtain the object generation service based on the scheduling policy, generate an instantiated object capable of processing the target task based on the object generation service, and send the instantiated object to the task processing module 102.
The task processing module 102 can receive the instantiation object sent by the object generation module 104 and process the target task based on the instantiation object.
The service processing system is further described below by taking an application of the service processing system in an SDK product scenario as an example. The target task can be a processing request sent by an SDK demander; the service provider is a supplier providing capabilities to SDK vendors; the object generation service provides the capability provided by the provider, the capability is realized by the class, and the instantiation object is the object obtained by instantiating the class.
Based on this, the task processing module 102 of the service processing system can receive a processing request sent by the SDK demander, where the processing request may be a request for performing "data analysis", generate an object generation request instructing the object generation module 104 to generate an object based on a provider identifier carried in the processing request, and send the object generation request to the object generation module 104, where the provider identifier is 3.
After receiving the object generation request, the object generation module 104 determines 3 suppliers (supplier a, supplier B, and supplier C) corresponding to the supplier identifier based on the 3 supplier identifiers carried in the object generation request, where the capabilities of the 3 suppliers are different; and then determining a service scheduling policy based on the 3 suppliers, wherein the service scheduling policy can directly determine the 3 suppliers as the suppliers generating objects and obtain the atomic capabilities provided by the 3 suppliers under the condition that the capabilities of the 3 suppliers are different. That is, the classes provided by the 3 vendors that can implement the atomic capability are obtained. After obtaining the class, the object generation module 104 performs instantiation processing on the class, thereby obtaining an object capable of processing the processing request sent by the SDK demander, and sends the generated object to the task processing module 102.
In practical applications, if the capabilities of 3 providers are the same, for example, the capabilities of the provider a and the provider B are the same, in this case, a provider with lower delay may be selected from the providers a and the provider B with the same capabilities through the service scheduling policy, and the provider with lower delay may be the provider a; and acquires the atomic capabilities provided by vendor a and vendor C. Alternatively, the service scheduling policy may sequentially obtain the atomic capabilities of vendor a and vendor B, respectively.
For example, in the case that the capabilities of the provider a, the provider B, and the provider C are all the same, a provider with reduced delay may be selected from the provider a, the provider B, and the provider C with the same capabilities through the service scheduling policy, where the reduced delay may be the provider a; and acquires the atomic capability provided by vendor a. Alternatively, the service scheduling policy may obtain the atomic capabilities of vendor a, vendor B, and vendor C, respectively, in turn.
The task processing module 102 can receive the object capable of processing the processing request sent by the object generating module 104, and process the processing request based on the object, thereby implementing the "data analysis" capability required by the SDK demander.
In the service processing system provided in an embodiment of this specification, the task processing module 102 sends an object generation request generated based on object attribute information carried in a target task to the object generation module 104, the object generation module 104 determines a service provider according to the object attribute information in the object generation request, and generates a service based on a determined object determined by the service provider flexibly according to a service scheduling policy, so that an instantiated object is generated quickly by the object generation service, and the operation cost of the instantiated object is reduced.
Moreover, because the SDK product obtained by customized packaging makes the manner in which the SDK demander accesses the SDK product complicated, when the supplier fails, changes, and the like, the SDK demander needs to access the SDK product regenerated by the SDK provider again, which causes waste of time cost and labor cost. Therefore, the service processing system can rapidly provide required SDK products for SDK demanders through instantiation objects obtained by instantiating classes, the problem of complex access mode is avoided, and the instantiation objects can be rapidly and flexibly regenerated when suppliers have faults, changes and other problems, so that a great amount of waste of time cost and labor cost is avoided.
Further, the service processing system provided in this specification further includes:
a service storage module configured to receive an object generation service provided by the service provider.
In practical applications, the service storage module is only an access implementation of the capabilities of each provider, and the access implementation of each provider needs to implement an abstract interface with the object generation module 104, so that the object generation module 104 can be provided with corresponding capabilities, and therefore, the subsequent object generation module 104 can quickly acquire the capabilities provided by the provider, and in the process, the provider needs to register itself with the object generation module 104.
In practical applications, each vendor in the service storage module creates an independent module at the time of access, and creates an implementation class of access in the module depending on the abstract interface of the object generation module 104; and the implementation class requires an abstract interface that implements the object generation module 104 to provide access capabilities. And the implementation class needs to register itself with the factory class of the abstraction layer.
Based on this, the object generation module 104 in the service processing system is further configured to obtain an object generation service from the service storage module based on the service scheduling policy.
Specifically, the service storage module included in the service processing method can receive an object generation service provided by a service, and store the object generation service; correspondingly, the object generation module 104 can acquire the required object generation service from the service storage module based on the service scheduling policy when the instantiated object needs to be generated, so as to facilitate the subsequent generation of the instantiated object based on the object generation service.
In practical application, in order to ensure the security of the transfer operation executed by the instantiation object, a secret key is agreed in advance between the SDK demander and the service provider, the secret key comprises two parts, and the secret key is respectively stored by the SDK demander and the service provider, so that the security of the transfer operation is ensured through the secret key in the process of transfer operation. However, in the service processing system provided in the present specification, the object generation service provided by the service provider can be used by the object generation module 104 to generate an instantiation object and send the instantiation object to the task processing module 102, so that the task processing module 102 can process the target task sent by the SDK demander based on the capability provided by the service provider; in the process, no interaction action exists between the service provider and the object generation service, or the interaction action between the service provider and the object generation service is complex, so that when the task processing module 102 needs to acquire the key stored by the service provider, the problem that the key cannot be acquired or is difficult to acquire occurs.
The service processing system provided in this specification further includes:
a data storage module configured to store a first key of the service provider.
The data storage module may be understood as a module that stores the first key of the service provider.
In practical applications, the service processing system stores the first key of the service provider through the data storage module, so that the subsequent task processing module 102 can obtain the first key quickly.
Based on this, in the service processing system provided in the present specification, the task processing module 102 is further configured to:
determining the object generating service corresponding to the instantiation object, and acquiring a provider identifier of the service provider corresponding to the object generating service;
acquiring the first key corresponding to the provider identifier from the data storage module, and determining a second key carried in the target task;
and processing the target task based on the instantiation object under the condition that the first key is matched with the second key.
The first key may be understood as a key stored by the service provider, and correspondingly, the second key may be understood as a key stored by the SDK demander.
Following the above example, the vendor identification may be a vendor ID, among others. Based on this, during the process of accessing the SDK manufacturer, the provider needs to send the first key stored by the provider to the data storage module, which is connected to the task processing module 102.
When the task processing module 102 determines that initialization of the first key of the provider is required, it determines the class corresponding to the object, that is, determines the class from which the object is obtained by instantiation; then determining which supplier the class is provided by and acquiring the supplier ID of the supplier; acquiring a first key corresponding to the supplier ID from a data storage module; after the first key is determined, the first key is matched with a second key carried in a 'transfer' processing request sent by the SDK demand side, and when the matching result is consistent, transfer operation is carried out based on the object. Therefore, the safety in the transfer operation process is ensured, and the loss of an SDK demand side and a supplier is avoided.
The service processing system provided in the present specification is further described below with reference to fig. 2, by taking an application of the service processing system in a scenario of transferring an SDK product as an example. Fig. 2 shows a schematic structural diagram of a service processing system applied in an SDK product scenario, where a system architecture of the service processing system includes four modules, which are an SDK service layer, a provider capability abstraction layer, a provider capability access implementation layer, and an SDK storage layer, respectively, and the SDK service layer may be understood as a task processing module in the foregoing embodiment; the provider capability abstraction layer may be understood as the object generation module in the above embodiments; the provider capability access implementation layer may be understood as a service storage module in the above embodiment; the SDK storage layer may be understood as the data storage module in the above-described embodiments.
In specific implementation, the developer APP can send a processing request of data analysis to the SDK service layer when the data analysis capability of the SDK product needs to be called, and the processing request can also be understood as a call request. The SDK service layer can process a request which is sent by a developer APP and needs to be subjected to data analysis, and instruct a supplier capability abstraction layer to generate a task of an object for realizing data analysis capability based on parameters (which can be parameters specified for supplier identification, network type or users) carried in the request.
And after receiving the object which is returned by the supplier capability abstraction layer based on the task and can realize the data analysis capability, the data analysis capability required by the developer APP can be realized based on the object.
In another case, when the developer APP needs to call some higher security capability to perform a specific operation, such as a "transfer" capability, in order to ensure the security of the transfer operation, the developer APP may agree with the vendor for a key, and the key is saved by the developer APP and the vendor respectively. The provider may store the key in the SDK storage layer in order to enable the SDK service layer to quickly obtain the key stored by the provider. If the provider SDK (capability provided by the provider) needs to initialize parameters such as the key, the SDK service layer can obtain the corresponding key parameters from the service end according to the corresponding provider identifier to initialize, thereby ensuring the security of operation.
The provider capability abstraction layer can exist as an independent module, and can perform abstract design on the provider capability used by the SDK service layer so as to generate an abstract interface; in addition, the supplier capability abstraction layer has an important capability of loading supplier instances, namely, instantiating a class provided by a supplier through a factory class implementation to obtain an object.
In practical application, the provider capability abstraction layer selects a provider identifier corresponding to a network type, a user-specified parameter, or a provider identifier carried in a task sent by the SDK service layer based on the network type, the user-specified parameter, or the provider identifier, and matches the provider identifier from its own registration list through a scheduling policy after the provider identifier is taken through a factory class, where the scheduling policy may be understood as a service scheduling policy in the above embodiment. And when the suitable supplier instance is matched, dynamically loading the supplier instance by utilizing the reflection loading of the factory class, and instantiating the supplier instance, so as to obtain an object capable of realizing the capability required by the developer APP, and returning the object to the SDK service layer for use.
In addition, before the provider capability is accessed, the provider capability abstraction layer needs to abstract the provider capability and abstract the core interface, and for the upper layer SDK service layer, which provider is accessed from the bottom does not need to care, and only the capability needed by the developer APP is realized based on the object sent by the provider capability abstraction layer.
The provider capability access implementation layer is only the access implementation of the capability of each provider, and the implementation of each provider needs to implement an abstraction layer interface, provide corresponding capability, and register itself with the abstraction layer.
In practical application, each vendor creates an independent module (module) at the time of access, and relies on the interface of the above vendor capability abstraction layer, an implementation class of access is created in the module, and the implementation class needs to implement an abstraction interface to provide the access capability for the vendor. Wherein the implementation class needs to register itself with the factory class of the abstraction layer. The factory class is then matched to the appropriate supplier instance from the implementation class registered in the registry.
In addition, through the mode that the suppliers create independent modules when accessing, if a new supplier needs to access subsequently, the new supplier module is directly added, the SDK service layer and the supplier capability abstract layer do not need to be adjusted, and if the SDK demander needs to dynamically select different suppliers, the SDK demander only needs to access the different supplier module.
The service processing system provided in the embodiment of the present specification changes a conventional method for directly packaging or directly relying on the provider capability and the SDK, instantiates an obtained provider instance through an architecture design with separated modules and dynamic loading of a factory class of a provider capability abstraction layer, and returns an object generated after instantiation to the SDK service layer for use, thereby implementing complete decoupling of the SDK service layer and the provider capability. Therefore, dynamic hot plug of the capability of the supplier can be realized, and the SDK demander can freely select the required supplier.
And when the supplier instance is used, different rule matching strategies (dynamic loading strategies) are adopted, and the dynamic loading of the supplier instance is realized by utilizing the reflective loading of the factory class, so that when different supplier instances are selected, different loading strategies are adopted by the factory to meet different scene requirements, and the effect is optimized. Meanwhile, through different dispatching strategies (dynamic loading strategies) of factories, automatic fault isolation can be realized, a calling scheme is optimized, and different scene requirements are further met.
Fig. 3 is a flowchart illustrating a service processing method according to an embodiment of the present specification, which specifically includes the following steps.
Step 302: receiving an object generation request sent by a task processing module, wherein the object generation request carries object attribute information, and the object attribute information is one or more attributes of an instantiated object.
The service processing method provided in the present specification can be applied to an object generation module in a service processing system, and based on this, it can be understood that the object generation module can receive an object generation request sent by a task processing module.
In practical applications, reference may be made to the above-mentioned service processing system for receiving the object generation request sent by the task processing module, and the step of receiving, by the object generation module, the object generation request sent by the task processing module is not described herein in detail.
Step 304: and determining a service provider based on the object attribute information, and determining a service scheduling policy based on the service provider, wherein the service scheduling policy is a policy for acquiring an object generation service.
Specifically, the object generation module can determine a service provider corresponding to the object data information based on the object attribute information carried in the object generation request, and determine a service scheduling policy based on the service provider.
Further, the determining a service scheduling policy based on the service provider includes:
determining an object generation service provided by the service provider and determining a service type of the object generation service;
and determining a service scheduling policy based on the service type under the condition that the service types of the object generation service are the same.
Where the object generation service is a provider capability, the service type may be understood as a type of the provider capability, such as a data analysis type, a data search type, and the like.
Along the above example, after determining 3 suppliers (supplier a, supplier B, and supplier C), the object generation module can determine the supplier capabilities (atomic capabilities) provided by the 3 suppliers, and determine the type of the supplier capabilities, where the capability type of the supplier a may be data analysis, the capability type of the supplier B may be data deduplication, and the capability type of the supplier C may be data deduplication, and when the types are the same, that is, the capability types of the supplier B and the supplier C are the same, can determine a service scheduling policy, and then obtain the data analysis capability of the supplier a through the service scheduling policy, and determine that the data deduplication capability is obtained from the supplier B or the supplier C.
In addition, under the condition that the capabilities of the 3 providers are different, a service scheduling policy is determined based on the 3 providers, and the subsequent service scheduling policy can respectively acquire the capabilities provided by the 3 providers when the capabilities of the 3 providers are different.
In the service processing method provided in this specification, an object generation service provided by the service provider is determined, and a service type of the object generation service is determined; and under the condition that the service types of the object generating services are the same, determining a service scheduling policy based on the service types, thereby facilitating the object generating services to be obtained through the service scheduling policy.
In the service processing method provided in this specification, in order to meet different scenario requirements and achieve optimization of service scheduling effects, different loading policies can be supported, and after determining a service scheduling policy based on a service type, the service scheduling policy can also be determined based on a scheduling policy identifier, which is specifically implemented as follows.
The determining a service scheduling policy based on the service provider includes:
and determining a scheduling policy identifier corresponding to the service provider, and determining a service scheduling policy based on the scheduling policy identifier.
In practical application, the object generation module can configure a corresponding scheduling policy identifier for each service provider in advance in the process of generating an instantiated object, so that when a service scheduler determines a service scheduling policy, the service scheduling policy can be determined directly based on the scheduling policy identifier corresponding to each service scheduler, and accordingly, the subsequent generation of service based on the service scheduling policy can be conveniently obtained.
Step 306: and acquiring an object generation service based on the service scheduling strategy.
The object generation module can acquire the object generation service based on the service scheduling policy in practical application, and the specific implementation mode comprises the following steps:
the method comprises the following steps: determining a target service provider based on the service scheduling policy.
Wherein the target service provider is determined from the service providers. The target service provider may be understood as a service provider corresponding to an object generation service capable of generating instantiated objects.
In one case, the service scheduling policy may be that, in a case that the capability types of the providers are the same, the provider with the same capability is determined, and based on the quality of service parameters of the provider, a provider with the highest quality of service is selected as a target provider, which is implemented as follows.
The determining a target service provider based on the service scheduling policy includes:
and determining a service quality parameter of the service provider based on the service scheduling policy, and determining a target service provider based on the service quality parameter.
The qos parameter may be understood as a parameter characterizing the qos of the service provider, for example, the qos parameter may be understood as a parameter of time delay, probability of failure, time consumed for request, and the like.
Along the above example, the service quality parameter may be understood as a request time consumption, based on which, in a case that capability types of the providers are the same, the providers with the same capability are determined based on the service scheduling policy, and based on the request time consumption of the providers, and a provider with the smallest request time consumption is selected as a target provider from the providers with the same capability types, where the target provider may be a provider capable of generating, by instantiation, a class implementing an object corresponding to the object, where the object is an object of capability required by the SDK demander.
In the embodiment of the present specification, the service quality parameter of the service provider is determined based on the service scheduling policy, and the target service provision is determined based on the service quality parameter, so that different loading policies (scheduling policies) are flexibly adopted when different vendor instances are selected, different scene requirements are met, and optimization of the effect is achieved. And, facilitating subsequent generation of objects that implement the capabilities required by the SDK demander based on the capabilities (vendor instances) provided by the target vendor.
Further, in the process of selecting the provider with the least time consumption for request from the providers with the same capability type, the manner of determining the provider with the least time consumption for request is as follows.
The determining a target service provider based on the quality of service parameter comprises:
sorting the service providers in descending order based on the quality of service parameters;
and determining the first service provider after the sequencing as a target service provider.
According to the above example, the request time consumption of each supplier in the plurality of suppliers with the same capability type is obtained, the plurality of suppliers are sorted in a descending order based on the request time consumption, the first supplier after sorting is the supplier with the minimum request time consumption, and the first supplier after sorting is determined as the target supplier. Thereby facilitating subsequent generation of objects that implement the capabilities required by the SDK demander based on the capabilities provided by the target provider.
In another case, the service scheduling policy may be to determine, in a case that the capability types of the providers are the same, the providers with the same capabilities, and select one provider from the providers in turn as a target provider, as follows.
In the service processing method provided in this specification, the number of service providers is at least two;
accordingly, the determining a target service provider based on the service scheduling policy comprises:
determining each of the service providers;
and sequentially taking each service provider as a target service provider based on the service scheduling policy.
Along the above example, each service provider may be a provider a, a provider B, and a provider C, and in the case that the capabilities of the provider a, the provider B, and the provider C are all the same, the service scheduling policy may sequentially select one from 3 providers as a target provider, respectively, and specifically, the service scheduling policy may select the provider a as the target provider in a process that needs to select one from 3 providers as the target provider for the first time; selecting vendor B as the target vendor at a second time; selecting supplier C as the target supplier for the third time; and selecting the supplier A as the target supplier again in the fourth time, and sequentially executing the operations, thereby sequentially selecting one from the 3 suppliers as the target supplier.
In an embodiment of the present specification, each of the service providers is determined; and sequentially taking each service provider as a target service provider based on the service scheduling strategy, so that different loading strategies (scheduling strategies) are flexibly adopted when different provider instances are selected, different scene requirements are met, and the effect is optimized. And, facilitating subsequent generation of objects that implement capabilities required by the SDK demander based on capabilities (vendor instances) provided by the target vendor.
In the embodiment of the present specification, after a target service provider is determined, if the target service provider fails to provide an object generation service, a service scheduling policy can be used to determine a target service provider from other service providers of the same service type again, thereby ensuring the stability of generating an instantiated object; the specific implementation is as follows.
After determining the target service provider based on the service scheduling policy, the method further includes:
acquiring running state data of the target service provider;
determining the target service provider as an abnormal service provider under the condition that the running state data is determined to be abnormal running state data;
determining the service type of the abnormal service provider, and determining the service provider with the same service type as the abnormal service provider as a candidate service provider;
determining a target service provider from the candidate service providers based on the service scheduling policy.
Wherein the operating state data may be understood as data identifying an operating state of the service provider, and the operating state data may be normal operating state data and abnormal operating state data, wherein the normal operating state data may indicate that the service provider is operating normally; the abnormal operating state data may indicate an abnormality in the operation of the service provider including, but not limited to, a fault, a request timeout, a connection interruption, etc.
By way of example, referring to fig. 4, fig. 4 is a schematic flowchart illustrating a method for determining a target service provider in a service processing method provided in an embodiment of the present specification; referring to fig. 4, in an abstraction layer in an SDK product, when a factory class requests a vendor instance generated by a vendor with a capability type a, the vendors a1 and a2 may act as two different vendors providing the same capability a, in which case, if an SDK requester accesses a1 and a2, a scheduling policy is selected based on the vendors a1 and a2, and a1 is preferentially selected based on the scheduling policy, and it is determined whether a1 meets the scheduling policy, that is, it is determined whether a failure has occurred in the use of a1, and if so, the provider instance based on a1 is returned; if not, indicating that A1 usage failed, the factory Class would flag the Class that implements the capabilities provided by A1 and switch to the A2 instance. In this way, automatic scheduling of faults can be achieved. Meanwhile, it is also necessary to determine whether a2 meets the scheduling policy, that is, whether the use fails at a2, and if yes, the provider instance based on a2 is returned; if not, indicating that A2 usage also failed, the factory Class would flag the Class that implements the capabilities provided by A2 and return to null.
Based on this, more scheduling strategies can be extended to the plant class, such as alternate scheduling to a1 and a2, or counting the time-consuming requests from a1 and a2, taking the better performance example (because the same vendor may have slightly different performance for different user groups or regional performances).
Step two: and acquiring the object generation service provided by the target service provider based on a service calling interface.
The service calling interface is determined after processing the object generation service with the same service type. In the case that the service processing method is applied to an object generation module in a service processing system, the service invocation interface may be understood as an abstract interface of the object generation module, and the abstract interface is an interface obtained by the object generation module through abstract design of capabilities provided by a provider. Based on this, after the target service provider is determined, capabilities provided by the target service provider may be obtained based on the abstract interface.
Following the above example, the object generation module, after determining the target provider, determines a supplier instance from its own registry list that matches the identification of the target supplier based on the plant class, and implements dynamic loading of the supplier instance using reflective loading of the plant class.
Step 308: generating an instantiated object based on the object generation service and sending the instantiated object to the task processing module
Specifically, after obtaining the object generation service, the object generation module can instantiate the object generation service, thereby obtaining an instantiation object, and send the instantiation object to the task processing module.
Further, the object generation module may be implemented by a factory class in the process of instantiating the object generation service, and the specific implementation manner is as follows.
The generating instantiated objects based on the object generation service includes:
and carrying out instantiation processing on the object generation service based on the object generation unit to obtain an instantiation object.
Wherein the object generation unit can be understood as a plant class.
Following the above example, wherein the object generation service can be understood as a provider instance, i.e., a class that implements provider capabilities; based on the method, after obtaining the supplier instance, the object generation module instantiates the supplier instance and returns the object obtained after the supplier instance is instantiated to the SDK service layer for use.
The service processing method provided by the specification determines a service provider based on object attribute information carried in an object generation request, and flexibly determines an object generation service based on a service scheduling policy determined by the service provider, so that an instantiation object is quickly generated by the object generation service, the operation cost of the instantiation object is reduced, and the instantiation object is sent to the task processing module, so that a subsequent task processing module can conveniently and quickly provide an SDK product based on the instantiation object, and the problem of low SDK product providing efficiency is avoided.
The foregoing is a schematic solution of a service processing method according to this embodiment. It should be noted that the technical solution of the service processing method and the technical solution of the service processing system described above belong to the same concept, and details that are not described in detail in the technical solution of the service processing method can be referred to the description of the technical solution of the service processing system described above. Correspondingly, the details of the technical scheme of the service processing system, which are not described in detail, can also be referred to the description of the technical scheme of the service processing method
The service processing method provided in this specification is further described below with reference to fig. 5, taking an application of the service processing method in a scenario of an SDK product as an example. Fig. 5 is a flowchart illustrating a processing procedure of a service processing method provided in an embodiment of the present specification, where the service processing method is applied to a provider capability abstraction layer of a service processing system, and includes the following specific steps.
Step 502: the supplier capability abstraction layer receives the object generation request sent by the SDK service layer.
Step 504: the provider capability abstraction layer determines the scheduling policy.
Step 506: the supplier capability abstraction layer obtains the supplier instance from the supplier capability access layer through a scheduling policy based on the plant class.
Step 508: the supplier capability abstraction layer instantiates the supplier instance based on the factory class and sends the object obtained after instantiation to the SDK service layer.
In the concrete implementation process, the provider capability abstraction layer determines a provider identifier corresponding to a task sent by the SDK service layer based on parameters such as network types, user-specified parameters or provider identifiers carried in the task; and matching is performed from the registration list of the scheduling policy itself through the factory class, and the scheduling policy may be understood as the service scheduling policy in the above embodiment. And when the suitable supplier instance is matched, dynamically loading the supplier instance by utilizing the reflection loading of the factory class, and instantiating the supplier instance, so as to obtain an object capable of realizing the capability required by the developer APP, and returning the object to the SDK service layer for use.
The service processing system provided in the embodiment of the present specification changes a conventional method for directly packaging or directly relying on the provider capability and the SDK, instantiates an obtained provider instance through an architecture design with separated modules and dynamic loading of a factory class of a provider capability abstraction layer, and returns an object generated after instantiation to the SDK service layer for use, thereby implementing complete decoupling of the SDK service layer and the provider capability. Therefore, dynamic hot plug of the capability of the supplier can be realized, and the SDK demander can freely select the required supplier.
And when the supplier instance is used, different rule matching strategies (dynamic loading strategies) are adopted, and the dynamic loading of the supplier instance is realized by utilizing the reflective loading of the factory class, so that when different supplier instances are selected, different loading strategies are adopted by the factory to meet different scene requirements, and the effect is optimized. Meanwhile, through different dispatching strategies (dynamic loading strategies) of factories, automatic fault isolation can be realized, a calling scheme is optimized, and different scene requirements are further met.
Corresponding to the above method embodiment, the present specification further provides an embodiment of a service processing apparatus, and fig. 6 shows a schematic structural diagram of a service processing apparatus provided in an embodiment of the present specification. As shown in fig. 6, the apparatus includes:
a receiving module 602, configured to receive an object generation request sent by a task processing module, where the object generation request carries object attribute information, and the object attribute information is one or more attributes of an instantiated object;
a determining module 604 configured to determine a service provider based on the object attribute information and determine a service scheduling policy based on the service provider, wherein the service scheduling policy is a policy for acquiring an object to generate a service;
an obtaining module 606 configured to obtain the object generation service based on the service scheduling policy;
a generating module 608 configured to generate the instantiation object based on the object generation service and send the instantiation object to the task processing module.
Optionally, the determining module 604 is further configured to:
determining an object generation service provided by the service provider and determining a service type of the object generation service;
and determining a service scheduling policy based on the service type under the condition that the service types of the object generation services are the same.
Optionally, the determining module 604 is further configured to:
and determining a scheduling policy identifier corresponding to the service provider, and determining a service scheduling policy based on the scheduling policy identifier.
Optionally, the obtaining module 606 is further configured to:
determining a target service provider based on the service scheduling policy, wherein the target service provider is determined from the service providers;
and acquiring the object generation service provided by the target service provider based on a service calling interface, wherein the service calling interface is determined after processing the object generation service with the same service type.
Optionally, the obtaining module 606 is further configured to:
and determining a service quality parameter of the service provider based on the service scheduling policy, and determining a target service provider based on the service quality parameter.
Optionally, the obtaining module 606 is further configured to:
sorting the service providers in descending order based on the quality of service parameters;
and determining the first service provider after the sequencing as a target service provider.
Optionally, the service providers are at least two;
accordingly, the obtaining module 606 is further configured to:
determining each of the service providers;
and sequentially taking each service provider as a target service provider based on the service scheduling policy.
Optionally, the obtaining module 606 is further configured to:
acquiring running state data of the target service provider;
determining the target service provider as an abnormal service provider under the condition that the running state data is determined to be abnormal running state data;
determining the service type of the abnormal service provider, and determining the service provider with the same service type as the abnormal service provider as a candidate service provider;
determining a target service provider from the candidate service providers based on the service scheduling policy.
Optionally, the generating module 608 is further configured to:
and carrying out instantiation processing on the object generation service based on the object generation unit to obtain an instantiation object.
The service processing device provided by the specification determines a service provider based on object attribute information carried in an object generation request, and flexibly determines an object generation service based on a service scheduling policy determined by the service provider, so that an instantiation object is generated quickly through the object generation service, the operation cost of the instantiation object is reduced, and the instantiation object is sent to a task processing module, so that a subsequent task processing module can conveniently and quickly provide an SDK product based on the instantiation object, and the problem of low SDK product providing efficiency is avoided.
The foregoing is a schematic view of a service processing apparatus according to the present embodiment. It should be noted that the technical solution of the service processing apparatus and the technical solution of the service processing method belong to the same concept, and for details that are not described in detail in the technical solution of the service processing apparatus, reference may be made to the description of the technical solution of the service processing method.
FIG. 7 illustrates a block diagram of a computing device 700 provided in accordance with one embodiment of the present description. The components of the computing device 700 include, but are not limited to, memory 710 and a processor 720. Processor 720 is coupled to memory 710 via bus 730, and database 750 is used to store data.
Computing device 700 also includes access device 740, access device 740 enabling computing device 700 to communicate via one or more networks 760. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 740 may include one or more of any type of network interface, e.g., a Network Interface Card (NIC), wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 700, as well as other components not shown in FIG. 7, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 7 is for purposes of example only and is not limiting as to the scope of the present description. Other components may be added or replaced as desired by those skilled in the art.
Computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 700 may also be a mobile or stationary server.
Wherein the processor 720 is configured to execute computer-executable instructions that, when executed by the processor 720, implement the steps of the service processing method described above.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the service processing method described above belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the service processing method described above.
An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which when executed by a processor implement the steps of the service processing method described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the service processing method described above, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the service processing method described above.
An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the service processing method.
The above is an illustrative scheme of a computer program of the present embodiment. It should be noted that the technical solution of the computer program and the technical solution of the service processing method belong to the same concept, and details that are not described in detail in the technical solution of the computer program can be referred to the description of the technical solution of the service processing method.
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.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts, but those skilled in the art should understand that the present embodiment is not limited by the described acts, because some steps may be performed in other sequences or simultaneously according to the present embodiment. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for an embodiment of the specification.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the embodiments. The specification is limited only by the claims and their full scope and equivalents.

Claims (14)

1. A service processing method, comprising:
receiving an object generation request sent by a task processing module, wherein the object generation request carries object attribute information, and the object attribute information is one or more attributes of an instantiated object;
determining a service provider based on the object attribute information, and determining a service scheduling policy based on the service provider, wherein the service scheduling policy is a policy for acquiring an object to generate service;
obtaining the object generation service based on the service scheduling policy;
and generating the instantiation object based on the object generation service, and sending the instantiation object to the task processing module.
2. The service processing method of claim 1, the determining a service scheduling policy based on the service provider, comprising:
determining an object generation service provided by the service provider and determining a service type of the object generation service;
and determining a service scheduling policy based on the service type under the condition that the service types of the object generation services are the same.
3. The service processing method of claim 1, the determining a service scheduling policy based on the service provider, comprising:
and determining a scheduling policy identifier corresponding to the service provider, and determining a service scheduling policy based on the scheduling policy identifier.
4. The service processing method according to any one of claims 1 to 3, wherein the acquiring an object generation service based on the service scheduling policy comprises:
determining a target service provider based on the service scheduling policy, wherein the target service provider is determined from the service providers;
and acquiring the object generation service provided by the target service provider based on a service calling interface, wherein the service calling interface is determined after processing the object generation service with the same service type.
5. The service processing method of claim 4, the determining a target service provider based on the service scheduling policy, comprising:
and determining the service quality parameter of the service provider based on the service scheduling strategy, and determining a target service provider based on the service quality parameter.
6. The service processing method of claim 5, the determining a target service provider based on the quality of service parameter, comprising:
sorting the service providers in descending order based on the quality of service parameters;
and determining the first service provider after the ranking as a target service provider.
7. The service processing method according to claim 4, the service providers being at least two;
accordingly, the determining a target service provider based on the service scheduling policy comprises:
determining each of the service providers;
and sequentially taking each service provider as a target service provider based on the service scheduling policy.
8. The service processing method as in claim 4, further comprising, after determining a target service provider based on the service scheduling policy:
acquiring running state data of the target service provider;
determining the target service provider as an abnormal service provider under the condition that the running state data is determined to be abnormal running state data;
determining the service type of the abnormal service provider, and determining the service provider with the same service type as the abnormal service provider as a candidate service provider;
determining a target service provider from the candidate service providers based on the service scheduling policy.
9. A service processing system comprises a task processing module and an object generating module, wherein,
the task processing module is configured to receive a target task, generate an object generation request based on object attribute information carried in the target task, and send the object generation request to the object generation module;
the object generation module is configured to receive an object generation request sent by a task processing module, where the object generation request carries object attribute information, the object attribute information is one or more attributes of an instantiated object, a service provider is determined based on the object attribute information, and a service scheduling policy is determined based on the service provider, where the service scheduling policy is a policy for acquiring an object generation service, the object generation service is acquired based on the service scheduling policy, the instantiated object is generated based on the object generation service, and the instantiated object is sent to the task processing module;
the task processing module is further configured to process the target task based on the received instantiation object.
10. The service processing system of claim 9, further comprising:
a service storage module configured to receive an object generation service provided by the service provider.
11. The service processing system of claim 10, the object generation module further configured to retrieve an object generation service from the service storage module based on the service scheduling policy.
12. A service processing apparatus comprising:
the task processing module is configured to receive an object generation request sent by the task processing module, wherein the object generation request carries object attribute information, and the object attribute information is one or more attributes of an instantiated object;
a determining module configured to determine a service provider based on the object attribute information, and determine a service scheduling policy based on the service provider, wherein the service scheduling policy is a policy for acquiring an object generation service;
an acquisition module configured to acquire the object generation service based on the service scheduling policy;
a generating module configured to generate the instantiation object based on the object generation service and send the instantiation object to the task processing module.
13. A computing device, comprising:
a memory and a processor;
the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions, which when executed by the processor, implement the steps of the service processing method of any one of claims 1 to 8.
14. A computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the service processing method of any one of claims 1 to 8.
CN202111583509.XA 2021-12-22 2021-12-22 Service processing method and system Pending CN114461358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111583509.XA CN114461358A (en) 2021-12-22 2021-12-22 Service processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111583509.XA CN114461358A (en) 2021-12-22 2021-12-22 Service processing method and system

Publications (1)

Publication Number Publication Date
CN114461358A true CN114461358A (en) 2022-05-10

Family

ID=81405824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111583509.XA Pending CN114461358A (en) 2021-12-22 2021-12-22 Service processing method and system

Country Status (1)

Country Link
CN (1) CN114461358A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116431319A (en) * 2023-06-14 2023-07-14 云阵(杭州)互联网技术有限公司 Task processing method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713896A (en) * 2013-12-17 2014-04-09 北京京东尚科信息技术有限公司 Software development kit generation method and device used for accessing server
US9201637B1 (en) * 2015-03-26 2015-12-01 Xamarin Inc. Managing generic objects across multiple runtime environments
CN109995833A (en) * 2017-12-29 2019-07-09 顺丰科技有限公司 Voice service providing method, server, client, system, equipment and medium
CN111242104A (en) * 2020-04-10 2020-06-05 支付宝(杭州)信息技术有限公司 Service calling method and device
WO2021061414A1 (en) * 2019-09-24 2021-04-01 Amazon Technologies, Inc. Peripheral device for configuring compute instances at client- selected servers
US20210250648A1 (en) * 2020-02-10 2021-08-12 Xandr Inc. Methods and apparatuses for a modular and extensible advertisement request
CN113268233A (en) * 2021-04-26 2021-08-17 众安信息技术服务有限公司 Page generation method and device, computer equipment and storage medium
CN113535169A (en) * 2021-07-13 2021-10-22 杭州安恒信息技术股份有限公司 Scene rendering method, device and equipment and readable storage medium
CN113760248A (en) * 2020-07-08 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for generating application program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713896A (en) * 2013-12-17 2014-04-09 北京京东尚科信息技术有限公司 Software development kit generation method and device used for accessing server
US9201637B1 (en) * 2015-03-26 2015-12-01 Xamarin Inc. Managing generic objects across multiple runtime environments
CN109995833A (en) * 2017-12-29 2019-07-09 顺丰科技有限公司 Voice service providing method, server, client, system, equipment and medium
WO2021061414A1 (en) * 2019-09-24 2021-04-01 Amazon Technologies, Inc. Peripheral device for configuring compute instances at client- selected servers
US20210250648A1 (en) * 2020-02-10 2021-08-12 Xandr Inc. Methods and apparatuses for a modular and extensible advertisement request
CN111242104A (en) * 2020-04-10 2020-06-05 支付宝(杭州)信息技术有限公司 Service calling method and device
CN113760248A (en) * 2020-07-08 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for generating application program
CN113268233A (en) * 2021-04-26 2021-08-17 众安信息技术服务有限公司 Page generation method and device, computer equipment and storage medium
CN113535169A (en) * 2021-07-13 2021-10-22 杭州安恒信息技术股份有限公司 Scene rendering method, device and equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116431319A (en) * 2023-06-14 2023-07-14 云阵(杭州)互联网技术有限公司 Task processing method and device
CN116431319B (en) * 2023-06-14 2023-09-12 云阵(杭州)互联网技术有限公司 Task processing method and device

Similar Documents

Publication Publication Date Title
EP3082043B1 (en) Type-to-type analysis for cloud computing technical components
US7831734B2 (en) Method and system for remote configuration of network devices
CN111538605A (en) Distributed data access layer middleware and command execution method and device
JP2024512209A (en) Information processing method based on IoT devices, related devices and storage media
US20240264872A1 (en) Method, device, computer device and storage device for request processing
CN110737425B (en) Method and device for establishing application program of charging platform system
US11531526B1 (en) Creating portable serverless applications
US20230328535A1 (en) Data delivery automation of a cloud-managed wireless telecommunication network
CN114640610B (en) Cloud-protogenesis-based service management method and device and storage medium
CN113239118A (en) Block chain training system and method
CN114461358A (en) Service processing method and system
CN117633102A (en) Block chain data integration method, device, computer equipment and storage medium
CN114710571A (en) Data packet processing system
CN112953993A (en) Resource scheduling method, device, network system and storage medium
US11494184B1 (en) Creation of transportability container files for serverless applications
CN102067566B (en) User interfaces for service object located in a distributed system
US9323509B2 (en) Method and system for automated process distribution
Herlicq et al. Nextgenemo: an efficient provisioning of edge-native applications
US11513833B1 (en) Event listener interface for container-based execution of serverless functions
CN117692401A (en) Message sending method, device, server and storage medium
CN112835766A (en) Application monitoring method and device
WO2024114630A1 (en) Intent management method, and apparatus
CN115277862B (en) Container-based resource scheduling method and device
CN115314373B (en) Edge server deployment method and device
CN114422456B (en) Task processing method and device

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