CN117407141A - Business service generation method and device, electronic equipment and storage medium - Google Patents

Business service generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117407141A
CN117407141A CN202311405262.1A CN202311405262A CN117407141A CN 117407141 A CN117407141 A CN 117407141A CN 202311405262 A CN202311405262 A CN 202311405262A CN 117407141 A CN117407141 A CN 117407141A
Authority
CN
China
Prior art keywords
service
business
micro
scheduling
shell
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
CN202311405262.1A
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.)
Chengdu New Hope Finance Information Co Ltd
Original Assignee
Chengdu New Hope Finance Information 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 Chengdu New Hope Finance Information Co Ltd filed Critical Chengdu New Hope Finance Information Co Ltd
Priority to CN202311405262.1A priority Critical patent/CN117407141A/en
Publication of CN117407141A publication Critical patent/CN117407141A/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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a business service generation method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring pre-configured business field division information; the business domain division information comprises a plurality of business micro services; the business micro-service is used for realizing corresponding business processes and/or functions; determining a business process and interface parameters corresponding to each business micro-service; importing a business flow and interface parameters corresponding to the business micro-service into a preset scheduling shell template, and configuring basic function items corresponding to the business micro-service in the scheduling shell template to obtain the business scheduling micro-service; the scheduling shell template is used for realizing the execution and scheduling of the business micro-service. The service micro-service is wrapped into the service scheduling micro-service by the scheduling shell according to the service flow and the interface parameters corresponding to the divided service micro-service, and the service scheduling micro-service is called and executed by the scheduling shell, so that the calling reliability and the service execution efficiency between the services are improved.

Description

