CN108108239A - Method and device for providing service function and computer readable storage medium - Google Patents

Method and device for providing service function and computer readable storage medium Download PDF

Info

Publication number
CN108108239A
CN108108239A CN201711483364.XA CN201711483364A CN108108239A CN 108108239 A CN108108239 A CN 108108239A CN 201711483364 A CN201711483364 A CN 201711483364A CN 108108239 A CN108108239 A CN 108108239A
Authority
CN
China
Prior art keywords
sub
service function
service
container
function
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
CN201711483364.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.)
Migu Cultural Technology Co Ltd
China Mobile Communications Group Co Ltd
Original Assignee
Migu Cultural Technology Co Ltd
China Mobile Communications Group 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 Migu Cultural Technology Co Ltd, China Mobile Communications Group Co Ltd filed Critical Migu Cultural Technology Co Ltd
Priority to CN201711483364.XA priority Critical patent/CN108108239A/en
Publication of CN108108239A publication Critical patent/CN108108239A/en
Pending legal-status Critical Current

Links

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
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

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 invention discloses a method for providing service function, comprising the following steps: receiving a service request of a user; determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function; and sequentially calling the container examples corresponding to the at least one sub-service function to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user. The invention also discloses a device for providing the service function and a computer readable storage medium.

Description

Method and device for providing service function and computer readable storage medium
Technical Field
The present invention relates to the field of service support technologies, and in particular, to a method and an apparatus for providing a service function, and a computer-readable storage medium.
Background
At present, a business support system used by an enterprise is a large-scale and complex single non-containerized business application, that is, all business logics of the same business function are packaged in a single body and are deployed on a server to run a series of processes of the business function.
At present, in a monolithic non-containerized service support system, all sub-service functions constituting a service function are packaged into a single body, the service function constituted by the single body is executed, and an execution result is output to a user, which may cause a problem of low system operation efficiency.
Disclosure of Invention
In view of this, embodiments of the present invention are intended to provide a method, an apparatus, and a computer-readable storage medium for providing a service function, which can provide a non-monomer containerized service function, thereby overcoming the problem of low system operation efficiency.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a method for providing a service function, which comprises the following steps:
receiving a service request of a user;
determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance;
respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function;
and sequentially calling the container examples corresponding to the at least one sub-service function to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user.
In the foregoing solution, the determining at least one sub-service function corresponding to the service request includes:
determining attribute information of a service function corresponding to the service request;
and determining at least one sub-service function corresponding to the service request according to the attribute information of the service function and the sub-service function corresponding to the attribute information of the service function.
In the foregoing solution, before determining the container instance corresponding to the sub-service function, the method further includes:
acquiring data corresponding to the at least one sub-service function from a container mirror image library, wherein the container mirror image library comprises at least one container mirror image, and each container mirror image comprises data required for creating a new container;
respectively generating a plurality of container instances for each sub-business function by using the acquired data;
each sub-business function is run separately through a plurality of container instances corresponding to each sub-business function.
In the foregoing solution, the determining the container instance corresponding to at least one sub-service function includes:
respectively randomly determining a container instance corresponding to each sub-service function from a plurality of container instances for operating each sub-service function;
or, based on load balancing, determining a container instance corresponding to each sub-service function from container instances in which each sub-service function normally operates.
In the foregoing solution, the sequentially invoking the container instances respectively corresponding to the at least one sub-service function to obtain the execution processing result of the service function corresponding to the service request includes:
determining the execution sequence of each sub-service function according to the service request;
and sequentially calling the container examples corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request.
An embodiment of the present invention provides a device for providing a service function, where the device includes:
the receiving module is used for receiving a service request of a user;
the determining module is used for determining at least one sub-service function corresponding to the service request according to the service request, and each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; the system is further configured to send a request to the determined at least one sub-service function, and determine container instances corresponding to the at least one sub-service function respectively;
and the calling module is used for calling the container instances corresponding to the at least one sub-service function in sequence to obtain an execution processing result of the service function corresponding to the service request and providing the execution processing result for a user.
In the above scheme, the apparatus further comprises:
an obtaining module, configured to obtain data corresponding to the at least one sub-service function from a container mirror library, where the container mirror library includes at least one container mirror, and each container mirror includes data required to create a new container; respectively generating a plurality of container instances for each sub-business function by using the acquired data; each sub-business function is run separately through a plurality of container instances corresponding to each sub-business function.
In the foregoing solution, the determining module is specifically configured to randomly determine, from a plurality of container instances in which each sub-service function operates, a container instance corresponding to the sub-service function; or, based on load balancing, determining a container instance corresponding to each sub-service function from container instances in which each sub-service function normally operates.
In the foregoing solution, the calling module is specifically configured to determine an execution sequence of each sub-service function according to the service request; and sequentially calling the container examples corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any one of the above-mentioned service function providing methods.
An embodiment of the present invention provides an apparatus for providing a service function, including: a processor and a memory for storing a computer program capable of running on the processor;
the processor is configured to execute the steps of any of the above-mentioned service function providing methods when running the computer program.
The method, the device and the computer readable storage medium for providing the service function provided by the embodiment of the invention receive the service request of a user; determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function; and sequentially calling the container examples corresponding to the sub-service functions to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user. In the embodiment of the invention, at least one sub-service function is determined according to the service request, the container examples corresponding to the determined sub-service functions are sequentially called, and the execution processing result of the service function corresponding to the service request is obtained, wherein the sub-service function is a basic service function unit with the finest granularity obtained by pre-splitting, and each sub-service function is operated through at least one container example. Obviously, the sub-service functions are not packaged into a single body, but are determined according to the service request; furthermore, the sub-service functions are run based on container technology. Therefore, the business function of non-monomer containerization can be provided, and the problem of slow system operation can be further overcome.
Drawings
Fig. 1 is a schematic diagram illustrating a service function in the related art;
fig. 2 is a schematic flow chart illustrating an implementation of a service function providing method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a business support system according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a specific implementation flow of providing a service function by a service support system according to an embodiment of the present invention;
fig. 5 is a first schematic structural diagram illustrating a composition structure of a service function providing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a second configuration of a service function providing device according to an embodiment of the present invention.
Detailed Description
In the related art, a service support system is a large-scale and complex single-body non-containerized service application, that is, all service logics of the same service function are packaged in a single body and are deployed on a server to run a series of processes of the service function.
Fig. 1 is a schematic diagram of a service function, and as shown in fig. 1, a service function a includes four sub-service functions: the sub-service function a, the sub-service function b, the sub-service function c, and the sub-service function d, which are packaged into a single body in the prior art, and then packaged into the service function a.
However, such monolithic non-containerized business applications suffer from the following disadvantages:
the development efficiency is low: all the sub-business functions forming the business function are packaged into a single body, so that all the development needs to carry out code modification on the same project, codes submitted by different sub-capabilities need to wait for each other, and code conflict can occur;
code maintenance is difficult: because all sub-service functions forming service functions are packaged into a single body, the single body has the disadvantages of complex code logic, module coupling, code bloat, high modification difficulty and low version iteration efficiency, the whole project must be reconstructed by any small modification, and the process is usually very long;
the system is started slowly: one process comprises all business logics of one business function, and the related starting modules are excessive, so that the starting and restarting time periods of the system are too long;
the stability is not high: similarly, all the sub-capabilities are packaged into a single body, so that the error isolation and the availability of the service function are poor, and an error in any one of the sub-capabilities can cause the downtime of the whole service function.
Based on this, in the embodiment of the present invention, a service request of a user is received; determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function; and sequentially calling the container examples corresponding to the at least one sub-service function to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user.
So that the manner in which the features and aspects of the embodiments of the present invention can be understood in detail, a more particular description of the embodiments of the invention, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings.
As shown in fig. 2, an embodiment of the present invention describes in detail a method for providing a service function according to an embodiment of the present invention, which includes the following steps:
step 201: receiving a service request of a user; and determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated by at least one container instance.
Here, the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance.
In practical application, taking the service support system as an example, a programmer can split each service function module in the service support system in advance to obtain a basic service function unit with the finest granularity and incapable of being re-split. And when the splitting is carried out, the corresponding relation between the service function and each sub-service function obtained by splitting is recorded. Wherein, the sub-service function can be the finest granularity and can not be split again; or may not be the finest particle size.
Here, the container instance is a container instantiated from a container image; wherein the container may be a Docker container. The Docker container is an open-source application container engine, and can package application and dependency packages into a portable container and then distribute the container to a Linux machine.
In an embodiment, the determining at least one sub-service function corresponding to the service request includes: determining attribute information of a service function corresponding to the service request; and determining at least one sub-service function corresponding to the service request according to the attribute information of the service function and the sub-service function corresponding to the attribute information of the service function.
Here, the sub-service function corresponding to the attribute information of the service function may be determined according to a correspondence between the service function recorded at the time of splitting and each sub-service capability obtained by splitting.
In an embodiment, before determining the container instance corresponding to the sub-service function, the method further includes: acquiring data corresponding to the at least one sub-service function from a container mirror image library, wherein the container mirror image library comprises at least one container mirror image, and each container mirror image comprises data required for creating a new container; respectively generating a plurality of container instances for each sub-business function by using the acquired data; each sub-business function is run separately through a plurality of container instances corresponding to each sub-business function.
Here, the data included in the container image may be an executable file, library file, configuration file, or the like required to create the container.
Here, the generating a plurality of container instances for each sub-service capability by using the acquired data specifically includes: instantiating the container mirror image by using data acquired from the container mirror image of the container mirror image library, and further creating a plurality of container instances corresponding to each sub-service capability; wherein each container instance may be identical.
Step 202: and respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function.
In an embodiment, the determining the container instance corresponding to the sub-service function includes: respectively randomly determining a container instance corresponding to each sub-service function from a plurality of container instances for operating each sub-service function; or, based on load balancing, determining a container instance corresponding to each sub-service function from container instances in which each sub-service function normally operates.
Taking the container examples corresponding to the sub-service capabilities as an example, assuming that the sub-service capabilities include sub-service capability 1, sub-service capability 2, and sub-service capability 3, each sub-service capability corresponds to 10 container examples, and numbering the 10 container examples as container example 1 to container example N. Container instance 1 may be randomly selected from sub-service capability 1 as a container instance corresponding to sub-service capability 1, container instance 3 may be randomly selected from sub-service capability 2 as a container instance corresponding to sub-service capability 2, and container instance 7 may be randomly selected from sub-service capability 3 as a container instance corresponding to sub-service capability 3.
Step 203: and sequentially calling the container examples corresponding to the at least one sub-service function to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user.
In an embodiment, the respectively invoking container instances corresponding to the sub-service functions to obtain an execution processing result of the service function corresponding to the service request includes: determining the execution sequence of each sub-service function according to the service request; and respectively calling the container examples corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request.
Here, the execution order may be an order of simultaneous execution or an order of chronological execution.
In actual application, the service request may carry a flag bit; the flag bits may be represented by numbers, with different numbers representing different execution orders.
For example, the identification bits may include 0, 1, and 2, where 0 is assumed to represent a payment service function, 1 is assumed to represent a transfer service function, and 2 is assumed to represent a recharge service function. The execution sequence with the corresponding flag bit of 0 can be sub-service capability 1, sub-service capability 3, and sub-service capability 2; the execution sequence with the corresponding flag bit being 1 can be sub-service capability 2, sub-service capability 3 and sub-service capability 4; the execution order of the corresponding flag bit 2 may be sub-service capability 4 and sub-service capability 7.
And then, the container instances corresponding to the sub-service capabilities determined in step 202 are combined, that is, it is assumed that container instance 1 is randomly selected from sub-service capabilities 1 as the container instance corresponding to sub-service capability 1, container instance 3 is randomly selected from sub-service capabilities 2 as the container instance corresponding to sub-service capability 2, and container instance 7 is randomly selected from sub-service capabilities 3 as the container instance corresponding to sub-service capability 3.
When the service request carries a flag bit 0, determining the execution sequence of each sub-service capability as executing a sub-service capability 1, then executing a sub-service capability 3, and finally executing a sub-service capability 2; and respectively calling the container instance 1 corresponding to the sub-service function 1, the container instance 7 corresponding to the sub-service capability 3 and the container instance 3 corresponding to the sub-service capability 2 according to the determined execution sequence. The situation that the service request carries flag bit 1 or 2 is similar to the situation that the service request carries flag bit 0, and is not described herein again.
The method for providing the service function provided by the embodiment of the invention receives the service request of the user; determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function; and sequentially calling the container examples corresponding to the sub-service functions to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user. In the embodiment of the invention, at least one sub-service function is determined according to the service request, and the container examples corresponding to the determined sub-service functions are sequentially called to obtain the execution processing result of the service function corresponding to the service request; the sub-service functions are basic service function units with the finest granularity obtained by pre-splitting, and each sub-service function is operated through at least one container instance. Obviously, the sub-service functions are not packaged into a single body, but are determined according to the service request; furthermore, the sub-service functions are run based on container technology. Therefore, the business function of non-monomer containerization can be provided, and the problem of slow system operation can be further overcome.
Meanwhile, due to the fact that a non-monomer containerization service function can be provided, the problems of low development efficiency, difficulty in code maintenance, slow system starting, poor system stability and the like can be solved.
The following describes in detail the implementation process and principle of the present invention in practical application, taking the service support system providing service functions as an example.
The following describes in detail the structure of a service support system used in practical applications, and a process and a principle for implementing a service function based on the structure.
Fig. 3 is a schematic structural diagram of a service support system according to an embodiment of the present invention, and as shown in fig. 3, the service support system includes: sub-business functions, container instances, capability orchestration, capability consumers, container mirror repositories; wherein,
the sub-service function is the service capability which is abstracted from each module of the existing service support system and has the finest granularity and can not be split again; the container example is a docker container for operating the service capability; capacity arrangement, namely combining and arranging each sub-business capacity according to the original business request of the actual capacity consumer to finally form the business capacity which can be used by the capacity consumer; the container mirror image warehouse is a set of container mirror images, the container mirror images can be understood as a read-only template, the container mirror images comprise data required for operating the container, the data can be used for creating a new container, and the container mirror image warehouse can store the set of the container mirror images; a capability consumer is an application for external use.
Fig. 4 is a schematic view of a specific implementation flow of a service support system providing a service function according to an embodiment of the present invention, and a specific implementation process of the service support system structure shown in fig. 3 includes the following steps:
step 401: the ability consumer sends a service request to the ability arrangement layer;
step 402: and the capability arrangement layer determines each sub-service capability and the execution sequence of each sub-service capability according to the flag bit carried in the service request.
The capability arranging layer and the capability consumer agree the zone bit in advance, the zone bit is carried in the service request when the capability consumer sends the service request, and the capability arranging layer determines the execution sequence of each sub-service capability according to the zone bit carried in the service request.
Step 403: and the capability arrangement layer respectively sends requests to the determined sub-service capabilities to acquire the functions of the sub-services.
Here, it is assumed that the determined sub-service functions are sub-service function 1, sub-service function 2, and sub-service function 3, and the determined execution order of the sub-service functions is that sub-service function 2 is executed first, sub-service function 3 is executed, and sub-service function 1 is executed last. The sub-service function 2, the sub-service function 3 and the sub-service function 1 are respectively invoked according to the execution order.
Step 404: and the capability arrangement layer respectively calls the container instances corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request, and provides the execution processing result to the capability consumer.
Here, the service function is released in a form of docker mirror image, and runs in a form of docker container, so as to be used as a function application capable of realizing the service capability in the service support system.
Because the functional applications provided in the service support system are formed by combining the sub-service functions according to the actual service requirements, and each sub-service function runs in a respective docker container, various problems caused by strong coupling of each module in the original functional applications are solved.
Based on the service function providing method provided in the embodiments of the present application, the present application also provides a service function providing device, as shown in fig. 5, the device includes: a receiving module 51, a determining module 52 and a calling module 53; wherein,
a receiving module 51, configured to receive a service request of a user;
a determining module 52, configured to determine, according to the service request, at least one sub-service function corresponding to the service request, where each sub-service function operates through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; the system is further configured to send a request to the determined at least one sub-service function, and determine container instances corresponding to the at least one sub-service function respectively;
the invoking module 53 is configured to sequentially invoke the container instances corresponding to the at least one sub-service function, obtain an execution processing result of the service function corresponding to the service request, and provide the execution processing result to the user.
In one embodiment, the apparatus further comprises:
an obtaining module, configured to obtain data corresponding to the at least one sub-service function from a container mirror library, where the container mirror library includes at least one container mirror, and each container mirror includes data required to create a new container; respectively generating a plurality of container instances for each sub-business function by using the acquired data; each sub-business function is run separately through a plurality of container instances corresponding to each sub-business function.
In an embodiment, the determining module 52 is specifically configured to randomly determine, from a plurality of container instances in which each sub-service function is operated, a container instance corresponding to the sub-service function; or, based on load balancing, determining a container instance corresponding to each sub-service function from container instances in which each sub-service function normally operates.
In an embodiment, the invoking module 53 is specifically configured to determine an execution sequence of each sub-service function according to the service request; and sequentially calling the container examples corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request.
It should be noted that: in the service function providing device provided in the above embodiment, when providing the service function, only the division of the above program modules is taken as an example, and in practical applications, the above processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the above described processing. In addition, the service function providing apparatus and the service function providing method provided by the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and will not be described herein again.
In practical application, the receiving module 51 and the obtaining module are implemented by a network interface located on a service function providing device; the determination module 52 and the calling module 53 may be implemented by a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like, which are located on the service function providing apparatus.
Fig. 6 is a schematic structural diagram of a service function providing apparatus according to the present invention, and the service function providing apparatus 600 shown in fig. 6 includes: at least one processor 601, a memory 602, a user interface 603, at least one network interface 604. The various components in the service function provider 600 are coupled together by a bus system 605. It is understood that the bus system 605 is used to enable communications among the components. The bus system 605 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 605 in fig. 6.
The user interface 603 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 602 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 602 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 602 in the embodiment of the present invention is used to store various types of data to support the operation of the providing apparatus 600 of the service function. Examples of such data include: any computer programs for operating on the service function providing apparatus 600, such as an operating system 6021 and application programs 6022; the operating system 6021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application programs 6022 may include various application programs for implementing various application services. A program implementing the method of an embodiment of the invention can be included in the application program 6022.
The method disclosed by the above-mentioned embodiment of the present invention can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 601. The processor 601 described above may be a general purpose processor, a digital signal processor, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 601 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 602, and the processor 601 reads the information in the memory 602 and performs the steps of the aforementioned methods in conjunction with its hardware.
Specifically, an embodiment of the present invention further provides a device for providing a service function, and referring to fig. 6, the device for providing a service function includes: a memory 602, a processor 601 and a computer program stored on the memory and executable on the processor,
wherein, the processor 601 is configured to execute the following operations when running the computer program: receiving a service request of a user; determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function; and sequentially calling the container examples corresponding to the at least one sub-service function to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user.
In an embodiment, the processor 601 is configured to execute the computer program and further perform the following operations: determining attribute information of a service function corresponding to the service request; and determining at least one sub-service function corresponding to the service request according to the attribute information of the service function and the sub-service function corresponding to the attribute information of the service function.
In an embodiment, the processor 601 is configured to execute the computer program and further perform the following operations: acquiring data corresponding to the at least one sub-service function from a container mirror image library, wherein the container mirror image library comprises at least one container mirror image, and each container mirror image comprises data required for creating a new container; respectively generating a plurality of container instances for each sub-business function by using the acquired data; each sub-business function is run separately through a plurality of container instances corresponding to each sub-business function.
In an embodiment, the processor 601 is configured to execute the computer program and further perform the following operations: respectively randomly determining a container instance corresponding to each sub-service function from a plurality of container instances for operating each sub-service function; or, based on load balancing, determining a container instance corresponding to each sub-service function from container instances in which each sub-service function normally operates.
In an embodiment, the processor 601 is configured to execute the computer program and further perform the following operations: determining the execution sequence of each sub-service function according to the service request; and sequentially calling the container examples corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request.
Based on the service function providing method provided in the embodiments of the present application, the present application further provides a computer-readable storage medium, and as shown in fig. 6, the computer-readable storage medium may include: a memory 602 for storing a computer program executable by the processor 601 of the service-function-providing device 600 for performing the steps of the method as described above. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
Specifically, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the following operations: receiving a service request of a user; determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function; and sequentially calling the container examples corresponding to the at least one sub-service function to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user.
In one embodiment, the computer program, when executed by a processor, performs the following: determining attribute information of a service function corresponding to the service request; and determining at least one sub-service function corresponding to the service request according to the attribute information of the service function and the sub-service function corresponding to the attribute information of the service function.
In one embodiment, the computer program, when executed by a processor, performs the following: acquiring data corresponding to the at least one sub-service function from a container mirror image library, wherein the container mirror image library comprises at least one container mirror image, and each container mirror image comprises data required for creating a new container; respectively generating a plurality of container instances for each sub-business function by using the acquired data; each sub-business function is run separately through a plurality of container instances corresponding to each sub-business function.
In one embodiment, the computer program, when executed by a processor, performs the following: respectively randomly determining a container instance corresponding to each sub-service function from a plurality of container instances for operating each sub-service function; or, based on load balancing, determining a container instance corresponding to each sub-service function from container instances in which each sub-service function normally operates.
In one embodiment, the computer program, when executed by a processor, performs the following: determining the execution sequence of each sub-service function according to the service request; and sequentially calling the container examples corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (11)

