CN112559095A - Target service execution method, system, server and storage medium - Google Patents

Target service execution method, system, server and storage medium Download PDF

Info

Publication number
CN112559095A
CN112559095A CN202011486762.9A CN202011486762A CN112559095A CN 112559095 A CN112559095 A CN 112559095A CN 202011486762 A CN202011486762 A CN 202011486762A CN 112559095 A CN112559095 A CN 112559095A
Authority
CN
China
Prior art keywords
target
service
extension
processed
implementation class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011486762.9A
Other languages
Chinese (zh)
Inventor
高居标
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weiyiyun Hangzhou Holding Co ltd
Original Assignee
Weiyiyun Hangzhou Holding 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 Weiyiyun Hangzhou Holding Co ltd filed Critical Weiyiyun Hangzhou Holding Co ltd
Priority to CN202011486762.9A priority Critical patent/CN112559095A/en
Publication of CN112559095A publication Critical patent/CN112559095A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method, a system, a server and a storage medium for executing a target service, wherein the method comprises the following steps: acquiring a target service identifier carried in a received service request; searching a target expansion object corresponding to the target service identification from a mapping relation table of an expansion point storage library based on the target service identification; and calling a target extension implementation class from a configuration center based on the target extension object, and executing the service request based on the target extension implementation class. Through the technical scheme of the embodiment of the invention, the goal extension realizing class for executing the goal service identification is quickly determined according to the goal service identification, thereby improving the technical effect of the service request executing efficiency.

Description