Business service generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information technologies, and in particular, to a business service generating method, a device, an electronic device, and a storage medium.
Background
Due to the high-speed development of information technology, the business of each industry is gradually complex and complex in quantity, a unified business center is generally established, and the cooperation and resource sharing among different business lines can be realized. The middle platform can be understood as an architecture mode and management concept, and aims to centrally manage and share core business capability and resources in an enterprise so as to improve flexibility, expandability and innovation capability of the business. The intermediate station concatenates the scattered service capabilities together in some form so that the services can be invoked from one service to another and the foreground station can invoke the respective service. The codes of the existing business processes are collected in a business center in a hard coding mode, so that the management difficulty of the codes is high, and the execution and the call between business services are not facilitated.
Disclosure of Invention
The embodiment of the application aims at a business service generation method, a device, electronic equipment and a storage medium, which wrap the business service generation method, the device, the electronic equipment and the storage medium into business scheduling micro-services, and the business scheduling micro-services are called and executed through a scheduling shell, so that the calling reliability and the business execution efficiency between services are improved.
In a first aspect, an embodiment of the present application provides a method for generating a business service, including: acquiring pre-configured business field division information; the business domain division information comprises a plurality of business micro services; the business micro-service is used for realizing corresponding business processes and/or functions; determining a business process and interface parameters corresponding to each business micro-service; importing a business flow and interface parameters corresponding to the business micro-service into a preset scheduling shell template, and configuring basic function items corresponding to the business micro-service in the scheduling shell template to obtain the business scheduling micro-service; the scheduling shell template is used for realizing the execution and scheduling of the business micro-service.
In the implementation process, the pre-configured service domain division information is acquired, the services belonging to the same domain are divided together, the service domain division information is wrapped into the service scheduling micro-service through the scheduling shell according to the service flow and the interface parameters corresponding to the divided service micro-service, and the service scheduling micro-service is called and executed through the scheduling shell, so that the calling process of the service is clearer and more convenient, and the calling reliability and the service execution efficiency between the services are improved.
Optionally, in the embodiment of the present application, a service flow and an interface parameter corresponding to a service micro-service are imported into a preset scheduling shell template, and basic function items corresponding to the service micro-service are configured in the scheduling shell template, so as to obtain the service scheduling micro-service, including: acquiring a business process code corresponding to a business process and a scheduling shell code template corresponding to a scheduling shell template; the scheduling shell code template comprises basic function items to be configured; and importing the business process codes and the interface parameters into a dispatching shell code template, and determining basic function items corresponding to the business micro-services from the basic function items to be configured to obtain the business dispatching micro-services.
In the implementation process, the designed micro-services are integrated into the scheduling shell, so that unified scheduling, management and monitoring of the business scheduling micro-services can be realized, and the reliability and execution efficiency of the business process are improved.
Optionally, in an embodiment of the present application, after obtaining the traffic scheduling micro service, the method further includes: receiving a service call request initiated by a calling party; the service calling request is used for calling the business scheduling micro-service; according to the service call request, analyzing task information corresponding to the service call request from the service scheduling micro-service; the task information comprises a service flow corresponding to the service scheduling micro-service; and executing the business flow to obtain an execution result corresponding to the business scheduling micro-service.
In the implementation process, the unified scheduling, management and monitoring of the business scheduling micro-services are realized through the scheduling shell, and the scheduling shell can provide a unified access interface for a plurality of micro-services. By scheduling the shell, the client interacts with the shell without directly communicating with each micro-service. Therefore, the code logic of the client can be simplified, and the number of service calling interfaces which the client needs to process is reduced. By scheduling the shells, call logic and protocols between the micro-services can be hidden in the shells, so that the micro-services are decoupled from each other. The micro-services can evolve and expand independently without being affected by other micro-services.
Optionally, in the embodiment of the present application, according to the service call request, analyzing task information corresponding to the service call request from the service scheduling micro service includes: judging whether the calling party has access rights or not based on the service calling request; under the condition that the calling party has access authority, carrying out data analysis processing on the business scheduling micro-service to obtain task information corresponding to the service calling request; the data parsing process includes data conversion, data concatenation, and/or data encryption.
In the implementation process, the scheduling shell can perform security verification and access control on the request of the client. The micro-services may be protected from unauthorized access by integrating authentication, authorization, etc. mechanisms. And the scheduling shell may obtain data from a plurality of micro-services and aggregate and convert the data. Therefore, the number and complexity of the requests of the client can be reduced, and the data acquisition efficiency of the client is improved.
Optionally, in the embodiment of the present application, after executing the service flow and obtaining an execution result corresponding to the service scheduling micro-service, the method further includes: and sending the execution result to the terminal equipment corresponding to the calling party.
In the implementation process, the execution result is returned to the client, the client acquires the calling result and the execution result of the scheduling task, and related personnel or team can be timely notified when the execution is in error, so that the fault can be timely processed.
Optionally, in the embodiment of the present application, obtaining pre-configured service domain division information includes: vertically dividing services in the service cluster according to functions to obtain domain division level information; the domain division level information comprises a basic component layer, a minimum unit service layer, a service domain layer and a product layer; horizontally dividing services in the hierarchical information of each domain division according to service logic to obtain service domain division information; the business domain division information comprises business micro-services corresponding to each domain division level information.
In the implementation process, the business is classified into different fields in the horizontal dimension, and the businesses belonging to the same field are divided together; and the middle platform is classified into a basic function middle platform, a business field middle platform and a product middle platform in the vertical dimension. The service level in the cluster is clear, so that the service calling process is clearer and more convenient.
Optionally, in an embodiment of the present application, after obtaining the traffic scheduling micro service, the method further includes: acquiring physical machine resources; determining a target physical machine from a plurality of physical machines according to the resource use condition in the physical machine resources; and deploying the service scheduling micro-service on the target physical machine through the container arrangement platform.
In the implementation process, after the business scheduling micro-service is obtained and the configuration and the tuning of the scheduling shell are completed, the scheduling shell and the business scheduling micro-service are deployed together into the target environment. The scheduling shell is ensured to be capable of accessing and calling the micro-service, and the stability of calling the business scheduling micro-service is improved.
In a second aspect, an embodiment of the present application further provides a device for generating a business service, including: the acquisition dividing information module is used for acquiring preconfigured service domain dividing information; the business domain division information comprises a plurality of business micro services; the business micro-service is used for realizing corresponding business processes and/or functions; the determining flow module is used for determining the business flow and interface parameters corresponding to each business micro-service; the scheduling shell module is used for importing a service flow and interface parameters corresponding to the service micro-service into a preset scheduling shell template, and configuring basic function items corresponding to the service micro-service in the scheduling shell template to obtain the service scheduling micro-service; the scheduling shell template is used for realizing the execution and scheduling of the business micro-service.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor and a memory storing machine-readable instructions executable by the processor to perform the method as described above when executed by the processor.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method described above.
By adopting the method, the device, the electronic equipment and the storage medium for generating the business service, the preconfigured business field division information is obtained, the businesses belonging to the same field can be divided together, the business is wrapped into the business scheduling micro-service through the scheduling shell according to the business flow and the interface parameters corresponding to the divided business micro-service, and the business scheduling micro-service is called and executed through the scheduling shell, so that the calling process of the business service is clearer, and the business management is convenient.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a business service generating method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a service call request processing flow provided in an embodiment of the present application;
fig. 3 is a schematic diagram of service domain division information provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a business service generating device provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the technical solutions of the present application will be described in detail below with reference to the accompanying drawings. The following examples are only for more clearly illustrating the technical solutions of the present application, and thus are only examples, and are not intended to limit the scope of protection of the present application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
In the description of the embodiments of the present application, the technical terms "first," "second," etc. are used merely to distinguish between different objects and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated, a particular order or a primary or secondary relationship. In the description of the embodiments of the present application, the meaning of "plurality" is two or more unless explicitly defined otherwise.
Codes of all business processes in the prior art are collected in a dispatching center in a hard coding mode, such as a Lua script, a Python script and the like, the business of the codes is strong, the management difficulty is high, and the calling and the management between business services are not facilitated.
According to the business service generation method provided by the embodiment of the application, the pre-configured business field division information is obtained, businesses belonging to the same field can be divided together, the divided businesses are wrapped into business scheduling micro-services through the scheduling shell, and the business scheduling micro-services are called through the scheduling shell, so that the calling process is clearer, and the business management is facilitated.
The following describes concepts related to the field, and the field driven design (Domain Driven Design, abbreviated as DDD) is a software development methodology that emphasizes the knowledge and concepts of the business field throughout the development process in software development. The domain driver is designed as a method for disassembling the service, dividing the service and determining the service boundary, and is a domain design idea. By building a domain model, the complexity of business logic is prevented from being confused with the complexity of technical implementation. Focusing on high-level, macroscopic de-partitioning and integrating bounding contexts, attention is paid to more specific use of modeling tools to refine the contexts.
When business logic is very complex and difficult to understand, domain driven designs can help development teams better understand and model business rules and behavior. By integrating concepts and languages of the business domain into the code, business needs can be expressed and implemented more accurately. In large projects or organizations, multiple teams often need to co-develop and maintain different system modules. The domain-driven design can separate the attention points of different teams by defining the business context boundary, and improves the collaboration efficiency and the consistency of codes among teams.
Please refer to fig. 1, which illustrates a flowchart of a business service generation method provided in an embodiment of the present application. The business service generation method provided by the embodiment of the application can be applied to electronic equipment, and the electronic equipment can comprise a terminal and a server; the terminal can be a smart phone, a tablet computer, a personal digital assistant (Personal Digital Assitant, PDA) and the like; the server may be an application server or a Web server. The business service generation method may include:
step S110: acquiring pre-configured business field division information; the business domain division information comprises a plurality of business micro services; the business micro-service is used for realizing corresponding business processes and/or functions.
Step S120: and determining the corresponding business flow and interface parameters of each business micro-service.
Step S130: importing a business flow and interface parameters corresponding to the business micro-service into a preset scheduling shell template, and configuring basic function items corresponding to the business micro-service in the scheduling shell template to obtain the business scheduling micro-service; the scheduling shell template is used for realizing the execution and scheduling of the business micro-service.
In step S110, service domain division information is obtained by dividing a service flow in advance, where the service domain division information includes a plurality of service micro-services; the business micro-service may be a base component, a functional module implementing a business, a combination of functional modules, and/or an externally provided product, etc. Wherein base components such as databases, message middleware, etc.; functions for realizing the business such as a user management function, a member management function, an order function, and the like. The combination of functions may, for example, combine all functions related to the user to form a user domain; the product may be, for example, a commodity sales mall or the like.
The dividing process is as follows: for complex business processes, the links and steps contained in the complex business processes are determined and split into smaller task units. The business process is divided into independent and reusable task units as far as possible by considering the coupling degree and reusability of the business logic.
The division basis of the service domain division information can divide the system into corresponding domains according to the capacity, responsibility and service flow of the service organization. Therefore, each field has own responsibility and capability, business isolation and decoupling can be realized through division, and meanwhile, the independence and efficiency of teams can be improved. The division basis can also divide different domains by identifying context boundaries between the different domains. The context boundaries may be boundaries of business processes, boundaries of domain objects, boundaries of services, or the like. The division of boundaries should follow the cohesiveness and high cohesiveness of the business, with the relevant business concepts and business rules being aggregated together. And the key business concepts, the domain models and the like can be extracted to carry out business division according to business requirements and business rules.
In step S120, after the business micro services are divided, for each business micro service, an interface provided by the business micro service is determined. The interface parameters may include parameters such as input parameters, output results, calling methods, and message formats. When designing the interface, the usability, usability and expansibility of the interface are considered, so that various use scenes and requirements can be met.
And based on the division of the functional modules, defining the specific business flow of the business micro-service. The business process can be described in the form of a flow chart, an activity diagram and the like, and the input, the processing logic and the output of each functional module are clear.
In step S130, after determining a specific business process of the business micro-service, based on the design of the interface, implementing and encoding the service specifically to obtain a business process code corresponding to the business process, writing the business process code into a scheduling shell code template, and configuring basic function items corresponding to the business micro-service in the scheduling shell template to obtain the business scheduling micro-service. The scheduling Shell template is a scheduling Shell, and the scheduling Shell (scheduling Shell) is a component or module in the micro-service architecture and is responsible for coordinating and managing communication and scheduling between micro-services. The scheduling shell provides a unified access interface and service scheduling capability, hides the underlying implementation details of the micro-services from the outside, and provides some additional functions such as security authentication, load balancing, fault handling, etc.
Basic function items to be configured are pre-written in the scheduling shell code template, so that different business micro-services can be selected and configured. Taking a basic component as an example, mySQL and oracle can be wrapped into database resource scheduling service through a scheduling shell, and a basic function item corresponding to the database resource scheduling service is determined from basic function items to be configured; for another example, the business micro-service is a user domain, and the user domain can be wrapped into a user scheduling service through a scheduling shell, and basic function items corresponding to the user scheduling service are configured.
In the implementation process, the pre-configured service domain division information is acquired, the services belonging to the same domain are divided together, the service domain division information is wrapped into the service scheduling micro-service through the scheduling shell according to the service flow and the interface parameters corresponding to the divided service micro-service, and the service scheduling micro-service is called and executed through the scheduling shell, so that the calling process of the service is clearer and more convenient, and the calling reliability and the service execution efficiency between the services are improved.
Optionally, in the embodiment of the present application, a service flow and an interface parameter corresponding to a service micro-service are imported into a preset scheduling shell template, and basic function items corresponding to the service micro-service are configured in the scheduling shell template, so as to obtain the service scheduling micro-service, including: acquiring a business process code corresponding to a business process and a scheduling shell code template corresponding to a scheduling shell template; the scheduling shell code template comprises basic function items to be configured; and importing the business process codes and the interface parameters into a dispatching shell code template, and determining basic function items corresponding to the business micro-services from the basic function items to be configured to obtain the business dispatching micro-services.
In the specific implementation process: the service flow codes corresponding to the service flows are acquired, the scheduling shell code templates corresponding to the scheduling shell templates are obtained, and the service flow codes can be deployment packages corresponding to the service flows. The scheduling shell code template comprises basic function items to be configured, and the basic function items to be configured include flow maintenance, monitoring alarm, log management, service release, flow control, flow task health state management, authority management and the like.
And importing the business process codes or the deployment package into the environment where the scheduling shell is located. And carrying out corresponding importing operation according to the programming language and the framework of the micro-service. For example, if a micro-service developed using Java, the corresponding Jar file may be imported into the server or container where the scheduling shell resides.
In the scheduling shell, the basic function item corresponding to the business micro service is determined from the basic function items to be configured, and in the above embodiment, the basic function item corresponding to the database resource scheduling service may include authority management, log management, and the like, while the basic function item corresponding to the user scheduling service may include flow maintenance, flow control, flow task health status management, and the like, and may further perform finer configuration on the flow.
In an alternative embodiment, specific information corresponding to the service microservice may also be configured in the scheduling shell. Including trigger conditions for tasks, execution logic, execution frequency, etc. Depending on the scheduling shell, there may be different configurations, for example, configuration may be performed through a graphical interface, or configuration may be performed through a configuration file.
In the implementation process, the designed micro-services are integrated into the scheduling shell, so that unified scheduling, management and monitoring of the business scheduling micro-services can be realized, and the reliability and execution efficiency of the business process are improved.
Optionally, in an embodiment of the present application, after obtaining the traffic scheduling micro service, the method further includes: receiving a service call request initiated by a calling party; the service calling request is used for calling the business scheduling micro-service; according to the service call request, analyzing task information corresponding to the service call request from the service scheduling micro-service; the task information comprises a service flow corresponding to the service scheduling micro-service; and executing the business flow to obtain an execution result corresponding to the business scheduling micro-service.
In the specific implementation process: receiving a service call request initiated by a client corresponding to a calling party; the service invocation request is used to invoke a business scheduling micro-service. The service call request may be in the form of an HTTP request, a message queue message, or a timed task trigger.
The scheduling shell receives a request sent by a client, and analyzes task information corresponding to the service call request from service scheduling micro-services according to the service call request, wherein the task information comprises a service flow corresponding to the service scheduling micro-services; task information may also include business process scheduling policies, dependencies, execution logic, and the like.
The scheduling shell schedules tasks to execute on available resources according to a scheduling algorithm. The resources may be physical servers, containers, or cloud computing instances, etc., and may depend on the particular environment.
In the implementation process, the unified scheduling, management and monitoring of the business scheduling micro-services are realized through the scheduling shell, and the scheduling shell can provide a unified access interface for a plurality of micro-services. By scheduling the shell, the client interacts with the shell without directly communicating with each micro-service. Therefore, the code logic of the client can be simplified, and the number of service calling interfaces which the client needs to process is reduced. By scheduling the shells, call logic and protocols between the micro-services can be hidden in the shells, so that the micro-services are decoupled from each other. The micro-services can evolve and expand independently without being affected by other micro-services.
Please refer to fig. 2, which is a schematic diagram illustrating a service call request processing flow provided in an embodiment of the present application.
Optionally, in the embodiment of the present application, according to the service call request, analyzing task information corresponding to the service call request from the service scheduling micro service includes: judging whether the calling party has access rights or not based on the service calling request; under the condition that the calling party has access authority, carrying out data analysis processing on the business scheduling micro-service to obtain task information corresponding to the service calling request; the data parsing process includes data conversion, data concatenation, and/or data encryption.
In the specific implementation process: based on the service call request, whether the caller has access right is determined, for example, whether the caller has access right can be determined by analyzing a URL path, a query parameter, a custom field in a request header, and the like.
Under the condition that the calling party has access authority, carrying out data analysis processing on the business scheduling micro-service to obtain task information corresponding to the service calling request; the data parsing process includes data conversion, data concatenation, and/or data encryption. The data conversion may be to convert request parameters sent by the client from one format to another. For example, the request parameters in JSON format passed by the client are converted into data structures that can be handled by the microservice, or the XML parameters are converted into object forms that are acceptable to the microservice.
Client request parameters may also be standardized to maintain parameter consistency among different clients. Therefore, the realization and maintenance of the micro service are simplified, and the compatibility problem caused by the difference of the transmission parameters of different clients is avoided.
After obtaining the task information corresponding to the service call request, a proper encryption algorithm, such as a symmetric encryption algorithm (e.g., AES), an asymmetric encryption algorithm (e.g., RSA) or a hash function (e.g., SHA-256), may be selected to encrypt the task information, where in the encryption process, a key is required to encrypt the request parameter, and the encrypted request parameter is used as ciphertext to transmit and decrypt after execution. By encrypting the request parameters, the scheduling shell may protect the data sent by the client from unauthorized access and tampering. This increases the confidentiality and integrity of data transmission and improves the security of the system. Meanwhile, encryption is also a measure of compliance and privacy protection, so that sensitive information of a user is ensured not to be maliciously acquired.
In an alternative embodiment, the scheduling shell may also flow control the requests, e.g., the requests may be routed to different microservices instances according to the content and rules of the requests. Thus, load balancing and fault transfer can be realized according to the load condition and availability of the micro-service. The shell can automatically adjust and cache address and configuration information of the micro service instance as needed to provide higher service reliability and performance.
In the implementation process, the scheduling shell can perform security verification and access control on the request of the client. The micro-services may be protected from unauthorized access by integrating authentication, authorization, etc. mechanisms. And the scheduling shell may obtain data from a plurality of micro-services and aggregate and convert the data. Therefore, the number and complexity of the requests of the client can be reduced, and the data acquisition efficiency of the client is improved.
Optionally, in the embodiment of the present application, after executing the service flow and obtaining an execution result corresponding to the service scheduling micro-service, the method further includes: and sending the execution result to the terminal equipment corresponding to the calling party.
In the specific implementation process: in the task execution process, the scheduling shell monitors indexes such as execution state, execution time and resource consumption of the task. If the task is in error or overtime in the execution process, the scheduling shell can perform corresponding error processing, such as retry, alarm and the like, according to the configured error processing mechanism.
After the task is executed, the scheduling shell can return the execution result to the client, or notify related components or systems through a message queue, an event mechanism and the like.
In an alternative embodiment, the monitoring and logging information of the micro-services may also be configured in the scheduling shell. May include setting monitoring indicators, setting alarm rules, configuring logging levels and target locations, etc. The micro-services are monitored and managed using the monitoring and management functions provided by the scheduling shell. The task execution condition can be checked, the task log can be checked, the success rate and execution time of the task can be counted, and the like, so that potential problems can be found and solved in time, and the stability and reliability of the micro-service are ensured.
In the implementation process, the execution result is returned to the client, the client acquires the calling result and the execution result of the scheduling task, and related personnel or team can be timely notified when the execution is in error, so that the fault can be timely processed.
Please refer to fig. 3, which illustrates a schematic diagram of service domain division information provided in the embodiment of the present application.
Optionally, in the embodiment of the present application, obtaining pre-configured service domain division information includes: vertically dividing services in the service cluster according to functions to obtain domain division level information; the domain division level information comprises a basic component layer, a minimum unit service layer, a service domain layer and a product layer; horizontally dividing services in the hierarchical information of each domain division according to service logic to obtain service domain division information; the business domain division information comprises business micro-services corresponding to each domain division level information.
In the specific implementation process: vertically dividing services in the service cluster according to functions to obtain domain division level information; the domain division hierarchy information includes a base component layer, a minimum unit service layer, a service domain layer, and a product layer.
As shown in fig. 3, the base functional layer may be, for example, a database, message middleware, service deployment software, code repository, etc., typically invoked by other services. And the service is highly cohesive and directly interacted with the basic component layer, and the basic, complete and closed-loop functions of the service are provided for the outside, and the positions of the services in the cluster can be called as the minimum unit service layer. The minimum unit business layer may be, for example, user management, member management, premium group management, excavatable group management, user category management, order management, coupon management, and the like.
The service function in the minimum unit service function layer is called, the functions in the same field are combined, the more complex functions in the field are provided for the outside, and the position of the service in the cluster can be called as a service field layer. The business domain layer may, for example, incorporate the above-described user management, member management, high-quality guest group management, excavatable guest group management, user category management, and the like into the user domain.
By calling the functions provided by each service in the service domain layer to the outside, a product is formed, and the positions of the services in the clusters can be called as a product layer. A product often involves multiple domains, and a product layer may be, for example, a retail store, and may be composed of cross domains of users, orders, coupons, inventory, customer service, and the like.
Horizontally dividing services in the hierarchical information of each domain division according to service logic to obtain service domain division information; for example, the commodity category, commodity details, commodity inventory, commodity price, and the like are divided into commodity fields; the transaction, promotion, coupon, after-market is divided into transaction domains. It will be appreciated that the traffic contained within these domains may continue to divide down, e.g., after-sales services within the transaction domain services may continue to divide into multiple services, such as manual customer service, virtual customer service, worksheet systems, and telephone AI (Artificial Intelligence ) robots.
As another example, in the base component layer, mySQL, oracle, mongoDB, HBase and Redis may be divided into data storage domain services; rabbitMQ and Kafka may be divided into the field of message queues; kubernetes and Docker can be divided into the fields of service discovery and deployment.
In the minimum unit service function layer, the following service micro services can be divided: inventory, shipping, shipment, category, branding, registration, paid membership, premium group management, can mine group management, logoff, virtual customer service, manual customer service, video customer service, online customer, telephone AI robot, and work order management.
In the business field layer, inventory, shipment, category, brand and the like can be divided into commodity fields; registering, paying members, managing high-quality guest groups, and the like, and can be divided into the fields of users, such as guest group management and logout; virtual customer service, manual customer service, video customer service, online customer, telephone AI robot, and worksheet management, etc. may be divided into after-market areas.
Product layer: the commodity field, the user field, the after-sales field and the like can be divided into XXX electronic malls; the commodity field, the user field, the after-market field, etc. can be divided into XXX toy malls.
It should be noted that, when dividing the service domain, consistency, manageability and scalability of the service need to be considered. The divided fields should have clear business boundaries and be able to be effectively managed in terms of organization structure, flow, system support, etc. There should also be clear interfaces and collaboration mechanisms between domains to enable collaboration between different domains. The above-mentioned dividing manner is only one embodiment of the present application, and the embodiment of the present application does not limit the form of the final service domain dividing information.
In the implementation process, the business is classified into different fields in the horizontal dimension, and the businesses belonging to the same field are divided together; and the middle platform is classified into a basic function middle platform, a business field middle platform and a product middle platform in the vertical dimension. The service level in the cluster is clear, so that the service calling process is clearer and more convenient.
Optionally, in an embodiment of the present application, after obtaining the traffic scheduling micro service, the method further includes: acquiring physical machine resources; determining a target physical machine from a plurality of physical machines according to the resource use condition in the physical machine resources; and deploying the service scheduling micro-service on the target physical machine through the container arrangement platform.
In the specific implementation process: acquiring physical machine resources; the physical machine resources may include IP addresses, accounts, and passwords for the physical machines; and resource usage of each physical machine.
And determining a target physical machine from a plurality of physical machines according to the resource use condition in the physical machine resources, and deploying the service scheduling micro-service on the target physical machine through a container scheduling platform (Kubernetes). Kubernetes is an open-source container orchestration platform for automated deployment, extension, and management of containerized applications.
Specifically, for example, the Deployment description file (depoyment) of Kubernetes or other resource description file is used to define the configuration and Deployment requirements of the dispatch service. The description file can be a YAML file or a JSON file, and contains information such as names of services, copy number, container mirror images, resource requirements, service exposure and the like.
Using a Kubernetes management tool, a deployment description file is submitted by executing a command, publishing a dispatch service into a Kubernetes cluster
Necessary security measures such as access rights control, certificate configuration, etc. may be performed as needed.
In the implementation process, after the business scheduling micro-service is obtained and the configuration and the tuning of the scheduling shell are completed, the scheduling shell and the business scheduling micro-service are deployed together into the target environment. The scheduling shell is ensured to be capable of accessing and calling the micro-service, and the stability of calling the business scheduling micro-service is improved.
Please refer to fig. 4, which illustrates a schematic structural diagram of a business service generating device provided in an embodiment of the present application; the embodiment of the application provides a business service generating device 200, which comprises:
the division information acquisition module 210 is configured to acquire pre-configured service domain division information; the business domain division information comprises a plurality of business micro services; the business micro-service is used for realizing corresponding business processes and/or functions;
A determining flow module 220, configured to determine a service flow and an interface parameter corresponding to each service micro-service;
the scheduling shell module 230 is configured to import a service flow and interface parameters corresponding to the service micro-service into a preset scheduling shell template, and configure basic function items corresponding to the service micro-service in the scheduling shell template to obtain the service scheduling micro-service; the scheduling shell template is used for realizing the execution and scheduling of the business micro-service.
Optionally, in the embodiment of the present application, the service generating device, the scheduling shell module 230 is further configured to obtain a service flow code corresponding to the service flow, and a scheduling shell code template corresponding to the scheduling shell template; the scheduling shell code template comprises basic function items to be configured; and importing the business process code and the interface parameter into the scheduling shell code template, and determining a basic function item corresponding to the business micro-service from the basic function items to be configured to obtain the business scheduling micro-service.
Optionally, in an embodiment of the present application, the business service generating device further includes: the scheduling shell validation module is used for receiving a service call request initiated by a calling party; the service calling request is used for calling the business scheduling micro-service; according to the service call request, task information corresponding to the service call request is analyzed from the service scheduling micro-service; the task information comprises the business flow corresponding to the business scheduling micro-service; and executing the business flow to obtain an execution result corresponding to the business scheduling micro-service.
Optionally, in the embodiment of the present application, the service generating device, the scheduling shell validation module is further configured to determine, based on the service call request, whether the caller has an access right; under the condition that the calling party has access authority, carrying out data analysis processing on the business scheduling micro-service to obtain the task information corresponding to the service calling request; the data parsing process includes data conversion, data concatenation and/or data encryption.
Optionally, in the embodiment of the present application, the service generating device, the scheduling shell validation module is further configured to send the execution result to a terminal device corresponding to the caller.
Optionally, in the embodiment of the present application, the service generating device obtains the division information module 210, which is specifically configured to vertically divide the services in the service cluster according to the functions, so as to obtain the domain division level information; the domain division level information comprises a basic component layer, a minimum unit service layer, a service domain layer and a product layer; horizontally dividing the service in each domain division level information according to service logic to obtain the service domain division information; the business domain division information comprises the business micro-service corresponding to each domain division level information.
Optionally, in an embodiment of the present application, the business service generating device further includes: the deployment module is used for acquiring physical machine resources; determining a target physical machine from a plurality of physical machines according to the resource use condition in the physical machine resource; and deploying the business scheduling micro-service on the target physical machine through a container arrangement platform.
It should be understood that, the apparatus corresponds to the above-mentioned embodiment of the method for generating a business service, and can perform the steps involved in the above-mentioned embodiment of the method, and specific functions of the apparatus may be referred to the above description, and detailed descriptions are omitted herein as appropriate to avoid repetition. The device includes at least one software functional module that can be stored in memory in the form of software or firmware (firmware) or cured in an Operating System (OS) of the device.
Please refer to fig. 5, which illustrates a schematic structural diagram of an electronic device provided in an embodiment of the present application. An electronic device 300 provided in an embodiment of the present application includes: a processor 310 and a memory 320, the memory 320 storing machine-readable instructions executable by the processor 310, which when executed by the processor 310 perform the method as described above.
The present application also provides a storage medium having stored thereon a computer program which, when executed by a processor, performs a method as above.
The storage medium may be implemented by any type of volatile or nonvolatile Memory device or combination thereof, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable Programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The foregoing description is merely an optional implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art may easily think about changes or substitutions within the technical scope of the embodiments of the present application, and the changes or substitutions should be covered in the scope of the embodiments of the present application.

