CN109660585B - Method, device, equipment and storage medium for calling AOP enhanced object service - Google Patents

Method, device, equipment and storage medium for calling AOP enhanced object service Download PDF

Info

Publication number
CN109660585B
CN109660585B CN201811137724.5A CN201811137724A CN109660585B CN 109660585 B CN109660585 B CN 109660585B CN 201811137724 A CN201811137724 A CN 201811137724A CN 109660585 B CN109660585 B CN 109660585B
Authority
CN
China
Prior art keywords
aop
service
enhanced object
calling
micro
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811137724.5A
Other languages
Chinese (zh)
Other versions
CN109660585A (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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201811137724.5A priority Critical patent/CN109660585B/en
Publication of CN109660585A publication Critical patent/CN109660585A/en
Application granted granted Critical
Publication of CN109660585B publication Critical patent/CN109660585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/62Establishing a time schedule for servicing the requests

Abstract

The invention discloses a calling method, a calling device, calling equipment and a storage medium of an AOP enhanced object service, wherein the method comprises the following steps: when a call instruction for calling service corresponding to a tangential programming oriented AOP enhanced object is detected, calling the service corresponding to the AOP enhanced object in a micro service system according to the call instruction; detecting whether a calling result returned after the micro service system calls the corresponding service of the AOP enhanced object is received within a preset time length; and if the calling result is not received within the preset time length, calling the service corresponding to the AOP enhanced object in the original system. The invention realizes that the micro service system can not realize the function of the corresponding service of the AOP enhanced object through AOP enhancement, and then intelligently switches back to the original system to call the service corresponding to the AOP enhanced object, thereby improving the robustness of the original system.

Description

Method, device, equipment and storage medium for calling AOP enhanced object service
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for calling an AOP enhanced object service.
Background
The micro-service architecture is a popular form in the existing server architecture, conforms to the characteristics of the Internet and is flexible. There are scenarios where a system of a conventional architecture would like to migrate to the microservice architecture. At present, interdependent code rewriting in an original system is changed to depend on a new service, namely, the service in a micro-service architecture. At this time, if the system where the micro-service is located is abnormal in the running process, the system cannot be switched back to the original system, so that the robustness of the original system is poor.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for calling an AOP enhanced object service, and aims to solve the technical problem that an original system is poor in robustness after the existing system migration process.
In order to achieve the above object, the present invention provides a method for calling an AOP enhanced object service, where the method for calling an AOP enhanced object service includes the steps of:
when a call instruction for calling service corresponding to a tangential programming oriented AOP enhanced object is detected, calling the service corresponding to the AOP enhanced object in a micro service system according to the call instruction;
detecting whether a calling result returned after the micro-service system calls the corresponding service of the AOP enhanced object is received within a preset time length;
and if the calling result is not received within the preset time length, calling the service corresponding to the AOP enhanced object in the original system.
Preferably, after the step of detecting whether a call result returned after the micro service system calls the service corresponding to the AOP enhanced object is received within a preset time, the method further includes:
if the calling result is received within the preset time length, extracting a result identifier carried by the calling result;
and after determining that the micro-service system successfully realizes the function of the service corresponding to the AOP enhanced object according to the result identification, outputting prompt information to prompt a user that the service corresponding to the AOP enhanced object is successfully called.
Preferably, after detecting a call instruction for calling a service corresponding to an AOP enhanced object, before the step of calling a service corresponding to the AOP enhanced object in a microservice system according to the call instruction, the method further includes:
determining an AOP enhanced object in the original system, and acquiring a module code of the AOP enhanced object;
and sending the module code to the micro service system so as to write the module code into the micro service system.
Preferably, the step of determining the AOP enhanced object in the original system comprises:
detecting whether each module in the original system is in butt joint with a third-party system;
and determining a module in the original system, which is butted with the third-party system, as the AOP enhanced object.
Preferably, the step of determining the AOP enhanced object in the original system comprises:
acquiring module functions realized by each module in the original system, and judging whether the module functions are consistent with preset functions, wherein the preset functions are functions corresponding to the AOP enhanced object;
and determining a module with the module function consistent with the preset function as the AOP enhanced object.
Preferably, before the step of calling the service corresponding to the AOP enhanced object in the micro service system according to the call instruction after detecting the call instruction for calling the service corresponding to the AOP enhanced object, the method further includes:
after receiving an operation instruction triggered by a user, detecting whether the operation instruction has permission to call services in the micro service system;
and if the operation instruction is detected to have the authority to call the service in the micro-service system, triggering a call instruction for calling the service corresponding to the AOP enhanced object corresponding to the operation instruction.
Preferably, after detecting a call instruction for calling a service corresponding to the AOP enhanced object, the step of calling the service corresponding to the AOP enhanced object in the microservice system according to the call instruction includes:
when a call instruction for calling the corresponding service of the AOP enhanced object is detected, acquiring a call logic of the micro-service system according to the call instruction;
and calling the service corresponding to the AOP enhanced object in the micro-service system according to the calling logic.
In addition, to achieve the above object, the present invention further provides an AOP enhanced object service invoking device, including:
the calling module is used for calling the service corresponding to the AOP enhanced object in the micro-service system according to a calling instruction after the calling instruction for calling the service corresponding to the tangential programming oriented AOP enhanced object is detected;
the detection module is used for detecting whether a calling result returned after the micro service system calls the service corresponding to the AOP enhanced object is received within a preset time length;
and the calling module is also used for calling the service corresponding to the AOP enhanced object in the original system if the calling result is not received within the preset time length.
In addition, to achieve the above object, the present invention further provides an invoking device of an AOP enhanced object service, including a memory, a processor, and an invoking program of an AOP enhanced object service stored on the memory and operable on the processor, wherein the invoking program of the AOP enhanced object service, when executed by the processor, implements the steps of the invoking method of the AOP enhanced object service as described above.
Further, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a caller of an AOP enhanced object service, which, when executed by a processor, implements the steps of the method for calling an AOP enhanced object service as described above.
According to the invention, the service corresponding to the AOP enhanced object is called in the micro-service system, and if the original system does not receive the calling result returned after the micro-service system calls the service corresponding to the AOP enhanced object within the preset time, the service corresponding to the AOP enhanced object is directly called in the original system. The method and the system realize the AOP enhancement, and intelligently switch back to the original system to call the service corresponding to the AOP enhanced object after the micro service system cannot realize the function of the service corresponding to the AOP enhanced object, thereby improving the robustness of the original system.
Drawings
FIG. 1 is a flowchart illustrating a first embodiment of a method for invoking AOP enhanced object service according to the present invention;
FIG. 2 is a flowchart illustrating a second embodiment of the method for invoking AOP enhanced object service according to the present invention;
FIG. 3 is a flowchart illustrating a third embodiment of a method for invoking AOP enhanced object service according to the present invention;
FIG. 4 is a flowchart illustrating a fourth embodiment of a method for invoking AOP enhanced object service according to the present invention;
FIG. 5 is a block diagram illustrating the function of the calling device for AOP enhanced object service according to the preferred embodiment of the present invention;
fig. 6 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The present invention provides a method for calling an AOP enhanced object service, and referring to fig. 1, fig. 1 is a flowchart illustrating a first embodiment of the method for calling an AOP enhanced object service according to the present invention.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than here.
The method for calling the AOP enhanced object service is applied to an original system, the original system can be installed in a server or a terminal, and the terminal can include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal Digital Assistant (PDA), and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like. In the embodiments of the call method of the AOP enhanced object service, for convenience of description, the embodiments are explained with an original system as an execution subject. The method for calling the AOP enhanced object service comprises the following steps:
step S10, when a call instruction for calling the service corresponding to the tangential programming oriented AOP enhanced object is detected, the service corresponding to the AOP enhanced object is called in the micro-service system according to the call instruction.
It should be noted that, AOP (Aspect organized Programming) enhancement is a technique commonly used by java, and it can intercept and modify specific code by defining an entry point, but can keep the original code unchanged, and an enhanced object is module code that is migrated to the microservice system. It should be noted that although it is said to be migrated, the old module code still remains in the original system, and the new service only copies a piece of module code to the new microservice system, thereby ensuring the stability of the original system.
And when the original system detects a call instruction for calling the service corresponding to the AOP enhanced object, the original system calls the service corresponding to the AOP enhanced object in the micro-service system according to the call instruction. The AOP enhanced object has different corresponding services and different functions.
Further, step S10 includes:
step a, when a call instruction for calling the corresponding service of the AOP enhanced object is detected, obtaining the call logic of the micro-service system according to the call instruction.
And when the original system detects a call instruction for calling the service corresponding to the AOP enhanced object, the original system acquires the ribbon call logic of the micro-service system according to the call instruction. Wherein, ribbon is to load the call among services, and is to balance the load among services. The original system may be connected to the microservice system via a WiFi, bluetooth, or 4G (the 4th Generation mobile communication technology, fourth Generation mobile communication technology) network. The calling logic can be stored in the micro service system in advance, and when the original system needs to obtain the calling logic, the original system obtains the calling logic from the micro service system according to a calling instruction. Further, in order to improve the calling efficiency of the obtaining calling logic, the calling logic of the microservice system may also be stored in advance in a database of the original system, and when the original system needs to obtain the calling logic, the original system may directly obtain the prestored calling logic in the database thereof. It can be understood that, through the invocation logic, the service corresponding to the AOP enhanced object in the micro service system can be invoked, and the service corresponding to the AOP enhanced object in the micro service system is migrated from the original system to the micro service system.
And b, calling the service corresponding to the AOP enhanced object in the micro-service system according to the calling logic.
After the calling logic is obtained, the original system calls a remote interface corresponding to the micro service system according to the calling logic so as to call the service corresponding to the AOP enhanced object in the micro service system through the remote interface and realize the function of the service corresponding to the AOP enhanced object. It should be noted that, in the original system, an enhanced service code is preset, and when a remote interface of the microservice system is called through a call logic, a service corresponding to the microservice system is called in the service code. In which a spring cloud Feign plug-in is used as the micro service system, it has the advantage that it can call the remote interface of the micro service system as well as the local code. Feign is an explicit Http (hypertext Transfer Protocol) client, which makes Http-writing clients simpler.
Step S20, detecting whether a call result returned after the micro service system calls the service corresponding to the AOP enhanced object is received within a preset time.
And after the original system calls the service corresponding to the AOP enhanced object in the micro-service system according to the calling logic, the original system detects whether a calling result returned after the micro-service system calls the service corresponding to the AOP enhanced object is received within a preset time. After the original system calls the service corresponding to the AOP enhanced object in the micro-service system according to the calling instruction, if the micro-service system successfully calls the service corresponding to the AOP enhanced object, the micro-service system sends a calling result to the original system; if the micro service system fails to call the service corresponding to the AOP enhanced object, the micro service system will not send the call result to the original system. The preset time period can be set according to specific needs, for example, the preset time period can be set to 0.5 second, 2 seconds, 1 second or the like. The situation that the original system waits for a long time for the micro-service system to return a calling result, so that the service efficiency corresponding to calling the AOP enhanced object is low is avoided through the preset duration.
Step S30, if the calling result is not received within the preset duration, calling the service corresponding to the AOP enhanced object in the original system.
When the original system does not receive the calling result returned by the micro-service system within the preset time length, the original system directly calls the service corresponding to the original AOP enhanced object according to the calling instruction so as to realize the function of the service corresponding to the AOP enhanced object in the original system. It should be noted that, when the original system does not receive the call result returned by the microservice system within the preset time period, it indicates that the microservice system is in a fault state. In the process of migrating the service corresponding to the AOP enhanced object of the original system to the micro-service system, the original system does not modify the code, so that even if the service corresponding to the AOP enhanced object is migrated to the micro-service system, the service corresponding to the AOP enhanced object can be called in the original system to realize the corresponding function.
In this embodiment, the service corresponding to the AOP enhanced object is called in the micro service system, and if the original system does not receive a call result returned after the micro service system calls the service corresponding to the AOP enhanced object within a preset time, the service corresponding to the AOP enhanced object is directly called in the original system. The method realizes the AOP enhancement, and after the micro-service system can not realize the function of the service corresponding to the AOP enhanced object, the micro-service system intelligently switches back to the original system to call the service corresponding to the AOP enhanced object, so that the robustness of the original system is improved, wherein the robustness is also called robustness, which refers to the processing capability of software for input conditions except for the specification requirement, and if one piece of software can correctly run in different environments, the software is considered to have high portability, which can be called that the software is robust under different platforms.
Further, a second embodiment of the calling method of the AOP enhanced object service is proposed.
The second embodiment of the method for calling an AOP enhanced object service differs from the first embodiment of the method for calling an AOP enhanced object service in that, referring to fig. 2, the method for calling an AOP enhanced object service further includes:
step S40, if the call result is received within the preset time, extracting a result identifier carried by the call result.
And if the original system receives the calling result returned by the micro-service system within the preset time length, the original system extracts the result identification carried by the calling result. Two types of result identifications exist in the calling result, the first type of result identification indicates that the function of the service corresponding to the AOP enhanced object is successfully realized after the micro-service system calls the service corresponding to the AOP enhanced object, and the second type of result identification indicates that the micro-service system cannot successfully realize the function of the service corresponding to the AOP enhanced object. The expression form of the first type result identifier and the second type result identifier may be set according to specific needs, for example, the first type result identifier may be set to "11", and the second type result identifier may be set to "00".
Step S50, when it is determined that the micro service system successfully realizes the function of the service corresponding to the AOP enhanced object according to the result identification, a prompt message is output to prompt the user that the service corresponding to the AOP enhanced object is successfully called.
And after the original system extracts the result identification carried by the calling result, the original system determines whether the micro-service system successfully realizes the function of the corresponding service of the AOP enhanced object according to the result identification. Further, after the original system determines that the micro-service system successfully realizes the function of the service corresponding to the AOP enhanced object according to the result identifier, the original system generates a prompt message for successful invocation and outputs the prompt message for successful invocation, so as to prompt the user that the service corresponding to the AOP enhanced object is successfully invoked and the function of the service corresponding to the AOP enhanced object is realized according to the prompt message. When the original system determines that the micro-service system fails to successfully realize the function of the service corresponding to the AOP enhanced object according to the result identification, the original system generates prompt information of call failure and outputs the prompt information of call failure so as to prompt a user that the service corresponding to the AOP enhanced object is failed to be called according to the prompt information of call failure. It can be understood that, in this embodiment, only after the function of the service corresponding to the AOP enhanced object is successfully implemented, the original system will prompt the user that the service corresponding to the AOP enhanced object has been successfully invoked.
In this embodiment, after the result identifier carried in the call result is extracted and it is determined that the micro service system successfully implements the function of the service corresponding to the AOP enhanced object according to the result identifier, the prompt information is output to prompt the user that the service corresponding to the AOP enhanced object has been successfully called, so that the user can know the call condition of the service corresponding to the AOP enhanced object in time.
Further, a third embodiment of the method for calling an AOP enhanced object service according to the present invention is provided.
The third embodiment of the method for calling an AOP enhanced object service differs from the first or second embodiment of the method for calling an AOP enhanced object service in that, referring to fig. 3, the method for calling an AOP enhanced object service further includes:
step S60, determining the AOP enhanced object in the original system, and acquiring a module code of the AOP enhanced object.
The original system determines an AOP enhanced object which needs AOP enhancement, and acquires a module code corresponding to the AOP enhanced object after determining the AOP enhanced object. In the original system, there may be one or more AOP enhanced objects, each having corresponding module code. Further, after the original system determines the AOP enhanced object, the original system writes the AOP enhanced object into a configuration file, adds an enhanced identifier to the AOP enhanced object in the configuration file, and by using the enhanced identifier, the original system can quickly determine whether a service in the micro service system needs to be called to implement a function corresponding to an operation instruction triggered by a user.
Further, the step of determining AOP enhanced objects in the original system comprises:
and c, detecting whether each module in the original system is in butt joint with a third-party system.
Specifically, the original system detects whether each built-in module of the original system needs to be connected with a third-party system, that is, whether a built-in mode of the original system needs to be connected with other systems to realize a corresponding function. Specifically, if a certain module in the original system needs to be docked with a third-party system, a specific identifier is carried in the name of the module. Therefore, whether each module in the original system needs to be docked with a third-party system can be detected through the specific identification.
And d, determining a module in the original system, which is butted with the third-party system, as the AOP enhanced object.
And after the original system determines that the module of the third-party system needs to be docked, the original system determines the module of the third-party system needs to be docked as the AOP enhanced object. And when the original system determines that a certain module does not need to be docked with the module of the third-party system, the original system determines that the module which does not need to be docked with the third-party system is not the AOP enhanced object.
Further, the step of determining the AOP enhanced object in the original system comprises:
and e, acquiring module functions realized by each module in the original system, and judging whether the module functions are consistent with preset functions, wherein the preset functions are functions corresponding to the AOP enhanced object.
Specifically, the original system obtains module functions that can be realized by each built-in module, and determines whether the module functions are consistent with a preset function, wherein the preset function is a function that can be realized by the service corresponding to the AOP enhanced object.
And f, determining the module with the module function consistent with the preset function as the AOP enhanced object.
When the original system determines that the module function realized by a certain module is consistent with the preset function, the original system determines the module with the module function consistent with the preset function as the AOP enhanced object. And when the original system determines that the module function is inconsistent with the preset function, the original system determines that the module with the inconsistent module function and the preset function is not the AOP enhanced object.
Step S70, sending the module code to the micro service system, so as to write the module code into the micro service system.
And after the original system acquires the module code of the AOP enhanced object, sending the module code of the AOP enhanced object to the micro-service system. And after the micro service system receives the module code of the AOP enhanced object sent by the original system, storing the module code so as to write the module code of the AOP enhanced object into the micro service system. It should be noted that, after the module code of the AOP enhanced object is sent to the micro-service system, the module code of the AOP enhanced object is stored in the original system, that is, java code for invoking a service corresponding to the AOP enhanced object in the original system is not modified, and the original system is also a complete original system.
Furthermore, after the module code corresponding to the AOP enhanced object is written into the micro-service system, a call instruction for calling the service corresponding to the AOP enhanced object may be triggered in the original system, so as to test whether the micro-service system is in a normal state. When the service corresponding to the AOP enhanced object in the micro-service system can be directly called according to the calling instruction, determining that the micro-service system is in a normal state; and when the service corresponding to the AOP enhanced object in the micro-service system can not be called according to the calling instruction, determining that the micro-service system is in a fault state, and calling a module code corresponding to the built-in AOP enhanced object by the original system to realize the function of the service corresponding to the AOP enhanced object.
In this embodiment, the module code of the AOP enhanced object in the original system is written into the micro service system, so that when the service corresponding to the AOP enhanced object needs to be called, the service corresponding to the AOP enhanced object can be called in the micro service architecture corresponding to the micro service system.
Furthermore, a fourth embodiment of the calling method of the AOP enhanced object service is proposed.
The fourth embodiment of the method for calling an AOP enhanced object service differs from the first, second, or third embodiment of the method for calling an AOP enhanced object service in that, referring to fig. 4, the method for calling an AOP enhanced object service further includes:
step S80, after receiving an operation instruction triggered by a user, detecting whether the operation instruction has an authority to invoke a service in the microservice system.
When the original system receives an operation instruction triggered by a user, the original system detects whether the received operation instruction has authority to call the service in the micro-service system, namely detects whether the received operation instruction can call the service in the micro-service system. It can be understood that, if the function to be realized by the operation instruction is a function that can be realized by the service corresponding to the AOP enhanced object, it is determined that the operation instruction has the authority to invoke the service in the microservice system; if the function to be realized by the operation instruction is a function which cannot be realized by the service corresponding to the AOP enhanced object, determining that the operation instruction has no authority to call the service in the micro-service system. The operation instruction can be triggered by a user in a display interface corresponding to the original system according to needs.
Step S90, if it is detected that the operation instruction has the authority to invoke the service in the micro service system, triggering an invocation instruction to invoke the service corresponding to the AOP enhanced object corresponding to the operation instruction.
If the operation instruction is detected to have the authority to call the service in the micro-service system, the original system triggers a call instruction for calling the service corresponding to the AOP enhanced object corresponding to the operation instruction. If the operation instruction is detected to have no authority to call the service in the micro-service system, the original system directly executes the operation instruction.
According to the method and the device, the call instruction for calling the service corresponding to the AOP enhanced object is triggered after the operation instruction triggered by the user is received and the operation instruction is detected to have the authority to call the service in the micro service system, so that the call instruction for calling the service corresponding to the AOP enhanced object is avoided being directly triggered after the operation instruction is received, and the accuracy of calling the service corresponding to the AOP enhanced object is improved.
In addition, referring to fig. 4, the present invention further provides an AOP enhanced object service invoking device, including:
the calling module 10 is configured to, after a calling instruction for calling a service corresponding to a tangential programming oriented AOP enhanced object is detected, call a service corresponding to the AOP enhanced object in a micro service system according to the calling instruction;
the detection module 20 is configured to detect whether a call result returned after the micro service system calls the service corresponding to the AOP enhanced object is received within a preset time;
the calling module 10 is further configured to call, if the calling result is not received within the preset time length, a service corresponding to the AOP enhanced object in the original system.
Further, the calling device of the AOP enhanced object service further includes:
the extraction module is used for extracting a result identifier carried by the calling result if the calling result is received within the preset time length;
and the output module is used for outputting prompt information to prompt a user that the service corresponding to the AOP enhanced object is successfully called after the micro-service system is determined to successfully realize the function of the service corresponding to the AOP enhanced object according to the result identification.
Further, the calling device of the AOP enhanced object service further includes:
a determining module for determining an AOP enhanced object in the original system;
the acquisition module is used for acquiring the module code of the AOP enhanced object;
and the sending module is used for sending the module code to the micro service system so as to write the module code into the micro service system.
Further, the determining module further comprises:
the detection unit is used for detecting whether each module in the original system is in butt joint with a third-party system;
a first determining unit, configured to determine a module in the original system interfacing with the third-party system as an AOP enhanced object.
Further, the determining module further comprises:
the first acquisition unit is used for acquiring module functions realized by each module in the original system;
the judging unit is used for judging whether the module function is consistent with a preset function, wherein the preset function is a function corresponding to the AOP enhanced object;
a second determining unit, configured to determine, as the AOP enhanced object, a module whose module function is consistent with the preset function.
Further, the detecting module 20 is further configured to detect whether the operation instruction has an authority to invoke a service in the micro service system after receiving an operation instruction triggered by a user;
the calling device of the AOP enhanced object service further comprises:
and the triggering module is used for triggering a calling instruction for calling the service corresponding to the AOP enhanced object corresponding to the operation instruction if the operation instruction is detected to have the authority to call the service in the micro-service system.
Further, the calling module 10 includes:
the second acquisition unit is used for acquiring the call logic of the micro service system according to the call instruction after the call instruction for calling the service corresponding to the AOP enhanced object is detected;
and the calling unit is used for calling the service corresponding to the AOP enhanced object in the micro-service system according to the calling logic.
It should be noted that, the embodiments of the apparatus for calling the AOP enhanced object service are substantially the same as the embodiments of the method for calling the AOP enhanced object service, and are not described in detail herein.
In addition, the invention also provides calling equipment of the AOP enhanced object service. As shown in fig. 6, fig. 6 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.
It should be noted that fig. 6 is a schematic structural diagram of a hardware operating environment of a calling device that can serve an AOP enhanced object. The calling equipment of the AOP enhanced object service in the embodiment of the invention can be terminal equipment such as a PC, a portable computer and the like.
As shown in fig. 6, the calling device of the AOP enhanced object service may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory such as a disk memory. The memory 1005 may alternatively be a storage device separate from the processor 1001 described previously.
Optionally, the invoking device of the AOP enhanced object service may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like.
Those skilled in the art will appreciate that the calling device architecture of the AOP enhanced object service shown in fig. 6 does not constitute a limitation of the calling device of the AOP enhanced object service, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 6, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a caller of the AOP enhanced object service. The operating system is a program for managing and controlling hardware and software resources of calling equipment of the AOP enhanced object service, and supports the operation of calling programs of the AOP enhanced object service and other software or programs.
In the calling device of the AOP enhanced object service shown in fig. 6, the user interface 1003 may be configured to receive an operation instruction; the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; the processor 1001 may be configured to call a calling program of the AOP enhanced object service stored in the memory 1005 and perform the steps of the calling method of the AOP enhanced object service as described above.
The specific implementation of the calling device of the AOP enhanced object service of the present invention is substantially the same as the above-mentioned embodiments of the calling method of the AOP enhanced object service, and is not described herein again.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a calling program of an AOP enhanced object service is stored, and when the calling program of the AOP enhanced object service is executed by a processor, the steps of the method for calling the AOP enhanced object service are implemented.
The specific implementation manner of the computer-readable storage medium of the present invention is substantially the same as that of the above-mentioned embodiments of the method for invoking AOP enhanced object service, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element identified by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for calling an AOP enhanced object service is characterized by comprising the following steps:
when a call instruction for calling service corresponding to a tangential programming oriented AOP enhanced object is detected, calling the service corresponding to the AOP enhanced object in a micro service system according to the call instruction;
detecting whether a calling result returned after the micro-service system calls the corresponding service of the AOP enhanced object is received within a preset time length;
and if the calling result is not received within the preset time length, calling the service corresponding to the AOP enhanced object in the original system.
2. The method for invoking AOP enhanced object services according to claim 1, wherein after the step of detecting whether a call result returned after the micro service system invokes the service corresponding to the AOP enhanced object is received within a preset time period, the method further comprises:
if the calling result is received within the preset time length, extracting a result identifier carried by the calling result;
and when the micro-service system is determined to successfully realize the function of the service corresponding to the AOP enhanced object according to the result identification, outputting prompt information to prompt a user that the service corresponding to the AOP enhanced object is successfully called.
3. The method for invoking AOP enhanced object service according to claim 1, wherein before the step of invoking the service corresponding to the AOP enhanced object in the micro service system according to the invocation instruction after detecting the invocation instruction for invoking the service corresponding to the AOP enhanced object, further comprising:
determining an AOP enhanced object in the original system, and acquiring a module code of the AOP enhanced object;
and sending the module code to the micro service system so as to write the module code into the micro service system.
4. The method for invoking AOP enhanced object service according to claim 3, wherein said step of determining an AOP enhanced object in said original system comprises:
detecting whether each module in the original system is in butt joint with a third-party system;
and determining a module in the original system, which is connected with the third-party system, as the AOP enhanced object.
5. The method for invoking AOP enhanced object service according to claim 3, wherein said step of determining an AOP enhanced object in said original system comprises:
acquiring module functions realized by each module in the original system, and judging whether the module functions are consistent with preset functions, wherein the preset functions are functions corresponding to the AOP enhanced object;
and determining a module with the module function consistent with the preset function as the AOP enhanced object.
6. The method for invoking AOP enhanced object services according to claim 1, wherein before the step of invoking the service corresponding to the AOP enhanced object in the micro service system according to the invocation command after the invocation command for invoking the service corresponding to the AOP enhanced object is detected, the method further comprises:
after receiving an operation instruction triggered by a user, detecting whether the operation instruction has the authority to call the service in the micro service system;
if the operating instruction is detected to have the authority to call the service in the micro service system, a call instruction for calling the service corresponding to the AOP enhanced object corresponding to the operating instruction is triggered.
7. The method for invoking AOP enhanced object service according to any one of claims 1 to 6, wherein the step of invoking the service corresponding to the AOP enhanced object in the micro service system according to the invocation instruction after detecting the invocation instruction for invoking the service corresponding to the AOP enhanced object comprises:
when a call instruction for calling the service corresponding to the AOP enhanced object is detected, obtaining a call logic of the micro-service system according to the call instruction;
and calling the service corresponding to the AOP enhanced object in the micro-service system according to the calling logic.
8. An apparatus for invoking AOP enhanced object service, wherein said apparatus for invoking AOP enhanced object service comprises:
the calling module is used for calling the service corresponding to the AOP enhanced object in the micro-service system according to a calling instruction after the calling instruction for calling the service corresponding to the tangential programming oriented AOP enhanced object is detected;
the detection module is used for detecting whether a calling result returned after the micro service system calls the service corresponding to the AOP enhanced object is received within a preset time length;
and the calling module is also used for calling the service corresponding to the AOP enhanced object in the original system if the calling result is not received within the preset time length.
9. An AOP enhanced object service invocation apparatus, characterized in that said AOP enhanced object service invocation apparatus comprises a memory, a processor and a caller of AOP enhanced object service stored on said memory and operable on said processor, said caller of AOP enhanced object service invocation implementing, when executed by said processor, the steps of AOP enhanced object service invocation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a caller of an AOP enhanced object service is stored, which, when executed by a processor, implements the steps of the method for calling of an AOP enhanced object service according to any one of claims 1 to 7.
CN201811137724.5A 2018-09-28 2018-09-28 Method, device, equipment and storage medium for calling AOP enhanced object service Active CN109660585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811137724.5A CN109660585B (en) 2018-09-28 2018-09-28 Method, device, equipment and storage medium for calling AOP enhanced object service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811137724.5A CN109660585B (en) 2018-09-28 2018-09-28 Method, device, equipment and storage medium for calling AOP enhanced object service

Publications (2)

Publication Number Publication Date
CN109660585A CN109660585A (en) 2019-04-19
CN109660585B true CN109660585B (en) 2022-08-19

Family

ID=66109979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811137724.5A Active CN109660585B (en) 2018-09-28 2018-09-28 Method, device, equipment and storage medium for calling AOP enhanced object service

Country Status (1)

Country Link
CN (1) CN109660585B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256351B (en) * 2020-10-26 2023-11-17 卫宁健康科技集团股份有限公司 Method for realizing Feign component, method and device for calling micro-service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101097615A (en) * 2006-06-30 2008-01-02 上海卓繁信息技术有限公司 Net administrative examination and approval management information system structure
CN101364185A (en) * 2008-09-02 2009-02-11 中国科学院软件研究所 Thread pool size self-adapting regulating method and concurrency control method applying server
CN101907993A (en) * 2010-07-27 2010-12-08 华南理工大学 Dynamic model based on SpringDM and application thereof to persistence layer of RFID (Radio Frequency Identification) middleware
CN108011768A (en) * 2017-12-26 2018-05-08 杭州电子科技大学 A kind of aop intercept types HBase data store micro services framework construction method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5454201B2 (en) * 2010-02-15 2014-03-26 富士通株式会社 Data store switching device, data store switching method, and data store switching program
US10579502B2 (en) * 2017-02-28 2020-03-03 International Business Machines Corporation Resuming applications using pass-through servers and trace data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101097615A (en) * 2006-06-30 2008-01-02 上海卓繁信息技术有限公司 Net administrative examination and approval management information system structure
CN101364185A (en) * 2008-09-02 2009-02-11 中国科学院软件研究所 Thread pool size self-adapting regulating method and concurrency control method applying server
CN101907993A (en) * 2010-07-27 2010-12-08 华南理工大学 Dynamic model based on SpringDM and application thereof to persistence layer of RFID (Radio Frequency Identification) middleware
CN108011768A (en) * 2017-12-26 2018-05-08 杭州电子科技大学 A kind of aop intercept types HBase data store micro services framework construction method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AOP技术在国库集中支付系统的应用;杜玲玲;《计算机应用与软件》;20090315(第03期);全文 *
基于开源框架及容器技术的微服务架构研究;刘辉军等;《电力信息与通信技术》;20180615(第06期);全文 *

Also Published As

Publication number Publication date
CN109660585A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
JP6571277B2 (en) Method and apparatus for loading terminal application
CN107515764B (en) Application page opening method, terminal and computer readable storage medium
JP4205980B2 (en) Terminal device and program
US9367403B2 (en) Terminal and application restoring method
US9021507B2 (en) Dynamic use of data across multiple programs
CN110933075B (en) Service calling method and device, electronic equipment and storage medium
US11099915B2 (en) Optimizing startup time for event-driven functions
CN109753419A (en) A kind of method and device of the abnormal log information of all applications of non-invasive monitoring Android system
CN110574006B (en) System and method for automatically synchronizing responses and conditions on a device
CN111694620A (en) Interaction method, device and equipment of third-party service and computer storage medium
CN109660585B (en) Method, device, equipment and storage medium for calling AOP enhanced object service
CN111064610A (en) Log file subscription method, terminal device and storage medium
CN108037989B (en) SDK component identification method and device
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium
CN111930565B (en) Process fault self-healing method, device and equipment for components in distributed management system
JP2005228183A (en) Program execution method and computer system for executing the program
CN110673970B (en) Cross-process calling system and method based on web application
CN108984238B (en) Gesture processing method and device of application program and electronic equipment
KR101369275B1 (en) Method and apparatus for integrating java software into mobile terminal, and mobile terminal
CN111124627B (en) Method and device for determining call initiator of application program, terminal and storage medium
CN108600255B (en) Mock service management method, device, computer equipment and storage medium
CN110336693B (en) Method, device, equipment and storage medium for managing network block equipment
CN107277132B (en) DLNA (digital Living network alliance) pushing processing method, multimedia receiving end and storage medium
CN105791568B (en) Information processing method and terminal thereof
CN111198721A (en) Application program running method and device

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