CN116627814A - Service processing method and device, storage medium and electronic device - Google Patents

Service processing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN116627814A
CN116627814A CN202310587768.2A CN202310587768A CN116627814A CN 116627814 A CN116627814 A CN 116627814A CN 202310587768 A CN202310587768 A CN 202310587768A CN 116627814 A CN116627814 A CN 116627814A
Authority
CN
China
Prior art keywords
target
service
component
components
configuration information
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
CN202310587768.2A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202310587768.2A priority Critical patent/CN116627814A/en
Publication of CN116627814A publication Critical patent/CN116627814A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • 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
    • G06F9/4451User profiles; Roaming

Abstract

The application discloses a service processing method, a device, a storage medium and an electronic device, and relates to the technical field of computers, wherein the service processing method comprises the following steps: receiving target data, and determining a target service corresponding to the target data according to a service identifier carried by the target data; determining target configuration information corresponding to a target service in a target container, and determining a first component set and a target calling sequence of each component in the first component set according to the target configuration information; and sequentially calling each component in the first component set according to the target calling sequence through the target container. The business processing method, the device, the storage medium and the electronic device are used for reducing the relevance between business interfaces and the coupling degree of codes between different interfaces, so that the development efficiency is improved, and the development and maintenance cost is reduced.

Description

Service processing method and device, storage medium and electronic device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a service processing method, a device, a storage medium, and an electronic device.
Background
With the development of internet technology, various applications have more and more functions, and the service functions carried by the applications have more and more functions. In the related art, the common service development mode is waterfall development, that is, the service logic from top to bottom, and is realized through an interface after the service logic is split.
However, such a development manner may make each interface very complex, and there is a strong correlation between the interfaces, and the coupling degree of codes between the different interfaces is high. When the business logic is required to be changed, a plurality of interfaces are required to be adjusted, and the development cost and the maintenance cost are high.
Based on the above, a technical scheme capable of reducing the relevance between service interfaces and the coupling degree of codes between different interfaces is urgently needed, so that development efficiency is improved, and development and maintenance costs are reduced.
Disclosure of Invention
The application aims to provide a service processing method, a device, a storage medium and an electronic device, which are used for reducing the relevance between service interfaces and the coupling degree of codes between different interfaces so as to improve the development efficiency and reduce the development and maintenance cost.
The application provides a service processing method, which comprises the following steps:
receiving target data, and determining a target service corresponding to the target data according to a service identifier carried by the target data; determining target configuration information corresponding to the target service in a target container, and determining a first component set and a target calling sequence of each component in the first component set according to the target configuration information; sequentially calling each component in the first component set according to the target calling sequence through the target container; wherein the first set of components is: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
Optionally, before determining the target configuration information corresponding to the target service in the target container and determining the first component set and the target calling sequence of each component in the first component set according to the target configuration information, the method further includes: acquiring a plurality of components to be registered; each component to be registered in the plurality of components to be registered corresponds to a business capability; the service capacities corresponding to different components to be registered are different; registering the plurality of components to be registered into the component library through a registrar of the target container; wherein any registered component in the component library comprises: a data checking function, a logic processing function and a processing result notifying function.
Optionally, after the registering the plurality of components to be registered in the component library by the registrar of the target container, the method further includes: acquiring first service information of the target service; the target service is any one of a plurality of services which can be processed by the target container; determining a plurality of components to be associated required by the target service and the calling sequence of the components to be associated according to the service logic indicated by the first service information; and generating the target configuration information based on the plurality of components to be associated and the calling sequence of the plurality of components to be associated.
Optionally, after generating the target configuration information based on the plurality of components to be associated and the calling order of the plurality of components to be associated, the method further includes: registering a first target component into the component library through the registrar under the condition that the target service is changed; determining a second assembly set required by the target service and a calling sequence of each assembly in the second assembly set based on service logic indicated by service information after service change of the target service; the second set of components includes: each component in the first set of components, and the first target component; updating the target configuration information based on the second component set and the calling sequence of each component in the second component set; the first target component is: components that are not registered in the component library before the target service makes a service change.
Optionally, after generating the target configuration information based on the plurality of components to be associated and the calling order of the plurality of components to be associated, the method further includes: under the condition that the target service is changed, removing a second target component from the first component set based on service logic indicated by service information after service change of the target service to obtain a third component set; determining the calling sequence of each component in the third component set based on the business logic indicated by the changed business information, and updating the target configuration information based on the calling sequence of each component in the third component set; wherein the second target component is: and components required for realizing the target service before the target service is subjected to service change and not associated with the target service after the target service is subjected to service change.
Optionally, after generating the target configuration information based on the plurality of components to be associated and the calling order of the plurality of components to be associated, the method further includes: and under the condition that the target service is changed, updating the target configuration information based on the service logic indicated by the service information after the target service is changed.
Optionally, the receiving the target data and determining the target service corresponding to the target data according to the service identifier carried by the target data includes: receiving the target data, and analyzing the target data to obtain service identifiers contained in the target data; and determining the target service matched with the service identifier from the target container according to the service identifier.
The application also provides a service processing device, which comprises:
the receiving module is used for receiving the target data; the determining module is used for determining a target service corresponding to the target data according to the service identifier carried by the target data; the determining module is further configured to determine target configuration information corresponding to the target service in a target container, and determine a first component set and a target calling sequence of each component in the first component set according to the target configuration information; the execution module is used for calling each component in the first component set in sequence according to the target calling sequence through the target container; wherein the first set of components is: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
Optionally, the apparatus further comprises: an acquisition module; the acquisition module is used for acquiring a plurality of components to be registered; each component to be registered in the plurality of components to be registered corresponds to a business capability; the service capacities corresponding to different components to be registered are different; the execution module is further used for registering the components to be registered into the component library through a registrar of the target container; wherein any registered component in the component library comprises: a data checking function, a logic processing function and a processing result notifying function.
Optionally, the apparatus further comprises: a generating module; the acquisition module is further used for acquiring first service information of the target service; the target service is any one of a plurality of services which can be processed by the target container; the determining module is further configured to determine a plurality of components to be associated required by the target service and a calling sequence of the plurality of components to be associated according to service logic indicated by the first service information; the generating module is used for generating the target configuration information based on the plurality of components to be associated and the calling sequence of the plurality of components to be associated.
Optionally, the executing module is further configured to register, by the registrar, a first target component in the component library in a case where the target service changes; the determining module is further configured to determine a second component set required by the target service and a calling sequence of each component in the second component set based on service logic indicated by service information after the target service is subjected to service change; the second set of components includes: each component in the first set of components, and the first target component; the generating module is further configured to update the target configuration information based on the second component set and a calling sequence of each component in the second component set; the first target component is: components that are not registered in the component library before the target service makes a service change.
Optionally, the executing module is further configured to, in a case that the target service is changed, remove the second target component from the first component set based on service logic indicated by service information after the target service is changed, to obtain a third component set; the determining module is further configured to determine a calling sequence of each component in the third component set based on the service logic indicated by the changed service information; the generating module is further configured to update the target configuration information based on a calling sequence of each component in the third component set; wherein the second target component is: and components required for realizing the target service before the target service is subjected to service change and not associated with the target service after the target service is subjected to service change.
Optionally, the generating module is further configured to update the target configuration information based on service logic indicated by the service information after the service change is performed on the target service when the target service is changed.
Optionally, the receiving module is specifically configured to receive the target data, and parse the target data to obtain a service identifier included in the target data; the determining module is specifically configured to determine, according to the service identifier, the target service that matches the service identifier from the target container.
The application also provides an electronic device comprising a memory in which a computer program is stored and a processor arranged to perform the steps of implementing a method of service processing as described in any of the above by means of the computer program.
The present application also provides a computer readable storage medium comprising a stored program, wherein the program when executed implements the steps of the business processing method as described in any of the above.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a business processing method as described in any of the above.
The application provides a service processing method, a device, a storage medium and an electronic device. And then, determining target configuration information corresponding to the target service in the target container, and determining the first component set and the target calling sequence of each component in the first component set according to the target configuration information. And finally, sequentially calling each component in the first component set according to the target calling sequence through the target container. Therefore, the service units can be mutually independent, when service change occurs, only the change part is needed to be adjusted, no large influence is generated among the service units, the unit test is convenient, and the development and maintenance cost can be greatly reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the application or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the application, and other drawings can 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 processing method provided by the application;
FIG. 2 is a second flow chart of the business processing method according to the present application;
fig. 3 is a schematic structural diagram of a service processing device provided by the present application;
fig. 4 is a schematic structural diagram of an electronic device provided by the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The common service development mode is waterfall type development, namely, the service logic from top to bottom is realized through an interface after being split. Taking order service as an example, the order service aggregates all the services related to the transaction process, and the interfaces of all the service points are written and called sequentially from top to bottom, so that the card has to be finished from top to bottom each time, the unit test is not easy, and the services are mutually influenced.
In order to solve the technical problems in the related art, the service management method based on the containerized component provided by the embodiment of the application uses the component and the container to solidify the main structure, unifies the templates of the component, and integrally uses the container to arrange and call to form a tree structure. When the development changes, the component changes can not affect each other, and the new components can not affect the whole structure. The maintenance cost is reduced, the unit test is convenient, and the test is only needed to test new business, so that the development and maintenance cost is greatly reduced.
The service processing method provided by the embodiment of the application is described in detail below through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
As shown in fig. 1, a service processing method provided in an embodiment of the present application may include the following steps 101 to 103:
step 101, receiving target data, and determining a target service corresponding to the target data according to a service identifier carried by the target data.
The target data is, for example, user request data received by a service system, where the user request data includes a service identifier for identifying a service source, and based on the service identifier, a service source of the target data, that is, the target service, can be determined.
Specifically, the step 101 may include the following steps 101a1 and 101a2:
step 101a1, receiving the target data, and analyzing the target data to obtain a service identifier contained in the target data.
Step 101a2, determining the target service matched with the service identifier from the target container according to the service identifier.
For example, the target data may be an HTTP request sent by the client, and the service identifier included in the target data may be obtained based on a result of parsing the HTTP request. Based on the service identification, a specific service corresponding to the target data can be determined.
Step 102, determining target configuration information corresponding to the target service in a target container, and determining a first assembly set and a target calling sequence of each assembly in the first assembly set according to the target configuration information.
Wherein the first set of components is: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
In the embodiment of the application, the components and the containers are designed, the related service modules are abstracted and stripped, different service components are uniformly registered in the containers based on the design principle of high cohesion and low coupling of codes, and then the components are bound according to service sources, so that the component structuring configuration is realized.
For example, after determining the target service corresponding to the target data, target configuration information corresponding to the target service may be searched from the target container, where the target configuration information includes: each registration component required for realizing the target service, and the calling sequence of each registration component.
Illustratively, based on the target configuration information, a circulation path of the target data in the target container may be determined.
Step 103, calling each component in the first component set in turn according to the target calling sequence through the target container.
Illustratively, the target container includes: a component library, a registrar and an executor; the component library is used for storing component objects; the register is used for registering the business components into the component library and defining the calling sequence of each component corresponding to different businesses; the executor is used for calling the components needed by the service in turn according to the service source and the calling sequence corresponding to the service. I.e. the above step 103 may be performed in particular by an actuator of the target container.
After determining each registered component required for implementing the target service and the calling sequence of each registered component, the executor of the target container may call each component in the first component set to process the target data, so as to obtain a final processing result.
For example, as shown in fig. 2, 9 components (including components a1 to a3, components b1 to b3, and components c1 to c 3) required for implementing different services a, b, c, and d are stored in the component library of the container. And the executor of the container sequentially calls the components in the component library according to the corresponding calling sequence and generates corresponding results according to different service sources. For example, for service a, the corresponding component call order is: the data of the service a flows among the components and generates a final result a; for the service b, the calling sequence of the corresponding components is as follows: the data of the service b flows among the components and generates a final result b; for the service c, the calling sequence of the corresponding components is as follows: the data of the service c flows among the components and generates a final result c; for the service d, the calling sequence of the corresponding components is as follows: the data of the service d flows among the components a3, b3 and c2, and a final result d is generated.
It should be noted that, for the final results generated by different services, different result processors may be selected to perform result assembly. For undefined service sources, the service data can be processed according to a default processing flow, namely, the target container in the application further comprises a set of multiple registered components associated with undefined service data and the calling sequence of each component in the multiple registered components.
Alternatively, in the embodiment of the present application, service components required for different services may be arranged in the following manner.
Illustratively, before the step 102, the service processing method provided by the embodiment of the present application may further include the following steps 104 and 105:
step 104, obtaining a plurality of components to be registered.
Wherein each of the plurality of components to be registered corresponds to a business capability; the service capacities corresponding to different components to be registered are different; service components having the same function between different services may be shared.
Step 105, registering the components to be registered into the component library through a registrar of the target container.
Wherein any registered component in the component library comprises: a data check (check) function, a logic processing (logic) function, and a processing result notification (notify) function. The data verification function is used for verifying the data to be processed by the component; the logic processing function is used for realizing the function corresponding to the component; and the processing result notification function is used for sending the processing result of the component on the data to the container.
In the embodiment of the application, the components contained in the container are developed based on a unified component template; that is, any component contains three parts of check, logic, and notify, each of which may be implemented by one or more methods. When any component processes data transferred by other components, the data needs to be checked; then, processing the data through a logic processing function; and finally, feeding back the data processing result to the container through a processing result notification function.
It should be noted that, the number of services that can be carried by one container is limited, and in order to improve the processing efficiency of the services, a plurality of containers may be constructed based on the component arrangement method provided by the embodiment of the present application, so as to meet more service requirements.
Illustratively, after the above-mentioned construction of the target container is completed, configuration information of the target service needs to be generated, so that an executor of the container can call a corresponding component according to service logic of the target service.
Exemplary, after the step 105, the service processing method provided by the embodiment of the present application may further include the following steps 106 to 108:
And 106, acquiring first service information of the target service.
Wherein the target service is any one of a plurality of services which can be processed by the target container.
And step 107, determining a plurality of components to be associated required by the target service and the calling sequence of the plurality of components to be associated according to the service logic indicated by the first service information.
And step 108, generating the target configuration information based on the components to be associated and the calling sequence of the components to be associated.
The first service information may be obtained by the registrar of the container by means of configuration information, for example. I.e. the above step 108 may be performed by the registrar of the target container.
For example, based on the business logic of the target business, the corresponding target configuration information may be generated, so that the registrar of the target container can call the corresponding component according to the call sequence indicated by the target configuration information, thereby completing the processing of the target data.
Optionally, in the embodiment of the present application, based on the arrangement mode of the container to the components, when the target service changes, the components related to the changing part can be conveniently adjusted.
For example, in the case of adding a service component to the target container, after the step 108, the service processing method provided by the embodiment of the present application may further include the following steps 109 to 111:
and step 109, registering the first target component into the component library through the registrar under the condition that the target service is changed.
Step 110, determining a second assembly set required by the target service and a calling sequence of each assembly in the second assembly set based on service logic indicated by the service information after the target service is subjected to service change.
Wherein the second set of components comprises: each component in the first set of components, and the first target component.
Step 111, updating the target configuration information based on the second component set and the calling sequence of each component in the second component set.
Wherein the first target component is: components that are not registered in the component library before the target service makes a service change.
For example, after the first target component changes the target service, a service component newly added in the processing flow is needed. The first target component may be added to the target container according to the methods in the steps 109 to 111, so as to enable the first target component to meet the service requirement of the changed target service.
In the case where a new component is required to be added to the target container when a service is newly added to the target container, the new service component may be added to the target container by referring to the methods in steps 109 to 111.
For example, in a case where the second target component needs to be removed from the components associated with the target service after the target service is changed, after the step 108, the service processing method provided by the embodiment of the present application may further include the following steps 112 and 113:
and 112, removing the second target assembly from the first assembly set based on the service logic indicated by the service information after the service change of the target service to obtain a third assembly set.
And 113, determining the calling sequence of each component in the third component set based on the business logic indicated by the changed business information, and updating the target configuration information based on the calling sequence of each component in the third component set.
Wherein the second target component is: and components required for realizing the target service before the target service is subjected to service change and not associated with the target service after the target service is subjected to service change.
For example, for the second target component, if the second target component is not used in the processing flow of the other services carried by the target container, the second target component may be deleted from the component library of the target container.
For example, in the case that, after the target service is changed, the calling sequence of the component associated with the target service needs to be adjusted, after the step 108, the service processing method provided by the embodiment of the present application may further include the following step 114:
step 114, updating the target configuration information based on the service logic indicated by the service information after the target service is changed when the target service is changed.
Illustratively, in the case that the calling order of the components of the first component set needs to be adjusted due to the influence of the target service change, the method in step 114 may be referred to for execution.
It should be noted that, steps 109 to 114 are performed by the registry of the target container. The business processing method provided by the embodiment of the application follows the design principle of high cohesion and low coupling of codes, can realize business structuring in a complex business mode, and can flexibly increase components and reduce development cost. Meanwhile, aiming at order type business, the business processing method provided by the embodiment of the application can greatly simplify the business maintenance cost, enable different business components to be more independent and structured, and reduce the code later operation and maintenance cost.
The service processing method provided by the embodiment of the application firstly receives the target data and determines the target service corresponding to the target data according to the service identifier carried by the target data. And then, determining target configuration information corresponding to the target service in the target container, and determining the first component set and the target calling sequence of each component in the first component set according to the target configuration information. And finally, sequentially calling each component in the first component set according to the target calling sequence through an executor of the target container. Therefore, the service units can be mutually independent, when service change occurs, only the change part is needed to be adjusted, no large influence is generated among the service units, the unit test is convenient, and the development and maintenance cost can be greatly reduced.
It should be noted that, in the service processing method provided in the embodiment of the present application, the execution body may be a service processing apparatus, or a control module in the service processing apparatus for executing the service processing method. In the embodiment of the application, a method for executing service processing by a service processing device is taken as an example, and the service processing device provided by the embodiment of the application is described.
In the embodiment of the present application, the method is shown in the drawings. The service processing method is exemplified by a figure in combination with the embodiment of the application. In specific implementation, the service processing method shown in the foregoing method drawings may also be implemented in combination with any other drawing that may be combined and illustrated in the foregoing embodiments, which is not repeated herein.
The service processing device provided by the application is described below, and the service processing method described below and the service processing method described above can be referred to correspondingly.
Fig. 3 is a schematic structural diagram of a service processing device according to an embodiment of the present application, as shown in fig. 3, including:
a receiving module 301, configured to receive target data; a determining module 302, configured to determine a target service corresponding to the target data according to a service identifier carried by the target data; the determining module 302 is further configured to determine target configuration information corresponding to the target service in a target container, and determine a first component set and a target calling sequence of each component in the first component set according to the target configuration information; an execution module 303, configured to call each component in the first component set sequentially according to the target call order through the target container; wherein the first set of components is: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
Optionally, the apparatus further comprises: an acquisition module; the acquisition module is used for acquiring a plurality of components to be registered; each component to be registered in the plurality of components to be registered corresponds to a business capability; the service capacities corresponding to different components to be registered are different; the executing module 303 is further configured to register, by a registrar of the target container, the plurality of components to be registered into the component library; wherein any registered component in the component library comprises: a data checking function, a logic processing function and a processing result notifying function.
Optionally, the apparatus further comprises: a generating module; the acquisition module is further used for acquiring first service information of the target service; the target service is any one of a plurality of services which can be processed by the target container; the determining module 302 is further configured to determine, according to the service logic indicated by the first service information, a plurality of components to be associated required by the target service and a calling sequence of the plurality of components to be associated; the generating module is used for generating the target configuration information based on the plurality of components to be associated and the calling sequence of the plurality of components to be associated.
Optionally, the executing module 303 is further configured to register, by the registrar, a first target component in the component library in a case where the target service is changed; the determining module 302 is further configured to determine a second component set required by the target service and a calling sequence of each component in the second component set based on service logic indicated by service information after the target service is subjected to service modification; the second set of components includes: each component in the first set of components, and the first target component; the generating module is further configured to update the target configuration information based on the second component set and a calling sequence of each component in the second component set; the first target component is: components that are not registered in the component library before the target service makes a service change.
Optionally, the executing module 303 is further configured to, in a case where the target service is changed, remove the second target component from the first component set based on service logic indicated by service information after the target service is changed, to obtain a third component set; the determining module 302 is further configured to determine a calling order of each component in the third component set based on the service logic indicated by the changed service information; the generating module is further configured to update the target configuration information based on a calling sequence of each component in the third component set; wherein the second target component is: and components required for realizing the target service before the target service is subjected to service change and not associated with the target service after the target service is subjected to service change.
Optionally, the generating module is further configured to update the target configuration information based on service logic indicated by the service information after the service change is performed on the target service when the target service is changed.
Optionally, the receiving module 301 is specifically configured to receive the target data, and parse the target data to obtain a service identifier included in the target data; the determining module 302 is specifically configured to determine, according to the service identifier, the target service that matches the service identifier from the target container.
The service processing device provided by the application firstly receives the target data and determines the target service corresponding to the target data according to the service identifier carried by the target data. And then, determining target configuration information corresponding to the target service in the target container, and determining the first component set and the target calling sequence of each component in the first component set according to the target configuration information. And finally, sequentially calling each component in the first component set according to the target calling sequence through an executor of the target container. Therefore, the service units can be mutually independent, when service change occurs, only the change part is needed to be adjusted, no large influence is generated among the service units, the unit test is convenient, and the development and maintenance cost can be greatly reduced.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. Processor 410 may invoke logic instructions in memory 430 to perform a business processing method comprising: receiving target data, and determining a target service corresponding to the target data according to a service identifier carried by the target data; determining target configuration information corresponding to the target service in a target container, and determining a first component set and a target calling sequence of each component in the first component set according to the target configuration information; sequentially calling each component in the first component set according to the target calling sequence through the target container; wherein the first set of components is: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present application also provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the business processing method provided by the above methods, the method comprising: receiving target data, and determining a target service corresponding to the target data according to a service identifier carried by the target data; determining target configuration information corresponding to the target service in a target container, and determining a first component set and a target calling sequence of each component in the first component set according to the target configuration information; sequentially calling each component in the first component set according to the target calling sequence through the target container; wherein the first set of components is: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
In still another aspect, the present application further provides a computer readable storage medium, where the computer readable storage medium includes a stored program, where the program executes a service processing method provided by the above methods, and the method includes: receiving target data, and determining a target service corresponding to the target data according to a service identifier carried by the target data; determining target configuration information corresponding to the target service in a target container, and determining a first component set and a target calling sequence of each component in the first component set according to the target configuration information; sequentially calling each component in the first component set according to the target calling sequence through the target container; wherein the first set of components is: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for processing a service, comprising:
receiving target data, and determining a target service corresponding to the target data according to a service identifier carried by the target data;
determining target configuration information corresponding to the target service in a target container, and determining a first component set and a target calling sequence of each component in the first component set according to the target configuration information;
sequentially calling each component in the first component set according to the target calling sequence through the target container;
wherein the first set of components comprises: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
2. The service processing method according to claim 1, wherein before determining target configuration information corresponding to the target service in the target container and determining the first component set and the target calling order of each component in the first component set according to the target configuration information, the method further comprises:
acquiring a plurality of components to be registered; each component to be registered in the plurality of components to be registered corresponds to a business capability; the service capacities corresponding to different components to be registered are different;
registering the plurality of components to be registered into the component library through a registrar of the target container;
wherein any registered component in the component library comprises: a data checking function, a logic processing function and a processing result notifying function.
3. The service processing method according to claim 2, wherein after the registering of the plurality of components to be registered into the component library by the registrar of the target container, the method further comprises:
acquiring first service information of the target service; the target service is any one of a plurality of services which can be processed by the target container;
Determining a plurality of components to be associated required by the target service and the calling sequence of the components to be associated according to the service logic indicated by the first service information;
and generating the target configuration information based on the plurality of components to be associated and the calling sequence of the plurality of components to be associated.
4. The service processing method according to claim 3, wherein after generating the target configuration information based on the plurality of components to be associated and the order of invocation of the plurality of components to be associated, the method further comprises:
registering a first target component into the component library through the registrar under the condition that the target service is changed;
determining a second assembly set required by the target service and a calling sequence of each assembly in the second assembly set based on service logic indicated by service information after service change of the target service; the second set of components includes: each component in the first set of components, and the first target component;
updating the target configuration information based on the second component set and the calling sequence of each component in the second component set;
The first target component is: components that are not registered in the component library before the target service makes a service change.
5. The service processing method according to claim 3, wherein after generating the target configuration information based on the plurality of components to be associated and the order of invocation of the plurality of components to be associated, the method further comprises:
and under the condition that the target service is changed, updating the target configuration information based on the service logic indicated by the service information after the target service is changed.
6. The service processing method according to claim 3, wherein after generating the target configuration information based on the plurality of components to be associated and the order of invocation of the plurality of components to be associated, the method further comprises:
under the condition that the target service is changed, removing a second target component from the first component set based on service logic indicated by service information after service change of the target service to obtain a third component set;
determining the calling sequence of each component in the third component set based on the business logic indicated by the changed business information, and updating the target configuration information based on the calling sequence of each component in the third component set;
Wherein the second target component is: and components required for realizing the target service before the target service is subjected to service change and not associated with the target service after the target service is subjected to service change.
7. The service processing method according to claim 1, wherein the receiving the target data and determining the target service corresponding to the target data according to the service identifier carried by the target data includes:
receiving the target data, and analyzing the target data to obtain service identifiers contained in the target data;
and determining the target service matched with the service identifier from the target container according to the service identifier.
8. A service processing apparatus, the apparatus comprising:
the receiving module is used for receiving the target data;
the determining module is used for determining a target service corresponding to the target data according to the service identifier carried by the target data;
the determining module is further configured to determine target configuration information corresponding to the target service in a target container, and determine a first component set and a target calling sequence of each component in the first component set according to the target configuration information;
The execution module is used for calling each component in the first component set in sequence according to the target calling sequence through the target container;
wherein the first set of components is: a registration component associated with the target business among a plurality of registration components contained in a component library of the target container.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the service processing method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the service processing method according to any of claims 1 to 7 by means of the computer program.
CN202310587768.2A 2023-05-22 2023-05-22 Service processing method and device, storage medium and electronic device Pending CN116627814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310587768.2A CN116627814A (en) 2023-05-22 2023-05-22 Service processing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310587768.2A CN116627814A (en) 2023-05-22 2023-05-22 Service processing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN116627814A true CN116627814A (en) 2023-08-22