Target service execution method, system, server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a system, a server and a storage medium for executing a target service.
Background
In the market, most of the systems are implemented by using an SPI (Service Provider Interface) mechanism provided by JDK (Java Development Kit, Java language software Development Kit) aiming at system extensibility.
However, the JDK SPI has strict limitation on the format written by the code, and a large amount of META-NF/interface fully-limited file names must be written to realize the calling of the interface. Further, the JDK SPI must be implemented by a corresponding Interface, for example, only by using an API (Application Programming Interface), so that the JDK SPI is cumbersome to use.
Based on the above problems, JDK SPI is mainly located in a bottom-layer abstraction technology, and therefore cannot be used according to specific service determination in a use process, and meanwhile, a code needs to be encapsulated, which results in a technical problem of difficult code maintenance.
Disclosure of Invention
The invention provides a method, a system, a server and a storage medium for executing a target service, which are used for quickly determining a target expansion implementation class for executing a target service identifier according to the target service identifier, thereby improving the technical effect of service request execution efficiency.
In a first aspect, an embodiment of the present invention provides a method for executing a target service, where the method includes:
acquiring a target service identifier carried in a received service request;
searching a target expansion object corresponding to the target service identification from a mapping relation table of an expansion point storage library based on the target service identification; the extension point storage library comprises a mapping relation table of service identification and extension objects;
and calling a target extension implementation class from a configuration center based on the target extension object, and executing the service request based on the target extension implementation class.
In a second aspect, an embodiment of the present invention further provides a system for executing a target service, where the system includes: a service scene layer, an extended scanning layer and a service execution layer; wherein the content of the first and second substances,
the service scene layer is used for acquiring a target service identifier carried in the received service request;
the extended scanning layer is used for searching a target extended object corresponding to the target service identifier from a mapping relation table of an extended point storage library based on the target service identifier; the extension point storage library comprises a mapping relation table of service identification and extension objects;
and the service execution layer is used for calling the target extension object from a configuration center to a target extension implementation class and executing the service request based on the target extension implementation class.
In a third aspect, an embodiment of the present invention further provides a server, where the server includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for executing the target service according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the method for executing the target service according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, the target service identifier carried in the received service request is obtained, the target extension object corresponding to the target service identifier is searched from the mapping relation table of the extension point repository based on the target service identifier, and the target extension implementation class is called from the configuration center based on the target extension object so as to execute the service request, so that the problems that the function quick iteration can be realized only by writing a large number of interface codes and the code maintenance is difficult and the coupling is strong due to a large number of packages in the codes are solved, and the technical effect of quickly determining the target extension implementation class for executing the target service identifier according to the target service identifier is realized, so that the execution efficiency of the service request is improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flow chart illustrating a method for executing a target service according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an execution system of a target service according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of another system for executing a target service according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flowchart of an execution method of a target service according to an embodiment of the present invention, where the embodiment is applicable to a case where corresponding annotations are added to objects of each service scene, and when a request is received, an extended implementation class corresponding to the annotation is determined based on the added annotations, and the method may be executed by an execution system of the target service, and the system may be implemented in a form of software and/or hardware.
Before describing the present embodiment, an application scenario will be described. If the application scenario is to use a hospital, the system of the hospital in each area can be accessed to the system provided by the embodiment. For example, the system corresponding to the hospital in each area needs to be accessed to the doctor workstation system, and at this time, there may be implementation rules of the same service by the medical systems in different areas, and there may be different requirements. When the requirements are different, corresponding rules need to be configured to the requirements. For example, each hospital system may provide a corresponding invoice subsystem, and the invoice subsystems of different hospitals have different corresponding rules, and at this time, the corresponding rules may be configured for the invoice subsystems of each system based on the doctor workstation system. To support business interfacing with various systems, there is a greater demand for scalability of the physician workstation system.
As shown in fig. 1, the method of this embodiment specifically includes the following steps:
s110, acquiring a target service identifier carried in the received service request.
The service request is a request for data acquisition or transmission of a certain service. The target service identity is an identity corresponding to the service request. The service request may carry a corresponding target service identifier, and the service identifier is uniquely corresponding to the service request. The target extension object can be determined according to the target service identifier, and then the target extension implementation class is determined. The extension object may be an extension implementation identity corresponding to the service identity. The extension implementation class may be determined from the extension implementation identification. The extended implementation class may be an execution rule for executing a specific service request, or related program code, etc.
Specifically, when a service request is received, a target service identifier carried in the service request and corresponding to the service request may be obtained.
In the actual application process, one request needs to pass through interfaces of a plurality of systems, so that the service identifier corresponding to each service request can be stored in the full link in order to facilitate the subsequent search of the service scene corresponding to the corresponding identifier, and the service identifier corresponding to each service request can be sequentially transmitted, so that each interface in the full link can rapidly acquire the relevant identifier. Optionally, after obtaining the target service identifier carried in the received service request, the target service identifier is stored in the request link of the local thread variable, so as to read the target service identifier from the request link.
And the local thread variable is a storage space for temporarily storing the target service identifier. The request link may be a node in the request link that stores the service request after receiving the service request.
Specifically, after receiving the service request, the service request may be stored in the request link of the local thread variable while determining the target extension implementation class corresponding to the service request, so that the interface of each system that processes the service request determines the corresponding service identifier according to the service request stored in the request link of the local thread variable.
In practical application, in order to avoid the problem that the efficiency of extracting the target service identifier is low due to too many target service identifiers stored in the request link of the local thread variable, the target service identifiers stored in the request link of the local thread variable may be cleared within a preset time, for example: and clearing the target service identifier in the local thread variable every other day so as to store the service identifiers corresponding to other service requests.
In this embodiment, in order to determine the target extension object according to the target service identifier and further determine the target extension implementation class, an association relationship between the service identifier and the extension object and the extension implementation class may be created in advance. Has the advantages that: when a new business object is detected, the association relationship may be created for the new business object. The specific implementation of creating the above correspondence relationship may be seen in the following steps:
step one, when the creation of the to-be-processed business object is detected, a to-be-processed business identifier corresponding to the to-be-processed business object is constructed, and a pre-written class marking function is called.
The service objects correspond to services in different scenes, and for example, when the regions to which the same service belongs are different, the service objects are different. The business objects can be divided based on regions, realizing functions or according to other categories, for example, the business objects are divided according to regions, each region can be used as a business object, and optionally, a Beijing hospital system and an Tianjin hospital system are respectively used as two business objects accessed to a doctor workstation system; it may also be divided according to different application scenarios, for example: tax-related services, enterprise management-related services and the like are respectively used as a service object, and optionally, invoice services and tax services in Beijing and Tianjin hospital systems are respectively used as service objects accessed to a doctor workstation. The business object to be processed is a business object newly added in each accessed system, or a hospital system accessed to the doctor workstation for the first time, the hospital system can be used as the business object, the business object to be processed is stored so as to be convenient for subsequently constructing the implementation class, and the corresponding implementation class is called after the business request is received. Class annotation functions may be understood as functions that annotate classes to which a business object belongs, e.g., classes marked with the @ ExtensionPoint annotation are scanned by the getAnntotation method of Class. Based on the annotation class, how many corresponding business scenes the business object corresponds to can be determined. And taking the specific content obtained after the annotation is added as an implementation class.
Specifically, when it is detected that the to-be-processed service object is created, a to-be-processed task identifier uniquely corresponding to the to-be-processed service object may be constructed for the to-be-processed service object. And calling a pre-written class marking function to carry out annotation marking on the business object to be processed.
And secondly, performing annotation marking on the business object to be processed based on the class marking function to obtain the extended implementation class to be stored corresponding to the business object to be processed.
Wherein, the extended implementation class to be stored is the implementation class to be stored. The implementation class is the annotation mark of the to-be-processed business object and the to-be-processed business object obtained after the annotation mark is carried out on the to-be-processed business object based on the class marking function, and the annotation mark can be @ ExtensionPoint. Meanwhile, the implementation class may be used for executing an execution rule of a specific service request, or related program code, and the like.
Specifically, annotation marking can be performed on the to-be-processed business object by calling a pre-written class marking function, the to-be-processed business object and the annotation mark of the to-be-processed business object are used as to-be-stored extension implementation classes, the to-be-processed business object can be determined through the annotation mark subsequently, and then the to-be-stored extension implementation classes are called.
And step three, establishing a mapping relation between the service identification to be processed and the service object to be processed, and storing the mapping relation into an extension point storage library.
The extension point repository is used for storing a mapping relation table of the service identification and the extension object. The service identifier to be processed may be used as the service identifier, the service object to be processed may be used as the extension object, and the mapping relationship may be stored in the extension point repository, where the mapping relationship is implemented based on the first step.
Specifically, the unique corresponding relationship exists between the service object to be processed and the service identifier to be processed, and then the mapping relationship between the service identifier to be processed and the service object to be processed can be established. In order to facilitate the search and the call of the business object to be processed, the mapping relationship may be stored in a mapping relationship table of the business identifier and the extension object in the extension point repository.
And step four, storing the to-be-stored extended implementation class corresponding to the to-be-processed business object to a configuration center.
The configuration center is a storage space for storing an extension implementation class, and the extension implementation class and a service object to be processed, namely an extension object, have a corresponding relationship. Extension objects can be used to distinguish between different extension implementation classes.
Specifically, the to-be-stored extended implementation class corresponding to the to-be-processed service object is stored in the configuration center, and at this time, the to-be-stored extended implementation class is used as the extended implementation class. Furthermore, the corresponding extension implementation class can be determined in the configuration center according to the service object to be processed, i.e. the extension object.
S120, searching a target expansion object corresponding to the target service identification from the mapping relation table of the expansion point storage base based on the target service identification.
Wherein the target service identifier is an identifier corresponding to the service request. The mapping relation table comprises the mapping relation between the service identifier and the extension object, and the mapping relation table is stored in the extension point storage library. The target extension object may be an extension implementation identifier corresponding to the target service identifier. The extension implementation identification may be used to determine an extension implementation class. The extended implementation class may be an execution rule for executing a specific service request, or related program code, etc.
Specifically, after the target service identifier is obtained, the mapping relationship table of the extension point repository may be searched according to the target service identifier, and when the target service identifier is found, the target extension object corresponding to the target service identifier is determined.
Optionally, the service identifier and the extended object may be stored in the mapping relationship table according to a key-value pair manner.
The Key Value pair mode is a mode of storing according to the corresponding relation between the service identifier and the extended object, namely a Key-Value storage mode. In this embodiment, the service identifier may be used as a key, the extension object may be used as a value to be stored, and the established key value pair may be stored in the mapping relationship table.
Optionally, the scene identifier may be collected by providing a uniform configuration prefix goku, and the scene identifier and the extension identifier form a plurality of KV data, which are stored in the extension point repository. The scene identifier may be a service identifier, the extension identifier may be an extension object, and the KV data may be understood as a mapping relationship between the scene identifier and the extension identifier.
Illustratively, the mapping relationship table of the extension point repository stores a service identifier a-extension object a ', a service identifier B-extension object B ', and a service identifier C-extension object C '. If the target service identifier is a, an extended object a 'associated with the service identifier a may be determined in the mapping relationship table, and a' may be used as the target extended object, so as to further determine the target extended implementation class based on the target extended object.
S130, the target extension implementation class is called from the configuration center based on the target extension object, and the service request is executed based on the target extension implementation class.
The target extension implementation class may include an execution rule for executing a service request, or a related program code, and may be composed of a target extension object and an annotation tag corresponding to the target extension object.
Specifically, the target extension object may be determined from the extension point repository, and then the extension implementation class corresponding to the target extension object may be found in the configuration center according to the target extension object. For example, the target extension implementation class is determined based on a correspondence between the extension object and the extension implementation class. And the service request can be executed according to the target extension implementation class, and the operations of data transmission or acquisition and the like are completed.
In this embodiment, the determining the target extension implementation class may be determining the target extension implementation class by using an extension point finder, and specifically may be:
calling an extension point finder to find a target extension implementation class corresponding to a target extension object from a configuration center; and executing the target service request based on the target extension implementation class to obtain a service execution result corresponding to the service request.
The extension point finder is a function or a module for determining an extension implementation class according to an extension object, and may also be a code set for implementing the above function. The service execution result may be a result required by the service request, or may be a result output after the target extension implementation class is executed.
Specifically, the extension point finder is invoked, for example: an Extension Point Selector may determine a target Extension implementation class corresponding to the target Extension object from the configuration center, and may execute a service logic in the target Extension implementation class according to the target Extension implementation class to execute the target service request. Further, a result obtained after the execution of the target request may be used as a service execution result. And the service execution result can be fed back to the terminal equipment corresponding to the target service request to complete the target service request.
According to the technical scheme of the embodiment, the target service identification carried in the received service request is obtained, the target extension object corresponding to the target service identification is searched from the mapping relation table of the extension point repository based on the target service identification, and the target extension implementation class is called from the configuration center based on the target extension object so as to execute the service request, so that the problems that function quick iteration can be realized only by writing a large number of interface codes and code maintenance is difficult and coupling is strong due to the fact that a large number of packages are carried out in the codes are solved, the target extension implementation class for executing the target service identification is determined quickly according to the target service identification, and the technical effect of improving the execution efficiency of the service request is achieved.
Example two
Fig. 2 is a schematic structural diagram of an execution system of a target service according to a second embodiment of the present invention, where the system includes: a service scenario layer 210, an extended scanning layer 220 and a service execution layer 230.
The service scene layer 210 is configured to obtain a target service identifier carried in a received service request; the extended scanning layer 220 is configured to search a target extended object corresponding to the target service identifier from a mapping relation table of an extended point repository based on the target service identifier; the extension point storage library comprises a mapping relation table of the service identification and the extension object; and the service execution layer 230 is used for calling the target extension implementation class from the configuration center by the target extension object and executing the service request based on the target extension implementation class.
Optionally, the system for executing the target service further includes:
and the target service identifier storage module is used for storing the target service identifier to the request link of the local thread variable so as to read the target service identifier from the request link.
Optionally, the service execution layer 210 is further configured to invoke an extension point finder to find a target extension implementation class corresponding to the target extension object from the configuration center; and executing the target service request based on the target extension implementation class to obtain a service execution result corresponding to the service request.
Optionally, the extended scanning layer 220 is further configured to, when it is detected that a to-be-processed service object is created, construct a to-be-processed service identifier corresponding to the to-be-processed service object, and call a pre-written class tagging function; and performing annotation marking on the business object to be processed based on the class marking function to obtain the extended implementation class to be stored corresponding to the business object to be processed.
Optionally, the expansion scanning layer 220 is further configured to establish a mapping relationship between a service identifier to be processed and the service object to be processed, and store the mapping relationship in the expansion point repository; and storing the to-be-stored extension implementation class corresponding to the to-be-processed business object to the configuration center.
Optionally, the system for executing the target service further includes:
and the configuration layer is used for storing the service identification to be processed and the service object to be processed into the mapping relation table in a key value pair mode, and storing the extended implementation class to be stored corresponding to the service object to be processed into the configuration center.
Specifically, the to-be-processed service identifier may be used as a key, the to-be-processed service object may be used as a value, a key-value pair may be established according to a correspondence between the to-be-processed service identifier and the to-be-processed service object, and the established key-value pair may be stored in the mapping relationship table. And further, storing the to-be-stored extended implementation class corresponding to the to-be-processed business object to a configuration center.
According to the technical scheme of the embodiment, the target service identification carried in the received service request is obtained, the target extension object corresponding to the target service identification is searched from the mapping relation table of the extension point repository based on the target service identification, and the target extension implementation class is called from the configuration center based on the target extension object so as to execute the service request, so that the problems that function quick iteration can be realized only by writing a large number of interface codes and code maintenance is difficult and coupling is strong due to the fact that a large number of packages are carried out in the codes are solved, the target extension implementation class for executing the target service identification is determined quickly according to the target service identification, and the technical effect of improving the execution efficiency of the service request is achieved.
The system for executing the target service provided by the embodiment of the invention can execute the method for executing the target service provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the system are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE III
On the basis of the second embodiment, the system for executing the provided target service in the present embodiment can be continuously understood with reference to fig. 3, and the system includes: a business scene layer, a scanning layer and a storage layer.
The service scene layer is mainly used for dynamically analyzing request parameters during system operation through compiling a scene section, constructing a standard scene identifier, namely a service identifier, aiming at a scene, and placing the scene identifier in a local thread variable in a request link, so that each interface in the link can simply and conveniently acquire the scene identifier. In addition, the service scene layer further includes an extension mark, that is, an extension object, which can be used to determine an extension implementation class in the scanning layer; the business scenario layer may further include a scenario annotation class, and the scenario annotation class may be used for annotating the extension tag.
In the scanning layer, a scene section, a scene and extension mapping configuration and an extension implementation class are included. In the scan layer, a post processor of Spring Bean and getAnntotation in the Class can be used to screen out the system-defined extension implementation Class. The method for determining the extension implementation class comprises the following steps: the scene annotation class, namely the class of the @ ExtensionPoint annotation, is marked as the implementation class of the extension point. And the scanning layer also comprises a mapping relation between the scene identification and the extension mark.
Illustratively, by writing a custom Bean post processor, a postprocessafiterinitialization function call is triggered when each Bean is created, and then a Class marked with an @ ExtensionPoint annotation is scanned by a getAnntotation method of a Class, that is, an extension implementation Class.
And the warehouse layer correspondingly stores the scene identification and the extension implementation class into a local cache by combining the list of the extension implementation classes screened by the scanning layer and the mapping metadata in the configuration layer. In addition, a high-level API (Application Programming Interface) Extension Selector Extension Point Selector is provided for easy use by upper-level services. The technical scheme can avoid the invasion of the implementation details of the framework to the service code and can improve the packaging flexibility of the framework.
Between the service scene layer and the scanning layer, a configuration layer can be further arranged. The configuration layer is configured to collect a scene identifier customized by the system and a Key-value (KV) list of an extension implementation identifier in a spring configuration form, and provide original data for the extended scanning layer of the lower layer.
For example, the mapping relationship between the scene identifier and the extension tag can be collected by providing a uniform configuration prefix goku, and the scene identifier and the extension tag form individual KV data and are stored in the extension point warehouse.
According to the technical scheme of the implementation, an extension implementation class is determined by using an extension point finder ExtensionPointSelector according to a scene identifier transmitted by each request during system operation, and corresponding service logic is executed to process a service request. The Principle of the technical scheme is that dynamic addition of new functions can be realized on the basis of not damaging the existing software structure by following the Convention Over Configuration (COC) and the Open Closed Priority (OCP).
According to the technical scheme, the API is provided for the upper-layer service through the service scene layer, the scanning layer and the warehouse layer, the API comprises the annotation and the SDK, the upper-layer service completes code iteration by calling the simple API, the problems that function quick iteration can be realized only by writing a large number of interface codes and code maintenance is difficult and coupling is strong due to the fact that a large number of packages are carried out in the codes are solved, the purpose extension realization class for executing the target service identification is determined quickly according to the target service identification, and therefore the technical effect of improving the service request execution efficiency is achieved.
Example four
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary server 40 suitable for use in implementing embodiments of the present invention. The server 40 shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in fig. 4, the server 40 is in the form of a general purpose computing device. The components of server 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The server 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by server 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The server 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The server 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the server 40, and/or with any devices (e.g., network card, modem, etc.) that enable the server 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, server 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 412. As shown, the network adapter 412 communicates with the other modules of the server 40 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with the server 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing, for example, an execution method of implementing a target service provided by an embodiment of the present invention, by executing a program stored in the system memory 402.
EXAMPLE five
The fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which are used for executing an execution method of a target service when executed by a computer processor.
The method comprises the following steps:
acquiring a target service identifier carried in a received service request;
searching a target expansion object corresponding to the target service identifier from a mapping relation table of an expansion point storage library based on the target service identifier; the extension point storage library comprises a mapping relation table of the service identification and the extension object;
and calling a target extension implementation class from the configuration center based on the target extension object, and executing the service request based on the target extension implementation class.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for executing a target service, comprising:
acquiring a target service identifier carried in a received service request;
searching a target expansion object corresponding to the target service identification from a mapping relation table of an expansion point storage library based on the target service identification; the extension point storage library comprises a mapping relation table of service identification and extension objects;
and calling a target extension implementation class from a configuration center based on the target extension object, and executing the service request based on the target extension implementation class.
2. The method according to claim 1, further comprising, after obtaining the target service identifier carried in the received service request:
and storing the target service identification to a request link of a local thread variable so as to read the target service identification from the request link.
3. The method of claim 1, wherein the retrieving a target extension implementation class from a configuration center based on the target extension object and executing the service request based on the target extension implementation class comprises:
calling an extension point finder to find a target extension implementation class corresponding to the target extension object from a configuration center;
and executing the target service request based on the target extension implementation class to obtain a service execution result corresponding to the service request.
4. The method of claim 1, further comprising:
when the creation of a to-be-processed business object is detected, a to-be-processed business identifier corresponding to the to-be-processed business object is constructed, and a pre-written class marking function is called;
performing annotation marking on the business object to be processed based on the class marking function to obtain a to-be-stored extended implementation class corresponding to the business object to be processed;
establishing a mapping relation between the service identification to be processed and the service object to be processed, and storing the mapping relation into the extension point repository;
and storing the to-be-stored extension implementation class corresponding to the to-be-processed business object to the configuration center.
5. A system for executing a target service, comprising: a service scene layer, an extended scanning layer and a service execution layer; wherein the content of the first and second substances,
the service scene layer is used for acquiring a target service identifier carried in the received service request;
the extended scanning layer is used for searching a target extended object corresponding to the target service identifier from a mapping relation table of an extended point storage library based on the target service identifier; the extension point storage library comprises a mapping relation table of service identification and extension objects;
and the service execution layer is used for calling the target extension object from a configuration center to a target extension implementation class and executing the service request based on the target extension implementation class.
6. The system of claim 5, wherein the extended scan layer is further configured to:
when the creation of a to-be-processed business object is detected, a to-be-processed business identifier corresponding to the to-be-processed business object is constructed, and a pre-written class marking function is called; and performing annotation marking on the business object to be processed based on the class marking function to obtain an extended implementation class to be stored corresponding to the business object to be processed.
7. The system of claim 6, further comprising: and the configuration layer is used for storing the service identification to be processed and the service object to be processed into the mapping relation table in a key value pair mode, and storing the extended implementation class to be stored corresponding to the service object to be processed into the configuration center.
8. The system according to claim 5, wherein the service execution layer is further configured to invoke an extension point finder to find a target extension implementation class corresponding to the target extension object from a configuration center;
and executing the target service request based on the target extension implementation class to obtain a service execution result corresponding to the service request.
9. A server, characterized in that the server comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of execution of the target service of any one of claims 1-4.
10. A storage medium containing computer-executable instructions for performing the method of execution of the target service of any one of claims 1-4 when executed by a computer processor.
CN202011486762.9A 2020-12-16 2020-12-16 Target service execution method, system, server and storage medium Pending CN112559095A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011486762.9A CN112559095A (en) 2020-12-16 2020-12-16 Target service execution method, system, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011486762.9A CN112559095A (en) 2020-12-16 2020-12-16 Target service execution method, system, server and storage medium

