CN111190609B - Service processing method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN111190609B
CN111190609B CN201811351895.8A CN201811351895A CN111190609B CN 111190609 B CN111190609 B CN 111190609B CN 201811351895 A CN201811351895 A CN 201811351895A CN 111190609 B CN111190609 B CN 111190609B
Authority
CN
China
Prior art keywords
plug
service
installation package
target
processed
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.)
Active
Application number
CN201811351895.8A
Other languages
Chinese (zh)
Other versions
CN111190609A (en
Inventor
张伟力
李廷威
肖运龙
杨镇育
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Infinite Information Technology Co ltd
Original Assignee
Guangdong Infinite Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Infinite Information Technology Co ltd filed Critical Guangdong Infinite Information Technology Co ltd
Priority to CN201811351895.8A priority Critical patent/CN111190609B/en
Publication of CN111190609A publication Critical patent/CN111190609A/en
Application granted granted Critical
Publication of CN111190609B publication Critical patent/CN111190609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

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

Abstract

The application relates to a service processing method, device, equipment and storage medium. The method comprises the following steps: acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed; determining the plug-in information of a target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in a system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged; and in the running process of the system code, calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package so as to finish the processing of the service to be processed. The method improves the flexibility of service processing and reduces the maintenance cost of the system codes.

Description

Service processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a service.
Background
With the continuous development of technology, the business demands of customers are more and more diversified. For example, in the process of pushing data, client A needs to organize the data into a file in xml format and pushes the data based on the file transfer protocol (full name: file Transfer Protocol, abbreviated name: FTP); b clients need to organize the data into a json format file and push it based on the HyperText transfer protocol (full: hyperText Transfer Protocol; HTTP). Because the technical standards applied by different service demands are different, corresponding service interfaces need to be developed according to different service demands in the service processing process.
In the conventional technology, when a new service requirement is met, a system code needs to be modified, and a functional interface aiming at the newly increased service requirement is added in the system code, so that functional support for the new service is realized.
However, as the number and types of service demands to be docked increase, the conventional service processing method has poor flexibility and high maintenance cost of the system code.
Disclosure of Invention
Based on this, it is necessary to provide a service processing method, apparatus, device and storage medium, aiming at the problems of poor flexibility and high maintenance cost of system codes in the conventional service processing manner.
A business processing method comprises the following steps:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining the plug-in information of a target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in a system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged;
and in the running process of the system code, calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package so as to finish the processing of the service to be processed.
According to the business processing method provided by the embodiment, after the computer equipment acquires the business processing instruction, the computer equipment determines the plug-in information of the target plug-in installation package corresponding to the business to be processed according to the identification of the business to be processed and the plug-in configuration file preset in the system code, and in the running process of the system code, the target plug-in installation package is called according to the plug-in information of the target plug-in installation package, and the target plug-in installation package is executed, so that the business to be processed is processed. In the service processing process, the computer equipment completes the service processing by calling the target plug-in installation package corresponding to the service to be processed and executing the process of the target plug-in installation package, so that when the service needs to be processed, only the target plug-in installation package of the service to be processed is required to be stored in a preset plug-in catalog in advance, and plug-in information of the target plug-in installation package is configured in a plug-in configuration file. Therefore, the computer equipment can directly call and execute the target plug-in installation package from the plug-in catalog according to the plug-in information of the target plug-in installation package in the plug-in configuration file, the processing of the service can be completed, the system code is not required to be modified, and the target plug-in installation package and the system code are independently arranged, so that the service code is extracted from the system code, decoupling between the system code and the service is achieved, the flexibility of service processing is improved, and the maintenance cost of the system code is reduced.
In one embodiment, the plug-in information of the target plug-in installation package includes an identification of the target plug-in installation package and path information of the target plug-in installation package.
In one embodiment, the determining, according to the identifier of the service to be processed and a plug-in configuration file preset in the system code, plug-in information of a target plug-in installation package corresponding to the service to be processed includes:
analyzing the plug-in configuration file to obtain the identifiers of all plug-in installation packages and the path information of all plug-in installation packages in the plug-in configuration file;
and determining the identification matched with the identification of the service to be processed in the identifications of all the plug-in installation packages as the identification of the target plug-in installation package, and acquiring the path information of the target plug-in installation package corresponding to the identification of the target plug-in installation package.
According to the service processing method provided by the embodiment, after the computer equipment analyzes the plug-in configuration file to obtain the identifiers of all plug-in installation packages and the path information of all plug-in installation packages in the plug-in configuration file, the computer equipment determines the same identifier as the identifier of the service to be processed in the identifiers of all plug-in installation packages as the identifier of the target plug-in installation package, and obtains the path information of the target plug-in installation package corresponding to the identifier of the target plug-in installation package. Because the computer equipment determines the identification of the target plug-in installation package and the path information of the target plug-in installation package based on the analyzed content of the plug-in configuration file, the accuracy of the plug-in information of the target plug-in installation package determined by the computer equipment is higher, so that the accuracy of the target plug-in installation package called based on the determined plug-in information is higher, and the accuracy of service processing is further improved.
In one embodiment, the calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package includes:
performing format conversion on the plug-in information of the target plug-in installation package to obtain converted plug-in information;
determining a class loader of the target plug-in installation package according to the converted plug-in information and the URLClassLoader;
and loading the target plug-in installation package by using the class loader to obtain a plug-in class instance of the target plug-in installation package, and executing the plug-in class instance.
According to the business processing method provided by the embodiment, the computer equipment adopts the class loader corresponding to the target plug-in installation package to load the target plug-in installation package in the process of calling the target plug-in installation package, so that the accuracy of the target plug-in installation package called by the computer equipment is higher, and the business processing accuracy is further improved.
In one embodiment, the calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package includes:
and acquiring the plug-in class instance corresponding to the target plug-in installation package from the spring container according to the identification of the target plug-in installation package, and executing the plug-in class instance.
According to the business processing method provided by the embodiment, the plug-in class examples corresponding to different business types are managed through the spring container, so that when the computer equipment needs to process business to be processed, the computer equipment can acquire the plug-in class examples corresponding to the target plug-in installation package from the spring container, the business processing process is greatly simplified, and the business processing efficiency is improved.
In one embodiment, the method further comprises:
acquiring a service deletion instruction; the service deleting instruction carries the identifier of the target plug-in installation package;
deleting the target plug-in installation package according to the service deleting instruction, and destroying the plug-in class instance corresponding to the service to be processed.
In one embodiment, the plug-in configuration file is in any of XML format or database format.
According to the service processing method provided by the embodiment, when the service of a client is not needed to be docked, the computer equipment can delete the target plug-in installation package corresponding to the service in time and destroy the plug-in class instance corresponding to the service. Because the target plug-in installation package and the system code are independently arranged, the high decoupling between the service and the system code is realized, when the service of a butt-joint client is not needed, the computer equipment directly deletes the target plug-in installation package corresponding to the service and destroys the plug-in class instance corresponding to the service, and the service can be processed without modifying the system code, thereby improving the flexibility of service processing and reducing the maintenance cost of the system code.
A business processing apparatus, comprising:
the first acquisition module is used for acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
the determining module is used for determining the plug-in information of the target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in the system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged;
and the first processing module is used for calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package in the running process of the system code so as to finish the processing of the service to be processed.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining the plug-in information of a target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in a system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged;
And in the running process of the system code, calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package so as to finish the processing of the service to be processed.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining the plug-in information of a target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in a system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged;
and in the running process of the system code, calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package so as to finish the processing of the service to be processed.
After the service processing instruction is acquired, the processing device, the device and the storage medium for the service provided by the embodiment can enable the computer device to determine the plug-in information of the target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and the plug-in configuration file preset in the system code, and call the target plug-in installation package and execute the target plug-in installation package according to the plug-in information of the target plug-in installation package in the running process of the system code, so that the processing of the service to be processed is completed. In the service processing process, the computer equipment completes the service processing by calling the target plug-in installation package corresponding to the service to be processed and executing the process of the target plug-in installation package, so that when the service needs to be processed, only the target plug-in installation package of the service to be processed is required to be stored in a preset plug-in catalog in advance, and plug-in information of the target plug-in installation package is configured in a plug-in configuration file. Therefore, the computer equipment can directly call and execute the target plug-in installation package from the plug-in catalog according to the plug-in information of the target plug-in installation package in the plug-in configuration file, the processing of the service can be completed, the system code is not required to be modified, and the target plug-in installation package and the system code are independently arranged, so that the service code is extracted from the system code, decoupling between the system code and the service is achieved, the flexibility of service processing is improved, and the maintenance cost of the system code is reduced.
Drawings
Fig. 1 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for processing services according to an embodiment;
FIG. 3 is a flow chart illustrating a method for processing services according to another embodiment;
FIG. 4 is a flowchart illustrating a method for processing a service according to another embodiment;
FIG. 5 is a flowchart illustrating a method for processing a service according to another embodiment;
FIG. 6 is a flowchart illustrating a method for processing a service according to another embodiment;
FIG. 7 is a schematic structural diagram of a processing device for services according to an embodiment;
fig. 8 is a schematic structural diagram of a processing device for services according to another embodiment;
fig. 9 is a schematic structural diagram of a processing device for services provided in another embodiment;
fig. 10 is a schematic structural diagram of a processing device for services according to another embodiment;
fig. 11 is a schematic structural diagram of a processing device for services according to another embodiment.
Detailed Description
The service processing method provided by the embodiment of the application can be applied to the computer equipment shown in fig. 1. The computer device comprises a processor, a memory, and a computer program stored in the memory, wherein the processor is connected through a system bus, and when executing the computer program, the processor can execute the steps of the method embodiments described below. Optionally, the computer device may further comprise a network interface, a display screen and an input means. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, which stores an operating system and a computer program, an internal memory. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. Alternatively, the computer device may be an electronic device that has an image data processing function, such as a personal computer PC (personal computer), a mobile terminal, or a portable device, and may interact with an external device or a user, and the specific form of the computer device is not limited in this embodiment.
At present, the business demands of customers are more and more diversified, and when a new business demand needs to be docked, the traditional technology needs to modify the system code, so as to complete the docking of the new business demand. However, as the number and types of service demands to be docked increase, the conventional service processing method has poor flexibility and high maintenance cost of the system code. Therefore, the method, device, equipment and storage medium for processing services provided by the embodiment of the application aim to solve the technical problems in the conventional technology.
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 device, and the device may be implemented by software, hardware, or a combination of software and hardware to form part or all of a computer device. The execution subject of the method embodiments described below will be described by taking a computer device as an example.
In order to make the objects, technical solutions and advantages of the present application more apparent, further detailed descriptions of technical solutions in the embodiments of the present application are provided by the following examples in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the application.
Fig. 2 is a flow chart of a method for processing a service according to an embodiment. The embodiment relates to a specific process how the computer equipment completes the processing of the service to be processed according to the service processing instruction. As shown in fig. 2, the method includes:
s101, acquiring a service processing instruction; the service processing instruction comprises an identification of the service to be processed.
Specifically, for different services of the client, each service has a corresponding identifier. When a new service needs to be docked, the docked new service is the service to be processed, and the identification of the service to be processed is carried in the service processing instruction, so that the service to be processed is processed when the computer equipment acquires the service processing instruction. Alternatively, the service processing instruction may be sent to the computer device by the external device, or may be input to the computer device by the user, which is not limited in this embodiment. Optionally, the identifier of the service to be processed may be a name of the service to be processed, or may be a number of the service to be processed, and the specific form of the identifier of the service to be processed in this embodiment is not limited, so long as different services can be distinguished.
S102, determining the plug-in information of the target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in the system code.
Specifically, the plug-in installation package is used for realizing business processing of clients, and different types of businesses correspond to different plug-in installation packages. When the system needs to be docked with a new service, a developer needs to develop a plug-in installation package corresponding to the new service aiming at the processing process of the new service. After the development of the plug-in installation package of the new service is completed, the research and development personnel store the plug-in installation package of the new service in a preset plug-in catalog, and configure the plug-in information of the plug-in installation package corresponding to the new service in a plug-in configuration file preset in a system code. In this way, the corresponding relation between the identifiers of different services and the plug-in information of different plug-in installation packages is stored in the plug-in configuration file. Wherein the plug-in installation package of the new service is independently set with the system code. Optionally, the format of the plug-in configuration file is any one of an XML format and a database format, and corresponding selection can be performed according to actual requirements.
After the plug-in installation package corresponding to the new service is stored in the preset plug-in catalog and plug-in information of the plug-in installation package corresponding to the service is configured in the plug-in configuration file, when the new service needs to be processed, the new service is the service to be processed in the step S101, and the plug-in installation package corresponding to the new service is the target plug-in installation package. Because the target plug-in installation package is stored in the plug-in catalog in advance and the plug-in information of the target plug-in installation package is configured in the plug-in configuration file, after the computer equipment acquires the service processing instruction, the computer equipment can determine the plug-in information of the target plug-in installation package corresponding to the service to be processed from the plug-in configuration file preset in the system code according to the identification of the service to be processed carried in the service processing instruction. Optionally, the plug-in information of the target plug-in installation package includes an identifier of the target plug-in installation package and path information of the target plug-in installation package. The identifier of the target package may be the name of the target package, or may be the number of the target package, which is not limited in this embodiment. The path information of the target plug-in installation package is used for indicating the storage position of the target plug-in installation package, namely, the plug-in catalog of the storage target plug-in installation package.
S103, calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package in the running process of the system code so as to finish the processing of the service to be processed.
Specifically, because the target plug-in installation package is stored in the plug-in catalog in advance, and the computer device has determined the plug-in information of the target plug-in installation package corresponding to the service to be processed, the computer device can acquire the storage path of the target plug-in installation package and the identification of the target plug-in installation package based on the plug-in information of the target plug-in installation package. In this way, after the computer device obtains the service processing instruction, the computer device starts the running of the system code, and in the running process of the system code, the target plug-in installation package is called from the plug-in catalog (namely, the storage path of the target plug-in installation package), and the target plug-in installation package is executed, so that the processing of the service to be processed is completed.
According to the business processing method provided by the embodiment, after the computer equipment acquires the business processing instruction, the computer equipment determines the plug-in information of the target plug-in installation package corresponding to the business to be processed according to the identification of the business to be processed and the plug-in configuration file preset in the system code, and in the running process of the system code, the target plug-in installation package is called according to the plug-in information of the target plug-in installation package, and the target plug-in installation package is executed, so that the business to be processed is processed. In the service processing process, the computer equipment completes the service processing by calling the target plug-in installation package corresponding to the service to be processed and executing the process of the target plug-in installation package, so that when the service needs to be processed, only the target plug-in installation package of the service to be processed is required to be stored in a preset plug-in catalog in advance, and plug-in information of the target plug-in installation package is configured in a plug-in configuration file. Therefore, the computer equipment can directly call and execute the target plug-in installation package from the plug-in catalog according to the plug-in information of the target plug-in installation package in the plug-in configuration file, the processing of the service can be completed, the system code is not required to be modified, and the target plug-in installation package and the system code are independently arranged, so that the service code is extracted from the system code, decoupling between the system code and the service is achieved, the flexibility of service processing is improved, and the maintenance cost of the system code is reduced.
Fig. 3 is a flow chart of a method for processing a service according to another embodiment. The embodiment relates to a specific process of how the computer equipment determines the plug-in information of the target plug-in installation package corresponding to the service to be processed. On the basis of the above embodiment, as shown in fig. 3, the step S102 may include:
s201, analyzing the plug-in configuration file to obtain the identifiers of all plug-in installation packages and the path information of all plug-in installation packages in the plug-in configuration file.
S202, determining the identification matched with the identification of the service to be processed in the identifications of all the plug-in installation packages as the identification of the target plug-in installation package, and acquiring path information of the target plug-in installation package corresponding to the identification of the target plug-in installation package.
Optionally, the matching with the identifier of the service to be processed may be the same as the identifier of the service to be processed, that is, after the computer device obtains the identifiers of all the plug-in installation packages, the computer device may determine the identifier of the service to be processed, which is the same as the identifier of the service to be processed, in the identifiers of all the plug-in installation packages as the identifier of the target plug-in installation package, and obtain the path information of the corresponding target plug-in installation package from the plug-in configuration file according to the identifier of the target plug-in installation package.
According to the service processing method provided by the embodiment, after the computer equipment analyzes the plug-in configuration file to obtain the identifiers of all plug-in installation packages and the path information of all plug-in installation packages in the plug-in configuration file, the computer equipment determines the same identifier as the identifier of the service to be processed in the identifiers of all plug-in installation packages as the identifier of the target plug-in installation package, and obtains the path information of the target plug-in installation package corresponding to the identifier of the target plug-in installation package. Because the computer equipment determines the identification of the target plug-in installation package and the path information of the target plug-in installation package based on the analyzed content of the plug-in configuration file, the accuracy of the plug-in information of the target plug-in installation package determined by the computer equipment is higher, so that the accuracy of the target plug-in installation package called based on the determined plug-in information is higher, and the accuracy of service processing is further improved.
Fig. 4 is a flow chart of a method for processing a service according to another embodiment, and fig. 5 is a flow chart of a method for processing a service according to another embodiment. The embodiment relates to a specific process that a computer device calls a target plug-in installation package and executes the target plug-in installation package. On the basis of the above embodiment, as an alternative implementation manner, as shown in fig. 4, the step S103 may include:
S301, performing format conversion on the plug-in information of the target plug-in installation package to obtain converted plug-in information.
Specifically, in order to adapt to the java program running environment, after the computer device obtains the plug-in information of the target plug-in installation package, the computer device needs to perform format conversion on the plug-in information of the target plug-in installation package, so as to obtain converted plug-in information.
S302, determining a class loader of the target plug-in installation package according to the converted plug-in information and the URLClassLoader.
Specifically, the computer device inputs the plug-in information of the converted target plug-in installation package to URLClassLoader, URLClassLoader, and may output a class loader corresponding to the target plug-in installation package according to the obtained plug-in information of the converted target plug-in installation package. The loader is used for loading the target plug-in installation package.
S303, loading the target plug-in installation package by using the class loader to obtain a plug-in class instance of the target plug-in installation package, and executing the plug-in class instance.
According to the business processing method provided by the embodiment, the computer equipment adopts the class loader corresponding to the target plug-in installation package to load the target plug-in installation package in the process of calling the target plug-in installation package, so that the accuracy of the target plug-in installation package called by the computer equipment is higher, and the business processing accuracy is further improved.
FIG. 5 is a schematic diagram showing an alternative implementation process of invoking the target package and executing the target package by the computer device, where, based on the foregoing embodiment, as shown in FIG. 5, the foregoing S103 may include:
s401, acquiring a plug-in class instance corresponding to the target plug-in installation package from a spring container according to the identification of the target plug-in installation package.
Specifically, the spring container stores plug-in class implementations corresponding to different plug-in installation packages in advance. In practical application, after obtaining the plug-in class examples of the plug-in installation packages, the computer equipment dynamically injects the obtained plug-in class examples into the spring container through the BeanDefinitionBuilder of the spring container so as to manage the plug-in class examples corresponding to different plug-in installation packages through the spring container. When the computer equipment needs to process the service, the computer equipment can analyze the plug-in configuration file according to the identification of the service to be processed, so as to determine the identification of the target plug-in installation package corresponding to the service to be processed, and further acquire the plug-in class instance corresponding to the target plug-in installation package from the spring container.
S402, executing the plug-in class instance.
According to the business processing method provided by the embodiment, the plug-in class examples corresponding to different business types are managed through the spring container, so that when the computer equipment needs to process business to be processed, the computer equipment can acquire the plug-in class examples corresponding to the target plug-in installation package from the spring container, the business processing process is greatly simplified, and the business processing efficiency is improved.
In practical application, when the service cooperation with the client is no longer performed, that is, when the service of the client is no longer needed to be docked, the computer device processes the service of the client through the following procedure as shown in fig. 6. On the basis of the above embodiment, optionally, after the step S103, the method further includes:
s501, acquiring a service deletion instruction; and the service deleting instruction carries the identifier of the target plug-in installation package.
Specifically, when the service of the client is not needed to be docked, the service is the service to be processed, and the developer can carry the identifier of the target installation package corresponding to the service to be processed in the service deleting instruction and input the service deleting instruction into the computer equipment to instruct the computer equipment to delete the service to be processed. Of course, the computer device may also obtain a service deletion instruction for deleting the service to be processed from other external devices.
S502, deleting the target plug-in installation package according to the service deleting instruction, and destroying the plug-in class instance corresponding to the service to be processed.
Specifically, after the computer device obtains the service deletion instruction, the computer device deletes the target plug-in installation package from the preset plug-in catalog, and invokes the removedefinantionBean method of the DefaultLissableBeanFactory factory to destroy the plug-in class instance corresponding to the service to be processed in the spring container. In addition, the computer device may set the state of the plug-in information of the target plug-in installation package corresponding to the service in the plug-in configuration file to an unavailable state, or may delete the plug-in information of the target plug-in installation package corresponding to the service, which is not limited in this embodiment.
According to the service processing method provided by the embodiment, when the service of a client is not needed to be docked, the computer equipment can delete the target plug-in installation package corresponding to the service in time and destroy the plug-in class instance corresponding to the service. Because the target plug-in installation package and the system code are independently arranged, the high decoupling between the service and the system code is realized, when the service of a butt-joint client is not needed, the computer equipment directly deletes the target plug-in installation package corresponding to the service and destroys the plug-in class instance corresponding to the service, and the service can be processed without modifying the system code, thereby improving the flexibility of service processing and reducing the maintenance cost of the system code.
It should be understood that, although the steps in the flowcharts of fig. 2-6 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Fig. 7 is a schematic structural diagram of a processing device for services according to an embodiment. As shown in fig. 7, the apparatus may include: a first acquisition module 10, a determination module 11 and a first processing module 12.
Specifically, the first obtaining module 10 is configured to obtain a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
the determining module 11 is configured to determine, according to the identifier of the service to be processed and a plug-in configuration file preset in the system code, plug-in information of a target plug-in installation package corresponding to the service to be processed; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged;
and the first processing module 12 is configured to call the target plug-in installation package according to the plug-in information of the target plug-in installation package and execute the target plug-in installation package in the running process of the system code, so as to complete the processing of the service to be processed.
Optionally, the plug-in information of the target plug-in installation package includes an identifier of the target plug-in installation package and path information of the target plug-in installation package.
The service processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 8 is a schematic structural diagram of a service processing device according to another embodiment. Alternatively, as shown in fig. 8, the determining module 11 may include: an analysis unit 111, a first determination unit 112, and a first acquisition unit 113.
Specifically, the parsing unit 111 is configured to parse the plug-in configuration file to obtain identifiers of all plug-in installation packages and path information of all plug-in installation packages in the plug-in configuration file;
a first determining unit 112, configured to determine, as an identifier of the target plug-in installation package, an identifier that matches the identifier of the service to be processed in the identifiers of all plug-in installation packages;
a first obtaining unit 113, configured to obtain path information of a target plug-in installation package corresponding to the identifier of the target plug-in installation package.
The service processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 9 is a schematic structural diagram of a processing device for services according to another embodiment. On the basis of the above embodiment, as an alternative implementation manner, as shown in fig. 9, the first processing module 12 includes: a conversion unit 121, a second determination unit 122, and a first processing unit 123.
Specifically, the converting unit 121 is configured to perform format conversion on the plug-in information of the target plug-in installation package, so as to obtain converted plug-in information;
a second determining unit 122, configured to determine, according to the converted plug-in information and the url lassloader, a class loader of the target plug-in installation package;
and the first processing unit 123 is configured to load the target plug-in installation package by using the class loader, obtain a plug-in class instance of the target plug-in installation package, and execute the plug-in class instance.
The service processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 10 is a schematic structural diagram of a processing device for services according to another embodiment. On the basis of the above embodiment, as another alternative implementation manner, as shown in fig. 10, the first processing module 12 includes: a second acquisition unit 124 and a second processing unit 125.
Specifically, the second obtaining unit 124 is configured to obtain, from the spring container, a plug-in class instance corresponding to the target plug-in installation package according to the identifier of the target plug-in installation package;
and the second processing unit 125 is configured to execute the plug-in class instance.
The service processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 11 is a schematic structural diagram of a processing device for services according to another embodiment. Optionally, as shown in fig. 11, on the basis of the embodiment shown in fig. 9, the service processing apparatus further includes: a second acquisition module 13 and a second processing module 14.
Specifically, the second obtaining module 13 is configured to obtain a service deletion instruction; the service deleting instruction carries the identifier of the target plug-in installation package;
and the second processing module 14 is configured to delete the target plug-in installation package according to the service deletion instruction, and destroy a plug-in class instance corresponding to the service to be processed.
Optionally, the format of the plug-in configuration file is any one of an XML format or a database format.
The service processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The specific limitation of the processing device of the service may be referred to the limitation of the processing method of the service hereinabove, and will not be described herein. The respective modules in the processing device of the above-mentioned service may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 1 is a schematic diagram of an internal structure of a computer device according to an embodiment. As shown in fig. 1, the computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of processing a service. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining the plug-in information of a target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in a system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged;
and in the running process of the system code, calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package so as to finish the processing of the service to be processed.
Optionally, the plug-in information of the target plug-in installation package includes an identifier of the target plug-in installation package and path information of the target plug-in installation package.
In one embodiment, the processor when executing the computer program further performs the steps of:
Analyzing the plug-in configuration file to obtain the identifiers of all plug-in installation packages and the path information of all plug-in installation packages in the plug-in configuration file; and determining the identification matched with the identification of the service to be processed in the identifications of all the plug-in installation packages as the identification of the target plug-in installation package, and acquiring the path information of the target plug-in installation package corresponding to the identification of the target plug-in installation package.
In one embodiment, the processor when executing the computer program further performs the steps of:
performing format conversion on the plug-in information of the target plug-in installation package to obtain converted plug-in information; determining a class loader of the target plug-in installation package according to the converted plug-in information and the URLClassLoader; and loading the target plug-in installation package by using the class loader to obtain a plug-in class instance of the target plug-in installation package, and executing the plug-in class instance.
In one embodiment, the processor when executing the computer program further performs the steps of:
and acquiring the plug-in class instance corresponding to the target plug-in installation package from the spring container according to the identification of the target plug-in installation package, and executing the plug-in class instance.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring a service deletion instruction; the service deleting instruction carries the identifier of the target plug-in installation package; deleting the target plug-in installation package according to the service deleting instruction, and destroying the plug-in class instance corresponding to the service to be processed.
Optionally, the format of the plug-in configuration file is any one of an XML format or a database format.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining the plug-in information of a target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in a system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged;
and in the running process of the system code, calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package so as to finish the processing of the service to be processed.
Optionally, the plug-in information of the target plug-in installation package includes an identifier of the target plug-in installation package and path information of the target plug-in installation package.
In one embodiment, the computer program when executed by the processor further performs the steps of:
analyzing the plug-in configuration file to obtain the identifiers of all plug-in installation packages and the path information of all plug-in installation packages in the plug-in configuration file; and determining the identification matched with the identification of the service to be processed in the identifications of all the plug-in installation packages as the identification of the target plug-in installation package, and acquiring the path information of the target plug-in installation package corresponding to the identification of the target plug-in installation package.
In one embodiment, the computer program when executed by the processor further performs the steps of:
performing format conversion on the plug-in information of the target plug-in installation package to obtain converted plug-in information; determining a class loader of the target plug-in installation package according to the converted plug-in information and the URLClassLoader; and loading the target plug-in installation package by using the class loader to obtain a plug-in class instance of the target plug-in installation package, and executing the plug-in class instance.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and acquiring the plug-in class instance corresponding to the target plug-in installation package from the spring container according to the identification of the target plug-in installation package, and executing the plug-in class instance.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a service deletion instruction; the service deleting instruction carries the identifier of the target plug-in installation package; deleting the target plug-in installation package according to the service deleting instruction, and destroying the plug-in class instance corresponding to the service to be processed.
Optionally, the format of the plug-in configuration file is any one of an XML format or a database format.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method for processing a service, comprising:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining the plug-in information of a target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in a system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged; the plug-in information of the target plug-in installation package comprises an identification of the target plug-in installation package and path information of the target plug-in installation package;
In the running process of the system code, calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package so as to finish the processing of the service to be processed;
the method for calling the target plug-in installation package and executing the target plug-in installation package according to the plug-in information of the target plug-in installation package comprises the following steps: according to the identification of the target plug-in installation package, obtaining a plug-in class instance corresponding to the target plug-in installation package from a spring container, and executing the plug-in class instance;
after the step of obtaining the plug-in class instance corresponding to the target plug-in installation package, the method further includes:
dynamically injecting the obtained plug-in class examples into a spring container through the BeanDefinitionBuilder of the spring container, wherein the spring container is used for managing the plug-in class examples corresponding to different plug-in installation packages;
acquiring a service deletion instruction; the service deleting instruction carries the identifier of the target plug-in installation package;
deleting the target plug-in installation package according to the service deleting instruction, and destroying the plug-in class instance corresponding to the service to be processed.
2. The method according to claim 1, wherein the determining the plug-in information of the target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in the system code includes:
Analyzing the plug-in configuration file to obtain the identifiers of all plug-in installation packages and the path information of all plug-in installation packages in the plug-in configuration file;
and determining the identification matched with the identification of the service to be processed in the identifications of all the plug-in installation packages as the identification of the target plug-in installation package, and acquiring the path information of the target plug-in installation package corresponding to the identification of the target plug-in installation package.
3. The method of any of claims 1-2, wherein the plug-in profile is in any of XML format or database format.
4. The method of claim 1, wherein the identification of the pending service is either a pending service name or a pending service number.
5. The method of claim 1, wherein the identification of the target plug-in installation package is any one of a name of the target plug-in installation package or a number of the target plug-in installation package.
6. The method according to claim 1, wherein deleting the target plug-in installation package according to the service deletion instruction and destroying the plug-in class instance corresponding to the service to be processed includes:
And deleting the target plug-in installation package from a preset plug-in catalog according to the service deletion instruction, and calling a removededefined Bean method of a DefaultLissableBeanFactory factory to destroy plug-in class examples corresponding to the service to be processed in the spring container.
7. A service processing apparatus, comprising:
the first acquisition module is used for acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
the determining module is used for determining the plug-in information of the target plug-in installation package corresponding to the service to be processed according to the identification of the service to be processed and a plug-in configuration file preset in the system code; the plug-in configuration file comprises corresponding relations between the identifiers of different services and plug-in information of different plug-in installation packages; the plug-in installation package and the system code are independently arranged; the plug-in information of the target plug-in installation package comprises an identification of the target plug-in installation package and path information of the target plug-in installation package;
the first processing module comprises a second acquisition unit and a second processing unit;
the first processing module is used for calling the target plug-in installation package according to the plug-in information of the target plug-in installation package and executing the target plug-in installation package in the running process of the system code so as to finish the processing of the service to be processed;
The second obtaining unit is configured to obtain, according to the identifier of the target package, a package instance corresponding to the target package from a spring container, and dynamically inject the obtained package instance into the spring container through a beandefminionbuilder of the spring container, where the spring container is configured to manage package instances corresponding to different package packages;
the second processing unit is used for executing the plug-in class instance;
the second acquisition module is used for acquiring a service deletion instruction; the service deleting instruction carries the identifier of the target plug-in installation package;
and the second processing module is used for deleting the target plug-in installation package according to the service deleting instruction and destroying the plug-in class instance corresponding to the service to be processed.
8. The apparatus of claim 7, wherein the means for determining comprises: the device comprises an analysis unit, a first determination unit and a first acquisition unit;
the analyzing unit is used for analyzing the plug-in configuration file and obtaining the identifiers of all plug-in installation packages and the path information of all plug-in installation packages in the plug-in configuration file;
the first determining unit is configured to determine, as an identifier of the target plug-in installation package, an identifier matched with an identifier of the service to be processed in identifiers of all plug-in installation packages;
The first obtaining unit is configured to obtain path information of a target plug-in installation package corresponding to an identifier of the target plug-in installation package.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
CN201811351895.8A 2018-11-14 2018-11-14 Service processing method, device, equipment and storage medium Active CN111190609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811351895.8A CN111190609B (en) 2018-11-14 2018-11-14 Service processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811351895.8A CN111190609B (en) 2018-11-14 2018-11-14 Service processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111190609A CN111190609A (en) 2020-05-22
CN111190609B true CN111190609B (en) 2024-01-12

Family

ID=70708913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811351895.8A Active CN111190609B (en) 2018-11-14 2018-11-14 Service processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111190609B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778502A (en) * 2020-06-29 2021-12-10 北京沃东天骏信息技术有限公司 Data processing method, device, system and storage medium
CN113596151A (en) * 2021-07-28 2021-11-02 杭州数梦工场科技有限公司 Plug-in management method and device, and data processing method and device
CN113900741B (en) * 2021-12-10 2022-04-08 中航金网(北京)电子商务有限公司 Service processing method and device based on plug-in, computer equipment and medium
CN114528045B (en) * 2022-02-17 2024-05-24 武汉联影智融医疗科技有限公司 Plug-in operation method, device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724307A (en) * 2012-06-14 2012-10-10 哈尔滨工业大学(威海) Information fusion engine and information fusion method for Internet of Things
CN103297381A (en) * 2012-02-22 2013-09-11 阿里巴巴集团控股有限公司 Service access method based on plugin and system thereof
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device
CN105653335A (en) * 2015-12-31 2016-06-08 北京锐安科技有限公司 Plug-in procedure control method and device
CN105786562A (en) * 2016-02-04 2016-07-20 百度在线网络技术(北京)有限公司 Method and device for integrating plug-in
CN106686420A (en) * 2016-12-09 2017-05-17 广州华多网络科技有限公司 Live streaming application program management method and apparatus
CN108170485A (en) * 2016-12-05 2018-06-15 腾讯科技(深圳)有限公司 A kind of plug-in loading method, device and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8407461B2 (en) * 2010-12-17 2013-03-26 Oracle International Corporation Plug-in system for software applications

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297381A (en) * 2012-02-22 2013-09-11 阿里巴巴集团控股有限公司 Service access method based on plugin and system thereof
CN102724307A (en) * 2012-06-14 2012-10-10 哈尔滨工业大学(威海) Information fusion engine and information fusion method for Internet of Things
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device
CN105653335A (en) * 2015-12-31 2016-06-08 北京锐安科技有限公司 Plug-in procedure control method and device
CN105786562A (en) * 2016-02-04 2016-07-20 百度在线网络技术(北京)有限公司 Method and device for integrating plug-in
CN108170485A (en) * 2016-12-05 2018-06-15 腾讯科技(深圳)有限公司 A kind of plug-in loading method, device and mobile terminal
CN106686420A (en) * 2016-12-09 2017-05-17 广州华多网络科技有限公司 Live streaming application program management method and apparatus

Also Published As

Publication number Publication date
CN111190609A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN111190609B (en) Service processing method, device, equipment and storage medium
CN108446116B (en) Application program page generation method and device, computer equipment and storage medium
CN110008118B (en) Page data testing method and device, computer equipment and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN110209652B (en) Data table migration method, device, computer equipment and storage medium
CN109901834B (en) Document page generation method, device, computer equipment and storage medium
CN110008045B (en) Method, device and equipment for aggregating microservices and storage medium
CN109492017B (en) Service information query processing method, system, computer equipment and storage medium
CN105718313A (en) Application operation method and device
CN110704095A (en) Workflow-based configuration processing method and device, computer equipment and storage medium
CN109389299B (en) Workflow process deployment method, workflow process deployment device, computer equipment and storage medium
CN108418797B (en) Webpage access method and device, computer equipment and storage medium
CN113835713B (en) Source code packet downloading method, device, computer equipment and storage medium
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN110888639A (en) Business code compiling and packaging method and device
CN112398809A (en) Protocol rule conversion method, device, computer equipment and storage medium
CN109828830B (en) Method and apparatus for managing containers
CN111885184A (en) Method and device for processing hot spot access keywords in high concurrency scene
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN111901383B (en) Data request processing method, device, computer equipment and storage medium
CN112527416A (en) Task processing method and device, computer equipment and storage medium
CN111447136A (en) Message pushing method and device, computer equipment and storage medium
CN113779122B (en) Method and device for exporting data
CN111124932B (en) Scheme verification method, system, device, computer equipment and storage medium
CN112287265B (en) Asynchronous event driven based file conversion method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant