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

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

Info

Publication number
CN111190609A
CN111190609A CN201811351895.8A CN201811351895A CN111190609A CN 111190609 A CN111190609 A CN 111190609A CN 201811351895 A CN201811351895 A CN 201811351895A CN 111190609 A CN111190609 A CN 111190609A
Authority
CN
China
Prior art keywords
plug
installation package
service
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.)
Granted
Application number
CN201811351895.8A
Other languages
Chinese (zh)
Other versions
CN111190609B (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

Images

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, a service processing device, service processing equipment and a 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 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 preset plug-in configuration file in a system code; the plug-in configuration file comprises corresponding relations between identifications 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 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 science and technology, the business requirements of customers are more and more diversified. For example, in the process of pushing data by a system code, a client a needs to organize the data into a file in an xml format and push the data based on a file transfer Protocol (file transfer Protocol, FTP for short); the client B needs to organize the data into a json-formatted file and push the data based on the HyperText Transfer Protocol (HTTP). Because the technical standards applied by different service requirements are different, in the process of processing the service, corresponding service interfaces need to be developed according to different service requirements.
In the conventional technology, when each pair of new service requirements is met, the system code needs to be modified, and a functional interface for the new service requirements is added in the system code, so that the functional support of the new service is realized.
However, as the number and types of the service demands to be interfaced increase, the flexibility of the conventional service processing method is poor, and the maintenance cost of the system code is high.
Disclosure of Invention
Therefore, it is necessary to provide a service processing method, device, apparatus, and storage medium for solving the problems of poor flexibility of the conventional service processing method and high maintenance cost of system code.
A service 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 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 preset plug-in configuration file in a system code; the plug-in configuration file comprises corresponding relations between identifications 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.
In the service processing method provided in this embodiment, after the computer device obtains the service processing instruction, the computer device determines, according to the identifier of the service to be processed and the preset plug-in configuration file in the system code, plug-in information of the target plug-in installation package corresponding to the service to be processed, and in the running process of the system code, calls the target plug-in installation package according to the plug-in information of the target plug-in installation package and executes the target plug-in installation package, thereby completing processing of the service to be processed. In the service processing process, the computer device 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, the target plug-in installation package of the service to be processed only needs to be stored in a preset plug-in directory in advance, and the plug-in information of the target plug-in installation package is configured in the plug-in configuration file. Therefore, the computer equipment can directly call and execute the target plug-in installation package from the plug-in directory according to the plug-in information of the target plug-in installation package in the plug-in configuration file, the service can be processed without modifying the system code, 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, the decoupling between the system code and the service is realized, 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 comprises an identifier 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 preset plug-in configuration file in a 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 identification 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 identifier matched with 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 acquiring the path information of the target plug-in installation package corresponding to the identifier of the target plug-in installation package.
In the service processing method provided in this embodiment, after the computer device 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 device determines, as the identifier of the target plug-in installation package, the identifier that is the same as the identifier of the service to be processed in the identifiers of all plug-in installation packages, 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 identifier 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, 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 invoking 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 URLClasLoader;
and loading the target plug-in installation package by using the class loader to obtain a plug-in class example of the target plug-in installation package, and executing the plug-in class example.
In the service processing method provided by this embodiment, in the process of calling the target plug-in installation package, the computer device loads the target plug-in installation package by using the class loader corresponding to the target plug-in installation package, so that the accuracy of the target plug-in installation package called by the computer device is higher, and the accuracy of service processing is further improved.
In one embodiment, the invoking 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 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, and executing the plug-in class instance.
In the service processing method provided by this embodiment, because the plug-in class instances corresponding to different service types are managed by the spring container, when the computer device needs to process a service to be processed, the computer device can obtain the plug-in class instance corresponding to the target plug-in installation package from the spring container, which greatly simplifies the service processing process and improves the service processing efficiency.
In one embodiment, the method further comprises the following steps:
acquiring a service deleting instruction; the service deleting instruction carries the identifier of the target plug-in installation package;
and deleting the target plug-in installation package according to the service deletion instruction, and destroying the plug-in instance corresponding to the service to be processed.
In one embodiment, the format of the plug-in configuration file is any one of an XML format or a database format.
According to the service processing method provided by the embodiment, when the service of the client does not need to be docked, the computer device can delete the target plug-in installation package corresponding to the service in time and destroy the plug-in 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 client does not need to be docked any more, 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, the service can be processed, the system code does not need to be modified any more, the flexibility of service processing is improved, and the maintenance cost of the system code is reduced.
An apparatus for processing traffic, 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 preset plug-in configuration file in the system code; the plug-in configuration file comprises corresponding relations between identifications 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 and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining 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 preset plug-in configuration file in a system code; the plug-in configuration file comprises corresponding relations between identifications 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, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining 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 preset plug-in configuration file in a system code; the plug-in configuration file comprises corresponding relations between identifications 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 obtained, the service processing apparatus, the device, and the storage medium provided in this embodiment enable the computer device to determine, according to the identifier of the service to be processed and the plugin configuration file preset in the system code, plugin information of the target plugin installation package corresponding to the service to be processed, and in the system code running process, call the target plugin installation package according to the plugin information of the target plugin installation package and execute the target plugin installation package, thereby completing processing of the service to be processed. In the service processing process, the computer device 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, the target plug-in installation package of the service to be processed only needs to be stored in a preset plug-in directory in advance, and the plug-in information of the target plug-in installation package is configured in the plug-in configuration file. Therefore, the computer equipment can directly call and execute the target plug-in installation package from the plug-in directory according to the plug-in information of the target plug-in installation package in the plug-in configuration file, the service can be processed without modifying the system code, 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, the decoupling between the system code and the service is realized, the flexibility of service processing is improved, and the maintenance cost of the system code is reduced.
Drawings
Fig. 1 is a schematic internal structural diagram of a computer device according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a service processing method according to an embodiment;
fig. 3 is a schematic flow chart of a service processing method according to another embodiment;
fig. 4 is a schematic flow chart of a service processing method according to another embodiment;
fig. 5 is a schematic flow chart of a service processing method according to another embodiment;
fig. 6 is a schematic flow chart of a service processing method according to another embodiment;
fig. 7 is a schematic structural diagram of a service processing apparatus according to an embodiment;
fig. 8 is a schematic structural diagram of a service processing apparatus according to another embodiment;
fig. 9 is a schematic structural diagram of a service processing apparatus according to another embodiment;
fig. 10 is a schematic structural diagram of a service processing apparatus according to another embodiment;
fig. 11 is a schematic structural diagram of a service processing apparatus according to another embodiment.
Detailed Description
The service processing method provided by the embodiment of the application can be applied to the computer device shown in fig. 1. The computer device comprises a processor and a memory connected by a system bus, wherein a computer program is stored in the memory, and the steps of the method embodiments described below can be executed when the processor executes the computer program. Optionally, the computer device may further comprise a network interface, a display screen and an input device. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a nonvolatile storage medium storing an operating system and a computer program, and an internal memory. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. Optionally, the computer device may be an electronic device that has an image data processing function and can interact with an external device or a user, such as a personal computer pc (personal computer), a mobile terminal, and a portable device, and the specific form of the computer device is not limited in this embodiment.
At present, the business requirements of customers are more and more diversified, and when a new business requirement needs to be docked, the traditional technology needs to modify system codes, so that the docking of the new business requirement is completed. However, as the number and types of the service demands to be interfaced increase, the flexibility of the conventional service processing method is poor, and the maintenance cost of the system code is high. Therefore, the service processing method, device, apparatus and storage medium provided in the embodiments of the present application aim to solve the technical problems in the conventional technologies.
It should be noted that, in the service processing method provided in the embodiment of the present application, the execution main body may be a service processing apparatus, and the apparatus may be implemented as part or all of a computer device by software, hardware, or a combination of software and hardware. The execution subjects of the method embodiments described below are described taking a computer device as an example.
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application are further described in detail by the following embodiments in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not limiting of the application.
Fig. 2 is a schematic flow chart of a service processing method according to an embodiment. The embodiment relates to a specific process of 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 identifier of a service to be processed.
Specifically, each service has a corresponding identifier for different services of the client. When a new service needs to be docked, the docked new service is a service to be processed, and the identifier 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 device obtains the service processing instruction. Optionally, the service processing instruction may be sent to the computer device by an external device, or may be input into the computer device by a 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 also be a number of the service to be processed, and a specific form of the identifier of the service to be processed is not limited in this embodiment, as long as different services can be distinguished.
S102, determining 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 preset plug-in configuration file in a system code.
Specifically, the plug-in installation package is used for processing services of a client, and different types of services correspond to different plug-in installation packages. When the system needs to interface a new service, research and development personnel need to develop a plug-in installation package corresponding to the new service according to the processing process of the new service. After the development of the plug-in installation package of the new service is completed, research and development personnel store the plug-in installation package of the new service in a preset plug-in directory and configure 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. Therefore, the corresponding relation between the identifications of different services and the plug-in information of different plug-in installation packages is stored in the plug-in configuration file. The plug-in installation package of the new service and the system code are independently set. Optionally, the format of the plug-in configuration file is any one of an XML format and a database format, and the plug-in configuration file may be selected accordingly according to actual requirements.
After the plugin installation package corresponding to the new service is stored in the preset plugin directory and the plugin information of the plugin installation package corresponding to the service is configured in the plugin configuration file, when the new service needs to be processed, the new service is the service to be processed in S101, and the plugin installation package corresponding to the new service is the target plugin installation package. Because the target plug-in installation package is stored in the plug-in directory 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 device acquires the service processing instruction, the computer device 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 identifier 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 plug-in installation package may be a name of the target plug-in installation package, or may also be a number of the target plug-in installation 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 directory for storing the target plug-in installation package.
S103, 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.
Specifically, the target plug-in installation package is pre-stored in the plug-in directory, and the computer device determines the plug-in information of the target plug-in installation package corresponding to the service to be processed, so that the computer device can acquire the storage path of the target plug-in installation package and the identifier 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 directory (namely the storage path of the target plug-in installation package) and is executed, so that the processing of the service to be processed is completed.
In the service processing method provided in this embodiment, after the computer device obtains the service processing instruction, the computer device determines, according to the identifier of the service to be processed and the preset plug-in configuration file in the system code, plug-in information of the target plug-in installation package corresponding to the service to be processed, and in the running process of the system code, calls the target plug-in installation package according to the plug-in information of the target plug-in installation package and executes the target plug-in installation package, thereby completing processing of the service to be processed. In the service processing process, the computer device 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, the target plug-in installation package of the service to be processed only needs to be stored in a preset plug-in directory in advance, and the plug-in information of the target plug-in installation package is configured in the plug-in configuration file. Therefore, the computer equipment can directly call and execute the target plug-in installation package from the plug-in directory according to the plug-in information of the target plug-in installation package in the plug-in configuration file, the service can be processed without modifying the system code, 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, the decoupling between the system code and the service is realized, the flexibility of service processing is improved, and the maintenance cost of the system code is reduced.
Fig. 3 is a schematic flow chart of a service processing method according to another embodiment. The embodiment relates to a specific process of how computer equipment determines plug-in information of a target plug-in installation package corresponding to a service to be processed. On the basis of the above embodiment, as shown in fig. 3, the above S102 may include:
s201, analyzing the plug-in configuration file to obtain the identification of all plug-in installation packages in the plug-in configuration file and the path information of all plug-in installation packages.
S202, determining the identifier matched with 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 acquiring the path information of the target plug-in installation package corresponding to the identifier of the target plug-in installation package.
Optionally, the identifier matching with 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 identifier, which is the same as the identifier of the service to be processed, in the identifiers of all the plug-in installation packages may be determined as the identifier of the target plug-in installation package, and the path information of the corresponding target plug-in installation package is obtained from the plug-in configuration file according to the identifier of the target plug-in installation package.
In the service processing method provided in this embodiment, after the computer device 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 device determines, as the identifier of the target plug-in installation package, the identifier that is the same as the identifier of the service to be processed in the identifiers of all plug-in installation packages, 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 identifier 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, 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 schematic flowchart of a service processing method provided in another embodiment, and fig. 5 is a schematic flowchart of a service processing method provided in another embodiment. The embodiment relates to a specific process of calling a target plug-in installation package and executing the target plug-in installation package by a computer device. On the basis of the foregoing embodiment, as an alternative implementation manner, as shown in fig. 4, the foregoing S103 may include:
s301, converting the format of the plug-in information of the target plug-in installation package to obtain converted plug-in information.
Specifically, in order to be suitable for 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 the 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 URLClasLoader.
Specifically, the computer device inputs the plug-in information of the converted target plug-in installation package into the URLClassLoader, and the URLClassLoader may output the 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.
In the service processing method provided by this embodiment, in the process of calling the target plug-in installation package, the computer device loads the target plug-in installation package by using the class loader corresponding to the target plug-in installation package, so that the accuracy of the target plug-in installation package called by the computer device is higher, and the accuracy of service processing is further improved.
Fig. 5 below illustrates another alternative implementation process of invoking the target plug-in installation package and executing the target plug-in installation package for 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 different plugin class implementations corresponding to plugin installation packages in advance. In practical application, after obtaining the plug-in class instance of the plug-in installation package, the computer device dynamically injects the obtained plug-in class instance into the spring container through the beans definition builder of the spring container, so as to manage the plug-in class instances corresponding to different plug-in installation packages through the spring container. When the computer equipment needs to perform service processing, the computer equipment can analyze the plugin configuration file according to the identification of the service to be processed, so that the identification of the target plugin installation package corresponding to the service to be processed is determined, and then the plugin instance corresponding to the target plugin installation package is obtained from the spring container.
S402, executing the plug-in class instance.
In the service processing method provided by this embodiment, because the plug-in class instances corresponding to different service types are managed by the spring container, when the computer device needs to process a service to be processed, the computer device can obtain the plug-in class instance corresponding to the target plug-in installation package from the spring container, which greatly simplifies the service processing process and improves the service processing efficiency.
In practical applications, when no business cooperation with the client is performed, that is, no business interfacing with the client is required, for this case, the computer device processes the business of the client through the following process as shown in fig. 6. On the basis of the foregoing embodiment, optionally, after the foregoing S103, the method further includes:
s501, acquiring a service deleting instruction; and the service deleting instruction carries the identifier of the target plug-in installation package.
Specifically, when the service of the client no longer needs to be docked, the service is the service to be processed, and research and development personnel can carry the identifier of the target installation package corresponding to the service to be processed in the service deletion instruction, and input the service deletion instruction into the computer device to instruct the computer device 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 deletion instruction, and destroying the plug-in 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 directory, and invokes a RemoveDefinitionBean method of the DefaultListableBeanFactory 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 be 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 the client does not need to be docked, the computer device can delete the target plug-in installation package corresponding to the service in time and destroy the plug-in 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 client does not need to be docked any more, 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, the service can be processed, the system code does not need to be modified any more, the flexibility of service processing is improved, and the maintenance cost of the system code is reduced.
It should be understood that although the various steps in the flow charts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Fig. 7 is a schematic structural diagram of a service processing apparatus according to an embodiment. As shown in fig. 7, the apparatus may include: a first obtaining module 10, a determining 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 preset plug-in configuration file 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 identifications 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 first processing module 12 is configured to, in a system code running process, 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, so as to complete 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 apparatus provided in this embodiment may execute the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of a service processing apparatus according to another embodiment. On the basis of the embodiment shown in fig. 7, optionally, as shown in fig. 8, the determining module 11 may include: a parsing unit 111, a first determining unit 112 and a first obtaining 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 in the plug-in configuration file and path information of all plug-in installation packages;
a first determining unit 112, configured to determine, as the identifier of the target plug-in installation package, an identifier that is matched with the identifier of the service to be processed, from among the identifiers of all the plug-in installation packages;
a first obtaining unit 113, configured to obtain path information of the target plug-in installation package corresponding to the identifier of the target plug-in installation package.
The service processing apparatus provided in this embodiment may execute the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of a service processing apparatus according to another embodiment. On the basis of the foregoing 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 conversion unit 121 is configured to perform format conversion on the plug-in information of the target plug-in installation package to obtain converted plug-in information;
a second determining unit 122, configured to determine a class loader of the target plug-in installation package according to the converted plug-in information and URLClassLoader;
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 apparatus provided in this embodiment may execute the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 10 is a schematic structural diagram of a service processing apparatus according to another embodiment. On the basis of the foregoing 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, according to the identifier of the target plugin installation package, a plugin class instance corresponding to the target plugin installation package from a spring container;
a second processing unit 125 for executing the plug-in class instance.
The service processing apparatus provided in this embodiment may execute the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 11 is a schematic structural diagram of a service processing apparatus according to another embodiment. On the basis of the embodiment shown in fig. 9, optionally, as shown in fig. 11, 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 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.
The service processing apparatus provided in this embodiment may execute the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
For specific limitations of the service processing apparatus, reference may be made to the above limitations on the service processing method, which is not described herein again. The respective modules in the processing device of the above-mentioned service can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 1 is a schematic internal structural diagram of a computer device according to an embodiment. As shown in fig. 1, the computer apparatus includes a processor, a memory, a network interface, a display screen, and an input device, which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement 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, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those 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 a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a service processing instruction; the service processing instruction comprises an identifier of a service to be processed;
determining 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 preset plug-in configuration file in a system code; the plug-in configuration file comprises corresponding relations between identifications 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 identification 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 identifier matched with 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 acquiring the path information of the target plug-in installation package corresponding to the identifier 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 URLClasLoader; and loading the target plug-in installation package by using the class loader to obtain a plug-in class example of the target plug-in installation package, and executing the plug-in class example.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and 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, 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 deleting instruction; the service deleting instruction carries the identifier of the target plug-in installation package; and deleting the target plug-in installation package according to the service deletion instruction, and destroying the plug-in 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 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 preset plug-in configuration file in a system code; the plug-in configuration file comprises corresponding relations between identifications 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 identification 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 identifier matched with 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 acquiring the path information of the target plug-in installation package corresponding to the identifier 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 URLClasLoader; and loading the target plug-in installation package by using the class loader to obtain a plug-in class example of the target plug-in installation package, and executing the plug-in class example.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and 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, 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 deleting instruction; the service deleting instruction carries the identifier of the target plug-in installation package; and deleting the target plug-in installation package according to the service deletion instruction, and destroying the plug-in 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.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile 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), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

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 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 preset plug-in configuration file in a system code; the plug-in configuration file comprises corresponding relations between identifications 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.
2. The method of claim 1, wherein 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.
3. The method according to claim 2, wherein the determining, according to the identifier of the service to be processed and a preset plug-in configuration file in a 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 identification 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 identifier matched with 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 acquiring the path information of the target plug-in installation package corresponding to the identifier of the target plug-in installation package.
4. The method according to claim 1, wherein the invoking 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 comprises:
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 URLClasLoader;
and loading the target plug-in installation package by using the class loader to obtain a plug-in class example of the target plug-in installation package, and executing the plug-in class example.
5. The method according to claim 3, wherein the invoking 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 comprises:
and 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, and executing the plug-in class instance.
6. The method according to any one of claims 1-5, further comprising:
acquiring a service deleting instruction; the service deleting instruction carries the identifier of the target plug-in installation package;
and deleting the target plug-in installation package according to the service deletion instruction, and destroying the plug-in instance corresponding to the service to be processed.
7. The method of any of claims 1-5, wherein the plug-in configuration file is in any of an XML format or a database format.
8. An apparatus for processing traffic, 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 preset plug-in configuration file in the system code; the plug-in configuration file comprises corresponding relations between identifications 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.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
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 true CN111190609A (en) 2020-05-22
CN111190609B 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)