Publications (1)

Publication Number Publication Date
CN112559095A true CN112559095A (en) 2021-03-26

Family

ID=75063841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011486762.9A Pending CN112559095A (en) 2020-12-16 2020-12-16 Target service execution method, system, server and storage medium

Country Status (1)

Country Link
CN (1) CN112559095A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110963A (en) * 2021-04-28 2021-07-13 北京京东拓先科技有限公司 Service processing method, service processing device, electronic equipment and readable storage medium
CN113434315A (en) * 2021-07-07 2021-09-24 京东科技控股股份有限公司 Interface management method and device, storage medium and electronic equipment
CN115268854A (en) * 2022-09-28 2022-11-01 深圳市明源云科技有限公司 Service expansion implementation method, system, electronic equipment and readable storage medium
CN115514665A (en) * 2022-08-31 2022-12-23 北京达佳互联信息技术有限公司 Service expansion method and device, electronic equipment and storage medium
CN115658018A (en) * 2022-10-20 2023-01-31 广东云徙智能科技有限公司 Method, system, device and medium for expanding middle station logic
CN117194298A (en) * 2023-09-18 2023-12-08 上海鸿翼软件技术股份有限公司 Control method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110300025A (en) * 2019-06-28 2019-10-01 湖南御家科技有限公司 Platform service extension method and system in a kind of business
CN110351342A (en) * 2019-06-20 2019-10-18 平安科技(深圳)有限公司 Service order processing method, device, computer equipment and storage medium
CN110955543A (en) * 2019-12-12 2020-04-03 浙江大搜车软件技术有限公司 Service processing method, device, equipment and computer readable storage medium
CN111414643A (en) * 2020-03-17 2020-07-14 深圳市前海随手财富管理有限公司 Data authority control method, device, server and storage medium
CN111598575A (en) * 2020-05-19 2020-08-28 中国工商银行股份有限公司 Business process control method and device, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110351342A (en) * 2019-06-20 2019-10-18 平安科技(深圳)有限公司 Service order processing method, device, computer equipment and storage medium
CN110300025A (en) * 2019-06-28 2019-10-01 湖南御家科技有限公司 Platform service extension method and system in a kind of business
CN110955543A (en) * 2019-12-12 2020-04-03 浙江大搜车软件技术有限公司 Service processing method, device, equipment and computer readable storage medium
CN111414643A (en) * 2020-03-17 2020-07-14 深圳市前海随手财富管理有限公司 Data authority control method, device, server and storage medium
CN111598575A (en) * 2020-05-19 2020-08-28 中国工商银行股份有限公司 Business process control method and device, electronic equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BRIAN GOETZ等: "JAVA并发编程实战", 机械工业出版社 , pages: 138 - 140 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110963A (en) * 2021-04-28 2021-07-13 北京京东拓先科技有限公司 Service processing method, service processing device, electronic equipment and readable storage medium
CN113434315A (en) * 2021-07-07 2021-09-24 京东科技控股股份有限公司 Interface management method and device, storage medium and electronic equipment
CN113434315B (en) * 2021-07-07 2024-05-17 京东科技控股股份有限公司 Interface management method and device, storage medium and electronic equipment
CN115514665A (en) * 2022-08-31 2022-12-23 北京达佳互联信息技术有限公司 Service expansion method and device, electronic equipment and storage medium
CN115514665B (en) * 2022-08-31 2023-11-21 北京达佳互联信息技术有限公司 Service expansion method, device, electronic equipment and storage medium
CN115268854A (en) * 2022-09-28 2022-11-01 深圳市明源云科技有限公司 Service expansion implementation method, system, electronic equipment and readable storage medium
CN115658018A (en) * 2022-10-20 2023-01-31 广东云徙智能科技有限公司 Method, system, device and medium for expanding middle station logic
CN115658018B (en) * 2022-10-20 2023-08-08 广东云徙智能科技有限公司 Middle-stage logic expansion method, system, device and medium
CN117194298A (en) * 2023-09-18 2023-12-08 上海鸿翼软件技术股份有限公司 Control method, device, equipment and storage medium
CN117194298B (en) * 2023-09-18 2024-05-31 上海鸿翼软件技术股份有限公司 Control method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112559095A (en) Target service execution method, system, server and storage medium
CN111240689B (en) Application program construction method, device, equipment and storage medium
CN110975293A (en) Method, device, server and medium for establishing resource reference relation table
CN111796809A (en) Interface document generation method and device, electronic equipment and medium
CN112596932A (en) Service registration and interception method and device, electronic equipment and readable storage medium
CN111694866A (en) Data searching and storing method, data searching system, data searching device, data searching equipment and data searching medium
CN112817657A (en) Application program starting item loading method, device and system and storage medium
US20190324763A1 (en) Insertion of custom activities in an orchestrated application suite
CN116244387A (en) Entity relationship construction method, device, electronic equipment and storage medium
CN109033456B (en) Condition query method and device, electronic equipment and storage medium
CN114330272A (en) Medical record template generation method and device, electronic equipment and storage medium
CN111046085B (en) Data tracing processing method and device, medium and equipment
CN112394876B (en) Large file storage/reading method, storage/reading device and computer equipment
CN112039975A (en) Method, device, equipment and storage medium for processing message field
CN112799760A (en) Form rendering method and device
CN110287338B (en) Industry hotspot determination method, device, equipment and medium
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN111241180A (en) Information processing method, device, equipment and storage medium
CN114219643A (en) Transaction calling method, device, equipment and storage medium
CN114238391A (en) Data paging query method and device, electronic equipment and storage medium
CN113050987B (en) Method and device for generating interface document, storage medium and electronic equipment
CN113127496B (en) Method and device for determining change data in database, medium and equipment
CN109062797B (en) Method and device for generating information
US10620946B1 (en) Dynamic modeling for opaque code during static analysis
CN114154468A (en) Report synthesis method and device, electronic equipment and storage medium

Legal Events

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