1. A method for providing service functions, the method comprising:
receiving a service request of a user;
determining at least one sub-service function corresponding to the service request according to the service request, wherein each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance;
respectively sending a request to the determined at least one sub-service function, and determining container instances corresponding to the at least one sub-service function;
and sequentially calling the container examples corresponding to the at least one sub-service function to obtain an execution processing result of the service function corresponding to the service request, and providing the execution processing result for a user.
2. The method of claim 1, wherein the determining at least one sub-service function corresponding to the service request comprises:
determining attribute information of a service function corresponding to the service request;
and determining at least one sub-service function corresponding to the service request according to the attribute information of the service function and the sub-service function corresponding to the attribute information of the service function.
3. The method of claim 1, wherein before determining the container instance corresponding to the sub-service function, the method further comprises:
acquiring data corresponding to the at least one sub-service function from a container mirror image library, wherein the container mirror image library comprises at least one container mirror image, and each container mirror image comprises data required for creating a new container;
respectively generating a plurality of container instances for each sub-business function by using the acquired data;
each sub-business function is run separately through a plurality of container instances corresponding to each sub-business function.
4. The method according to claim 3, wherein the determining the container instance corresponding to the at least one sub-service function comprises:
respectively randomly determining a container instance corresponding to each sub-service function from a plurality of container instances for operating each sub-service function;
or, based on load balancing, determining a container instance corresponding to each sub-service function from container instances in which each sub-service function normally operates.
5. The method according to claim 1, wherein said sequentially invoking the container instances respectively corresponding to the at least one sub-service function to obtain the execution processing result of the service function corresponding to the service request comprises:
determining the execution sequence of each sub-service function according to the service request;
and sequentially calling the container examples corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request.
6. An apparatus for providing a service function, the apparatus comprising:
the receiving module is used for receiving a service request of a user;
the determining module is used for determining at least one sub-service function corresponding to the service request according to the service request, and each sub-service function is operated through at least one container instance; the sub-service function is a basic service function unit with the finest granularity obtained by splitting the service function in advance; the system is further configured to send a request to the determined at least one sub-service function, and determine container instances corresponding to the at least one sub-service function respectively;
and the calling module is used for calling the container instances corresponding to the at least one sub-service function in sequence to obtain an execution processing result of the service function corresponding to the service request and providing the execution processing result for a user.
7. The apparatus of claim 6, further comprising:
an obtaining module, configured to obtain data corresponding to the at least one sub-service function from a container mirror library, where the container mirror library includes at least one container mirror, and each container mirror includes data required to create a new container; respectively generating a plurality of container instances for each sub-business function by using the acquired data; each sub-business function is run separately through a plurality of container instances corresponding to each sub-business function.
8. The apparatus of claim 7,
the determining module is specifically configured to randomly determine a container instance corresponding to each sub-service function from a plurality of container instances in which each sub-service function is operated; or, based on load balancing, determining a container instance corresponding to each sub-service function from container instances in which each sub-service function normally operates.
9. The apparatus of claim 6,
the calling module is specifically used for determining the execution sequence of each sub-service function according to the service request; and sequentially calling the container examples corresponding to the sub-service functions according to the determined execution sequence to obtain the execution processing result of the service function corresponding to the service request.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
11. An apparatus for providing a service function, comprising: a processor and a memory for storing a computer program capable of running on the processor;
the processor is adapted to perform the steps of the method of any one of claims 1 to 5 when running the computer program.
CN201711483364.XA 2017-12-29 2017-12-29 Method and device for providing service function and computer readable storage medium Pending CN108108239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711483364.XA CN108108239A (en) 2017-12-29 2017-12-29 Method and device for providing service function and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711483364.XA CN108108239A (en) 2017-12-29 2017-12-29 Method and device for providing service function and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN108108239A true CN108108239A (en) 2018-06-01