Family

ID=87641204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310587768.2A Pending CN116627814A (en) 2023-05-22 2023-05-22 Service processing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116627814A (en)

Similar Documents

Publication Publication Date Title
CN108958714B (en) Business component type development method and device, computer equipment and storage medium
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
US9020949B2 (en) Method and system for centralized issue tracking
CN110780870A (en) Service execution method, device, equipment and storage medium
CN111694638A (en) Rule package loading method, rule package executing method and terminal equipment
CN111381940B (en) Distributed data processing method and device
CN114217887A (en) Micro-service arranging method, micro-service executing method, micro-service arranging device and micro-service executing server
CN113157315A (en) Method, device, equipment and medium for identifying difference information of different versions of software
CN115469894A (en) Application program installation control method, device, equipment and storage medium
CN111240772A (en) Data processing method and device based on block chain and storage medium
CN114971827A (en) Account checking method and device based on block chain, electronic equipment and storage medium
CN113987337A (en) Search method, system, equipment and storage medium based on componentized dynamic arrangement
CN112671878B (en) Block chain information subscription method, device, server and storage medium
CN110347735A (en) The data forwarding of configurationization mends processing method, device and readable storage medium storing program for executing extremely
CN112559525B (en) Data checking system, method, device and server
CN114519084A (en) Block chain-based medical data inspection method, device, equipment and medium
CN116627814A (en) Service processing method and device, storage medium and electronic device
CN115469833A (en) Method and device for implementing dynamic rule engine, electronic equipment and storage medium
CN112130900B (en) User information management method, system, equipment and medium for BMC
CN114723394A (en) Credit granting flow configuration method based on artificial intelligence and related equipment
CN114157662A (en) Cloud platform parameter adaptation method and device, terminal equipment and storage medium
CN113722225A (en) Page testing method and device, computer equipment and storage medium
CN112256689A (en) Service data cleaning method and device and electronic equipment
CN111008220A (en) Dynamic identification method and device of data source, storage medium and electronic device
CN114818645B (en) Automatic report generation method, device, equipment and medium based on data body

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