Claims (10)

1. A business service generation method, comprising:
acquiring pre-configured business field division information; the business domain division information comprises a plurality of business micro-services; the business micro-service is used for realizing corresponding business processes and/or functions;
determining a business process and interface parameters corresponding to each business micro-service;
importing the business flow and the interface parameters corresponding to the business micro-service into a preset scheduling shell template, and configuring basic function items corresponding to the business micro-service in the scheduling shell template to obtain the business scheduling micro-service; the scheduling shell template is used for realizing execution and scheduling of the business micro-service.
2. The method according to claim 1, wherein the importing the service flow and the interface parameter corresponding to the service micro-service into a preset scheduling shell template, and configuring the basic function item corresponding to the service micro-service in the scheduling shell template, to obtain the service scheduling micro-service, includes:
acquiring a business process code corresponding to the business process and a scheduling shell code template corresponding to the scheduling shell template; the scheduling shell code template comprises basic function items to be configured;
and importing the business process code and the interface parameter into the scheduling shell code template, and determining a basic function item corresponding to the business micro-service from the basic function items to be configured to obtain the business scheduling micro-service.
3. The method of claim 1, wherein after the obtaining the traffic scheduling micro-service, the method further comprises:
receiving a service call request initiated by a calling party; the service calling request is used for calling the business scheduling micro-service;
according to the service call request, task information corresponding to the service call request is analyzed from the service scheduling micro-service; the task information comprises the business flow corresponding to the business scheduling micro-service;
And executing the business flow to obtain an execution result corresponding to the business scheduling micro-service.
4. The method of claim 3, wherein the parsing task information corresponding to the service call request from the service dispatch micro service according to the service call request includes:
judging whether the calling party has access rights or not based on the service calling request;
under the condition that the calling party has access authority, carrying out data analysis processing on the business scheduling micro-service to obtain the task information corresponding to the service calling request; the data parsing process includes data conversion, data concatenation and/or data encryption.
5. The method of claim 3, wherein after the executing the business process and obtaining the execution result corresponding to the business scheduling micro service, the method further comprises:
and sending the execution result to the terminal equipment corresponding to the calling party.
6. The method according to claim 1, wherein the obtaining the pre-configured service area division information includes:
vertically dividing services in the service cluster according to functions to obtain domain division level information; the domain division level information comprises a basic component layer, a minimum unit service layer, a service domain layer and a product layer;
Horizontally dividing the service in each domain division level information according to service logic to obtain the service domain division information; the business domain division information comprises the business micro-service corresponding to each domain division level information.
7. The method according to any of claims 1-6, wherein after said obtaining a traffic scheduling micro-service, the method further comprises:
acquiring physical machine resources;
determining a target physical machine from a plurality of physical machines according to the resource use condition in the physical machine resource;
and deploying the business scheduling micro-service on the target physical machine through a container arrangement platform.
8. A business service generation apparatus, comprising:
the acquisition dividing information module is used for acquiring preconfigured service domain dividing information; the business domain division information comprises a plurality of business micro-services; the business micro-service is used for realizing corresponding business processes and/or functions;
the determining flow module is used for determining the business flow and interface parameters corresponding to each business micro-service;
the scheduling shell module is used for importing the business flow and the interface parameters corresponding to the business micro-service into a preset scheduling shell template, and configuring basic function items corresponding to the business micro-service in the scheduling shell template to obtain the business scheduling micro-service; the scheduling shell template is used for realizing execution and scheduling of the business micro-service.
9. An electronic device, comprising: a processor and a memory storing machine-readable instructions executable by the processor to perform the method of any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the method according to any of claims 1 to 7.
CN202311405262.1A 2023-10-26 2023-10-26 Business service generation method and device, electronic equipment and storage medium Pending CN117407141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311405262.1A CN117407141A (en) 2023-10-26 2023-10-26 Business service generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311405262.1A CN117407141A (en) 2023-10-26 2023-10-26 Business service generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117407141A true CN117407141A (en) 2024-01-16