Cited By (4)

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

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120159145A1 (en) * 2010-12-17 2012-06-21 Oracle International Corporation Plug-in system for software applications
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120159145A1 (en) * 2010-12-17 2012-06-21 Oracle International Corporation Plug-in system for software applications
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

Cited By (5)

* 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
CN113900741A (en) * 2021-12-10 2022-01-07 中航金网(北京)电子商务有限公司 Service processing method and device based on plug-in, computer equipment and medium
CN114528045A (en) * 2022-02-17 2022-05-24 武汉联影智融医疗科技有限公司 Plug-in operation method and device, computer equipment and storage medium
CN114528045B (en) * 2022-02-17 2024-05-24 武汉联影智融医疗科技有限公司 Plug-in operation method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111190609B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
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
CN111190609A (en) Service processing method, device, equipment and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN109672580B (en) Full link monitoring method, device, terminal equipment and storage medium
CN105718313A (en) Application operation method and device
CN109039751B (en) Method, device, computer equipment and storage medium for configuring route
CN111008132B (en) Application debugging method and device for Android system, computer equipment and storage medium
CN110704177B (en) Computing task processing method and device, computer equipment and storage medium
CN110689232A (en) Workflow configuration optimization processing method and device and computer equipment
CN110943934A (en) Service request processing method, system, terminal and readable storage medium
CN110213392B (en) Data distribution method and device, computer equipment and storage medium
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN109257426B (en) Service line resource loading method and device, computer equipment and storage medium
CN111459541A (en) Application program packaging method and device, computer equipment and storage medium
CN112019609A (en) Equipment monitoring method, device, equipment and computer medium based on Internet of things
CN108667919B (en) Data processing method, data processing device, computer equipment and storage medium
CN109828830B (en) Method and apparatus for managing containers
CN112232902B (en) Order data processing method, device and system, computer equipment and storage medium
CN111901383A (en) Data request processing method and device, computer equipment and storage medium
CN111381786B (en) Text printing method and device, computer equipment and storage medium
CN111124932B (en) Scheme verification method, system, device, computer equipment and storage medium
CN109474762B (en) Processing method and device for door-to-door service task, computer equipment and storage medium
CN112416785A (en) Word cutting tool version difference testing method, device, equipment and storage medium
CN113132961B (en) Internet of things complete machine equipment debugging method and device, computer equipment and storage medium

Legal Events

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