Family

ID=62214925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711483364.XA Pending CN108108239A (en) 2017-12-29 2017-12-29 Method and device for providing service function and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108108239A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547575A (en) * 2019-01-04 2019-03-29 中国银行股份有限公司 A kind of data dispatching method, device and equipment
CN110442481A (en) * 2019-07-10 2019-11-12 阿里巴巴集团控股有限公司 Method for processing business, Service Component container and electronic equipment
CN110442464A (en) * 2019-07-31 2019-11-12 中国工商银行股份有限公司 Method for processing business, business processing device, electronic equipment and medium
CN110442399A (en) * 2019-08-09 2019-11-12 广州小鹏汽车科技有限公司 The React Native business of application executes method, apparatus, storage medium and terminal device
CN110502313A (en) * 2019-08-21 2019-11-26 赛尔网络有限公司 Construction method, device, equipment and the medium of foreign trade business system based on Serverless
CN110673933A (en) * 2019-08-15 2020-01-10 平安普惠企业管理有限公司 ZooKeeper-based distributed asynchronous queue implementation method, device, equipment and medium
CN110704175A (en) * 2018-07-10 2020-01-17 中国电信股份有限公司 Container deployment method and device
CN110727500A (en) * 2019-09-27 2020-01-24 上海依图网络科技有限公司 Method, system, device and medium for integrating functional modules in system
CN113126961A (en) * 2020-01-15 2021-07-16 中移(苏州)软件技术有限公司 Pipeline processing method, device and storage medium
CN113256428A (en) * 2021-04-07 2021-08-13 深圳市怡化时代科技有限公司 Method, device, equipment and storage medium for realizing financial terminal business function
CN113296868A (en) * 2021-07-27 2021-08-24 杭州筋斗腾云科技有限公司 Application platform and application management method
CN113296891A (en) * 2021-05-25 2021-08-24 和美(深圳)信息技术股份有限公司 Multi-scene knowledge graph processing method and device based on platform
CN113542323A (en) * 2020-04-17 2021-10-22 腾讯科技(深圳)有限公司 Service processing method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110314465A1 (en) * 2010-06-17 2011-12-22 Timothy Smith Method and system for workload distributing and processing across a network of replicated virtual machines
CN105550130A (en) * 2015-12-14 2016-05-04 中电科华云信息技术有限公司 Container based dynamic arrangement method for application environment and system applying method
CN105701010A (en) * 2015-12-31 2016-06-22 北京元心科技有限公司 Method and device for accelerating software testing
CN106649732A (en) * 2016-12-23 2017-05-10 金蝶软件(中国)有限公司 Information pushing method and device
CN107105009A (en) * 2017-03-22 2017-08-29 北京荣之联科技股份有限公司 Job scheduling method and device based on Kubernetes system docking workflow engines
CN107229830A (en) * 2017-06-01 2017-10-03 上海联影医疗科技有限公司 Radiotherapy planning system and its task executing method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110314465A1 (en) * 2010-06-17 2011-12-22 Timothy Smith Method and system for workload distributing and processing across a network of replicated virtual machines
CN105550130A (en) * 2015-12-14 2016-05-04 中电科华云信息技术有限公司 Container based dynamic arrangement method for application environment and system applying method
CN105701010A (en) * 2015-12-31 2016-06-22 北京元心科技有限公司 Method and device for accelerating software testing
CN106649732A (en) * 2016-12-23 2017-05-10 金蝶软件(中国)有限公司 Information pushing method and device
CN107105009A (en) * 2017-03-22 2017-08-29 北京荣之联科技股份有限公司 Job scheduling method and device based on Kubernetes system docking workflow engines
CN107229830A (en) * 2017-06-01 2017-10-03 上海联影医疗科技有限公司 Radiotherapy planning system and its task executing method

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704175B (en) * 2018-07-10 2022-08-02 中国电信股份有限公司 Container deployment method and device
CN110704175A (en) * 2018-07-10 2020-01-17 中国电信股份有限公司 Container deployment method and device
CN109547575A (en) * 2019-01-04 2019-03-29 中国银行股份有限公司 A kind of data dispatching method, device and equipment
CN110442481A (en) * 2019-07-10 2019-11-12 阿里巴巴集团控股有限公司 Method for processing business, Service Component container and electronic equipment
CN110442481B (en) * 2019-07-10 2023-09-22 创新先进技术有限公司 Service processing method, service component container and electronic equipment
CN110442464A (en) * 2019-07-31 2019-11-12 中国工商银行股份有限公司 Method for processing business, business processing device, electronic equipment and medium
CN110442399A (en) * 2019-08-09 2019-11-12 广州小鹏汽车科技有限公司 The React Native business of application executes method, apparatus, storage medium and terminal device
CN110673933A (en) * 2019-08-15 2020-01-10 平安普惠企业管理有限公司 ZooKeeper-based distributed asynchronous queue implementation method, device, equipment and medium
CN110502313A (en) * 2019-08-21 2019-11-26 赛尔网络有限公司 Construction method, device, equipment and the medium of foreign trade business system based on Serverless
CN110727500A (en) * 2019-09-27 2020-01-24 上海依图网络科技有限公司 Method, system, device and medium for integrating functional modules in system
CN110727500B (en) * 2019-09-27 2022-10-25 上海依图网络科技有限公司 Method, system, device and medium for integrating functional modules in system
CN113126961A (en) * 2020-01-15 2021-07-16 中移(苏州)软件技术有限公司 Pipeline processing method, device and storage medium
CN113126961B (en) * 2020-01-15 2023-04-07 中移(苏州)软件技术有限公司 Pipeline processing method, device and storage medium
CN113542323A (en) * 2020-04-17 2021-10-22 腾讯科技(深圳)有限公司 Service processing method, device, equipment and computer readable storage medium
CN113542323B (en) * 2020-04-17 2023-12-01 腾讯科技(深圳)有限公司 Service processing method, device, equipment and computer readable storage medium
CN113256428A (en) * 2021-04-07 2021-08-13 深圳市怡化时代科技有限公司 Method, device, equipment and storage medium for realizing financial terminal business function
CN113296891A (en) * 2021-05-25 2021-08-24 和美(深圳)信息技术股份有限公司 Multi-scene knowledge graph processing method and device based on platform
CN113296891B (en) * 2021-05-25 2024-04-19 和美(深圳)信息技术股份有限公司 Platform-based multi-scene knowledge graph processing method and device
CN113296868A (en) * 2021-07-27 2021-08-24 杭州筋斗腾云科技有限公司 Application platform and application management method

Similar Documents

Publication Publication Date Title
CN108108239A (en) Method and device for providing service function and computer readable storage medium
CN111176802B (en) Task processing method and device, electronic equipment and storage medium
CN108667925B (en) Method and system for seamless access of WEB application to distributed system
EP3889774A1 (en) Heterogeneous computing-based task processing method and software-hardware framework system
CA3000422C (en) Workflow service using state transfer
WO2018082451A1 (en) Application link expansion method, apparatus and system
CN107016029B (en) Method, device and system for processing service data
Christidis et al. Enabling serverless deployment of large-scale ai workloads
CN111897539A (en) Method and device for deploying applications according to service roles
CN111126895A (en) Management warehouse and scheduling method for scheduling intelligent analysis algorithm in complex scene
CN111176761A (en) Micro-service calling method and device
US11321090B2 (en) Serializing and/or deserializing programs with serializable state
CN111258565A (en) Method, system, server and storage medium for generating small program
CN112181378B (en) Method and device for realizing business process
CN112463123A (en) Task compiling method, device, network node, system and storage medium
CN110659104B (en) Service monitoring method and related equipment
CN112579049B (en) Customized software productization management method and device based on cloud platform
CN116302708A (en) Data backup method, device, equipment and storage medium based on load balancing
CN111221653A (en) Service processing method and device and computer readable storage medium
CN113987337A (en) Search method, system, equipment and storage medium based on componentized dynamic arrangement
CN113296740A (en) Service object processing method, device, equipment and machine readable medium
CN111176641A (en) Flow node execution method, device, medium and electronic equipment
CN110955415A (en) Method for adapting projection multi-platform service
CN113867776B (en) Method and device for issuing middle-stage application, electronic equipment and storage medium
CN114896637A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180601

RJ01 Rejection of invention patent application after publication