Family

ID=89492218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311405262.1A Pending CN117407141A (en) 2023-10-26 2023-10-26 Business service generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117407141A (en)

Similar Documents

Publication Publication Date Title
US10269011B2 (en) Configuring a plurality of security isolated wallet containers on a single mobile device
US11126481B2 (en) Fulfilling a request based on catalog aggregation and orchestrated execution of an end-to-end process
US10546283B2 (en) Mobile wallet as a consumer of services from a service provider
US9319269B2 (en) Security infrastructure for cloud services
US8250521B2 (en) Method and apparatus for the design and development of service-oriented architecture (SOA) solutions
US20170337095A1 (en) Service based information technology platform
Yu et al. A microservice based reference architecture model in the context of enterprise architecture
US8195803B2 (en) Method and apparatus for modeling and managing quality of service (QoS) in a service-oriented architecture (SOA) environment
US20140074539A1 (en) Business attribute driven sizing algorithms
US20140089120A1 (en) Aggregating multiple transaction protocols for transacting between a plurality of distinct payment acquiring devices and a transaction acquirer
US20100125618A1 (en) Integrated soa deployment and management system and method for software services
CA2980767A1 (en) Method and apparatus for managing remote devices and accessing remote device information
US10949406B1 (en) Compliance lifecycle management for cloud-based resources
US20090013085A1 (en) Interaction-management methods and platform for client-agent interaction-related environments
CN111338641A (en) Application publishing method and device
Keller Challenges and directions in service management automation
US8190461B2 (en) Logically centralized scrap management using planning operations
Li et al. Blockchain-enabled workflow management system for fine-grained resource sharing in E-commerce logistics
Walraven et al. PaaSHopper: Policy-driven middleware for multi-PaaS environments
CN117407141A (en) Business service generation method and device, electronic equipment and storage medium
Kouki et al. RightCapacity: SLA-driven Cross-Layer Cloud Elasticity Management.
WO2020154230A1 (en) Immutable asset and connected service management
González et al. On controlling compliance requirements within adaptive integration platforms
Walraven et al. Policy‐driven customization of cross‐organizational features in distributed service systems
US11711373B2 (en) Platform-based authentication for external services

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