CN117056317B - Data processing method, device, equipment and computer readable storage medium - Google Patents

Data processing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN117056317B
CN117056317B CN202311310183.2A CN202311310183A CN117056317B CN 117056317 B CN117056317 B CN 117056317B CN 202311310183 A CN202311310183 A CN 202311310183A CN 117056317 B CN117056317 B CN 117056317B
Authority
CN
China
Prior art keywords
service
interface
component
class
business
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
CN202311310183.2A
Other languages
Chinese (zh)
Other versions
CN117056317A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311310183.2A priority Critical patent/CN117056317B/en
Publication of CN117056317A publication Critical patent/CN117056317A/en
Application granted granted Critical
Publication of CN117056317B publication Critical patent/CN117056317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • 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/23Updating
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The embodiment of the application discloses a data processing method, a device, equipment and a computer readable storage medium, comprising the following steps: in the operation stage, acquiring a call request of a first service component in the service application for a second service component; the service application comprises N service components and a public interface component which is respectively connected with the N service components; acquiring an interface class associated with the second service component from an interface declaration service included in the common interface component according to the call request; according to the interface class associated with the second service component, invoking an instance object corresponding to the implementation class associated with the second service component from the interface management service included in the common interface component, and invoking the implementation class of the second service component through the instance object to realize service; the implementation class associated with the second service component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class into the interface management service. By adopting the method and the device, the coupling degree between the service components can be reduced.

Description

Data processing method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of software development technologies, and in particular, to a data processing method, apparatus, device, and computer readable storage medium.
Background
In the development process of business application, the software code amount of the project is increased due to the continuous growth of business. In order to facilitate the change of technicians to different functions of service application, codes are generally divided according to the content of service, and different service codes are placed into independent functional modules for development, so as to obtain service components of different service. In this way, service applications can be formed by calling the functional modules of the components with each other, so that the coupling between software codes is reduced.
In the prior art, component interfaces of other service components are generally declared in the service components, and dependency relationship exists among each service component, or the component interfaces of each service component are concentrated in a common interface, but a technician is required to manually complete the interface registration of the service component. Because of the dependency relationship among the service components, the coupling problem among codes still exists, so that when one functional module is changed, other functional modules can be recoded to ensure that the functional modules can be called to finish development of large projects, and the maintenance cost of an interface can be greatly increased by manually finishing interface registration, so that the development efficiency is low and the cost is higher.
Disclosure of Invention
The embodiment of the application provides a data processing method, a device, equipment and a computer readable storage medium, which can reduce the coupling degree between service components, improve the development efficiency and reduce the cost.
The embodiment of the application provides a data processing method, which comprises the following steps:
in the operation stage, acquiring a call request of a first service component in the service application for a second service component; the service application comprises N service components and a public interface component which is respectively connected with the N service components; the N business components comprise a first business component and a second business component; the N business components are used for providing business services for business applications; the public interface component is used for providing service component calling functions among the N service components;
acquiring an interface class associated with the second service component from an interface declaration service included in the common interface component according to the call request; the interface class associated with the second business component is used for representing the content of business services of the second business component;
according to the interface class associated with the second service component, invoking an instance object corresponding to the implementation class associated with the second service component from the interface management service included in the common interface component, and invoking the implementation class of the second service component through the instance object to realize service; the implementation class associated with the second business component is used for implementing business services of the second business component; the implementation class associated with the second service component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class into the interface management service.
An aspect of an embodiment of the present application provides a data processing apparatus, including:
the first acquisition module is used for acquiring a call request of the first service component for the second service component in the service application in the operation stage; the service application comprises N service components and a public interface component which is respectively connected with the N service components; the N business components comprise a first business component and a second business component; the N business components are used for providing business services for business applications; the public interface component is used for providing service component calling functions among the N service components;
the second acquisition module is used for acquiring the interface class associated with the second service component from the interface declaration service included in the public interface component according to the call request; the interface class associated with the second business component is used for representing the content of business services of the second business component;
the first calling module is used for calling an instance object corresponding to an implementation class associated with the second business component from interface management services included in the public interface component according to the interface class associated with the second business component, and calling the implementation class of the second business component through the instance object to realize business service; the implementation class associated with the second business component is used for implementing business services of the second business component; the implementation class associated with the second service component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class into the interface management service.
Wherein, the first calling module includes:
the first calling unit is used for calling a management interface in the interface management service and transmitting the interface class associated with the second service component into the management interface;
the first processing unit is used for traversing an instance object list in the interface management service through the management interface, determining an instance object corresponding to the interface class according to the interface class associated with the second service component, calling an implementation class associated with the second service component from the instance object list through the instance object, and calling the service of the second service component through the implementation class; the instance object list comprises instance objects corresponding to the implementation classes associated with the N business components.
Wherein, the device further includes:
the third acquisition module is used for acquiring N service components and interface classes and implementation classes respectively associated with the N service components;
the first generation module is used for generating an interface statement service in the public interface component based on the interface class associated with the N business components; the interface class is used for calling an instance object corresponding to the implementation class associated with the service component in the operation stage;
the fourth acquisition module is used for acquiring a first format class set included in the source code by intercepting the source code associated with the service application through a compiling and packaging tool in a packaging and compiling stage, wherein the first format class set comprises N implementation classes;
The first processing module is used for processing the first format class set through a tangent plane-oriented tool to obtain a target format class carrying a user-defined annotation, and registering the target format class into an interface management service in the public interface component; the association relation between the target format class and the custom annotation is obtained by annotating N implementation classes through the custom annotation.
Wherein, the custom annotation comprises an annotation life cycle and an annotation object; the annotation lifecycle is used for declaring that the custom annotation exists in the packaging compiling stage; the annotation object is used to state that the N business component associated implementation classes are annotated.
Wherein, the first processing module includes:
the second processing unit is used for converting the first format class set into a second format class set applicable to the face cutting tool through the face cutting tool;
the third processing unit is used for identifying N second format classes carrying custom annotations from the second format class set through a tangent plane-oriented tool, and determining the N second format classes as target format classes;
and the fourth processing unit is used for instantiating the target format class to obtain an instance object corresponding to the target format class, and registering the instance object into an instance object list in the interface management service.
Wherein the third processing unit includes:
the first processing subunit is configured to transmit the custom annotation to a service interface associated with each second format class in the second format class set through the tangent plane-oriented tool, and determine, according to a reflection mechanism, a second format class of an annotation object corresponding to the custom annotation returned by the service interface as a target format class.
In one aspect, a computer device is provided, including: a processor and a memory;
the processor is connected to a memory, and a network interface, wherein the network interface is used for providing a data communication function, the memory is used for storing program codes, and the processor is used for calling the program codes to execute the method provided by the first aspect of the embodiment of the application.
In one aspect, the present application provides a computer readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided in the embodiments of the present application.
In one aspect, the present application provides a computer program product comprising a computer program stored on a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in the embodiment of the present application.
In the embodiment of the application, the business application can realize the inter-calling function between any business components, so that the business components provide business services for the business application. The business application comprises N business components and common interface components which are respectively connected with the N business components, a first business component in the business application can call an interface class of a second business component through an interface declaration service in the common interface components, and an instance object corresponding to an implementation class associated with the second business component is called from an interface management service included in the common interface components according to the interface class associated with the second business component. Further, the implementation class associated with the second business component can be invoked by the instance object, thereby implementing the business service of the second business component. The second business component carrying the custom annotation can register the instance object corresponding to the implementation class into the interface management service. It should be appreciated that by centralizing the interface classes associated with the N service components in the interface management service included in the common interface component, thereby implementing the invocation of each service component, the degree of coupling between each service component may be reduced. Meanwhile, the instance objects corresponding to the implementation classes of the business components are registered into the interface management service included in the public interface component through the custom annotation, so that a technician can be prevented from manually completing the interface registration, the maintenance cost of the interface is reduced, and the development efficiency is improved.
Drawings
Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a first flow of a data processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a scenario of a data processing method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a data processing method according to an embodiment of the present disclosure;
FIG. 5 is a first data communication flow chart of a data processing method provided in an embodiment of the present application;
FIG. 6 is a second flowchart of a data processing method according to an embodiment of the present disclosure;
FIG. 7 is a second data communication flow chart of a data processing method provided in an embodiment of the present application;
FIG. 8 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The implementation of the technical solution of the present application is described in further detail below with reference to the accompanying drawings.
1. Tangent plane oriented programming (Aspect Oriented Programming, AOP programming): refers to a technology for realizing unified maintenance of certain functions in a program through a precompiled mode and a running period dynamic agent during packaging compiling (Android Package compiling period).
2. Compile packing tool (Android Gradle Plugin, AGP packing tool): the plug-in unit is a compiling and packaging tool aiming at an Android system based on Android (Android), and can realize custom construction logic.
3. Gradle plug-in: gradle is a project construction tool, can be used for constructing Android engineering, and Gradle plug-ins are scripts which are realized based on Gradle and can help developers to improve development efficiency and expand functions.
4. Annotation: is a special modifier applied in class, method, parameter, variable, constructor or package declaration, and is a tool used to describe metadata. Custom annotations are annotations written by the developer by itself with meta-annotations, except for built-in annotations in the system. In general, annotations are used to inform developers of the logic, description, characteristics, etc. of code, and can be written arbitrarily without limitation; at compile time, annotations may be ignored entirely by the compiler. Annotation is the notification of metadata of elements such as class, method, parameters, variables, constructors or packages to JAVA virtual machines by labeling these elements, which generally start with "@" and have strict restrictions on location, grammar, content, and if any error occurs, an exception will be displayed during compilation.
5. An interface: the interface is an abstract object provided by an entity to the outside, and is used for separating an external communication method by internal operation, so that the external communication method can be modified internally without influencing the interaction mode of other external entities, the interface has a corresponding implementation class, and the interface implementation class is a specific implementation interface method.
6. Android (Android): android is a mobile operating system based on the Linux kernel and open source codes of other open source software.
7. Android system application (Android App): the Android App is an application program running on terminal equipment of an Android operating system, and can be written and developed by using Java language.
8. Java: java is a widely used computer programming language, has the characteristics of cross-platform, object-oriented and general programming, and is widely applied to enterprise-level Web application development and mobile application development.
9. And (3) groupwise: after the whole Application (APP) is split into different service components (Module) and a public interface component (Base Module), the service components have no dependency relationship with each other, but all depend on the public interface component at the same time, and when the service components are independently operated, each service component and the public interface component are packaged into an independent APP; when each service component is combined into a complete APP, each service Module and the common interface component are packaged together into an independent APP.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application. As shown in fig. 1, the system architecture may include a service server 100 and a terminal cluster, where the terminal cluster may include: terminal devices 200a, 200b, 200c, … …, 200n, and the like. The service server 100 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides a cloud database, a cloud service, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and basic cloud computing services such as a big data and an artificial intelligence platform. The terminal devices (including terminal device 200a, terminal device 200b, terminal devices 200c, … …, and terminal device 200 n) may be smart terminals such as tablet computers, smart phones, notebook computers, desktop computers, palm computers, wearable devices (e.g., smart watches, smart bracelets, etc.), smart televisions, smart vehicles, and the like. The service server 100 may establish communication connection with each terminal device in the terminal cluster, and may also establish communication connection between each terminal device in the terminal cluster. In other words, the service server 100 may establish a communication connection with each of the terminal apparatuses 200a, 200b, 200c, … …, 200n, for example, a communication connection may be established between the terminal apparatus 200a and the service server 100. A communication connection may be established between terminal device 200a and terminal device 200b, and a communication connection may also be established between terminal device 200a and terminal device 200 c. The communication connection is not limited to a connection manner, and may be directly or indirectly connected through a wired communication manner, or may be directly or indirectly connected through a wireless communication manner, and the like, and may be specifically determined according to an actual application scenario, which is not limited herein.
It should be understood that each terminal device in the terminal cluster as shown in fig. 1 may be installed with a service application, and the service server 100 may perform data interaction with each terminal device. For example, if the terminal device invokes the login component through the service application, the operation object may log in the account through the login component, and the service server 100 may store account information of the operation object login through the terminal device. When the service application runs in each terminal device, the terminal device can acquire a call request for any service component through the service application. The service application can comprise a plurality of service components, and each service component can be mutually called through the service application, so that the service application provides service of any service component for the terminal equipment. For convenience of description, the service application may be a social client with a payment function, that is, each terminal device may obtain a call request for any service component in the service application, and each terminal device may obtain, according to the call request, an interface class, an instance object, an implementation class, and the like associated with any service component from a common interface component. It should be appreciated that the implementation class is the content and interface class definition specification agreed in the implementation interface, and the implementation class may also determine how the interface class definition specification operates. The implementation class associated with any business component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class associated with any business component into the public interface component, so that the terminal equipment invokes any business component through the public interface component, and each business component provides business service for the terminal equipment. That is, the terminal device may obtain, through the service application, a call request of the first service component for the second service component, and the terminal device obtains, according to the call request, an interface class associated with the second service component from an interface declaration service included in the common interface component. Further, the terminal device invokes an instance object corresponding to the implementation class associated with the second service component from the interface management service included in the common interface component according to the interface class associated with the second service component, and invokes the implementation class of the second service component through the instance object to implement the service.
It should be appreciated that by centralizing the interface classes associated with each business component in an interface management service included by a common interface component, thereby enabling invocation of each business component, the degree of coupling between each business component may be reduced. Meanwhile, the instance objects corresponding to the implementation classes of the business components are registered into the interface management service included in the public interface component through the custom annotation, so that a technician can be prevented from manually completing the interface registration, the maintenance cost of the interface is reduced, and the development efficiency is improved.
Optionally, the processing procedure of the terminal device to obtain the interface class, the instance object and the like associated with any service component through the service application may also be executed by the service server 100. That is, the service server 100 may obtain a call request for any service component through the terminal device, and return, to the terminal device, an interface class, an instance object, and the like associated with any service component according to the call request. The service server 100 may be a server of a service application, and may be a collection of a plurality of servers including a background server, a data processing server, and the like, which correspond to the service application. The business application may be an independent client, or may be an embedded sub-client integrated in a certain client (for example, the social client, etc.), which may be specifically determined according to an actual application scenario, and is not limited herein.
It will be appreciated that in the specific embodiments of the present application, related data such as user information is referred to, and when the embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with relevant laws and regulations and standards of the relevant region.
It can be appreciated that the data processing method provided in the embodiment of the present application is applicable to service applications based on a service component including a plurality of service components. It will be appreciated that terminal devices to which the above data processing method is applicable include, but are not limited to, smartphones, computers, tablet computers, personal digital assistants (personal digital assistant, PDA), mobile internet devices (mobile Internet device, MID), wearable devices, and the like. Optionally, the terminal device may also be the smart phone, the computer, the tablet pc, the PDA, the MID, a server corresponding to the wearable device, or the like, which may be specifically determined according to an actual application scenario, and is not limited herein. Correspondingly, the data processing device provided by the embodiment of the application comprises, but is not limited to, a smart phone, a computer, a tablet computer, a PDA, an MID, a wearable device and the like. For convenience of description, the data processing device and/or the terminal device provided in the embodiments of the present application will be described by taking a smart phone (or simply referred to as a mobile phone) as an example.
Referring to fig. 2, fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application. For ease of understanding, the embodiments of the present application will be described by taking a terminal device as an example, that is, the terminal device 200b in fig. 1 as an example. The embodiments of the present application may be applied to various scenarios including, but not limited to, cloud technology, artificial intelligence, software development, and the like. In the data processing method shown in fig. 2, various steps of the data processing method may be performed by the terminal device 200b in fig. 1 described above, and as shown in fig. 2, the data processing method may include at least the following steps S101 to S103.
Step S101, in the operation stage, acquiring a call request of a first service component in a service application for a second service component; the service application comprises N service components and a public interface component which is respectively connected with the N service components; the N business components comprise a first business component and a second business component; the N business components are used for providing business services for business applications; the common interface component is used for providing service component calling functions among the N service components.
In some possible embodiments, please refer to fig. 3, fig. 3 is a schematic diagram of a scenario of a data processing method according to an embodiment of the present application. The end user (i.e., the operation object) can invoke the business component through the business application loaded on the terminal device, thereby realizing the business service. The interfaces 1, 2, 3, 4 and 5 shown in fig. 3 may be interfaces of business applications at different moments. As shown in interface 1, the terminal device may call different service components through the service application to provide different services for the operation object, for example, the terminal device may call an "address book" component through the service application to display related information of any contact person in the address book, such as head portrait, personal homepage, name, etc., to the operation object. The terminal device may also invoke other business components through the "more" control 201a shown in interface 1. For example, when the operation object needs to complete the payment task through the service application (such as the social client described above), the operation object may jump to the interface 2 by clicking the "more" control 201a shown in the interface 1, i.e. when the terminal device detects that the clicking position of the operation object on the interface 1 is the "more" control 201a, the terminal device will jump to the interface 2. Further, when the terminal device detects an object operation instruction for the "pay-and-pay" control 201b shown in the interface 2, the terminal device invokes the payment component through the service application to complete the payment task. It should be understood that when the operation object does not log in the account in the service application, the payment task cannot be completed, and the terminal device jumps to the interface 3, and the operation object may input the account number (account 1 as shown in fig. 3) and the password of the operation object on the interface 3, so as to authorize the login of the service application, so that the terminal device obtains the user information of the operation object. Specifically, when the operation object inputs an account and a password, the terminal device may prompt the operation object to read information related to the user, for example, the operation object is prompted to read and learn "user protocol" and "privacy protocol" as illustrated in fig. 3, and when the operation object triggers the read control 201c, the terminal device may complete account verification by calling the "login" component. After the terminal equipment successfully logs in the service application, the terminal equipment can call the payment component to complete the payment task.
It should be understood that the terminal device may invoke the second service component through the first service component, and may invoke the first service component through the second service component, i.e. any service component may invoke other service components through a service application to implement different service services. It should be appreciated that a business application may contain multiple business components, and that different business components may provide different business services for the business application. The service components contained in the service application are class files, namely the class files corresponding to the service components contained in the service application can be modified according to service requirements so as to realize different service services.
In some possible embodiments, in the operation phase, the terminal device may obtain a call request of a first service component for a second service component in the service application. The service application may include N service components and a common interface component connected to the N service components respectively. The N business components include a first business component and a second business component. The public interface component is used for providing service component calling functions among the N service components.
Specifically, referring to fig. 4, fig. 4 is a schematic structural diagram of a data processing method according to an embodiment of the present application. As shown in fig. 4, the business application may include a payment component, a login component, and a common interface component connected to the payment component, the login component, respectively. In the operation stage, the terminal equipment can acquire a call request of a first service component in the service application for a second service component, namely, when an operation object needs to complete a payment task, the terminal equipment can acquire a call request of the payment component for a login component in the service application, so that the payment task is realized. Referring to fig. 3 again, after the operation object successfully logs in the service application, the terminal device displays a display interface of the service application, that is, an interface 5, to the operation object, where the interface 5 may include an interaction record, an address book, and a setting of the operation object, and further includes a "more" control 201a to invoke other service components to implement different service.
Step S102, obtaining the interface class associated with the second service component from the interface declaration service included in the public interface component according to the call request; the interface class associated with the second business component is used to represent the content of the business service of the second business component.
In some possible embodiments, the terminal device obtains the interface class associated with the second service component from an interface declaration service included in the common interface component in the service application according to the call request. The interfaces respectively associated with the N business components can be acquired through an interface declaration service. Specifically, referring to fig. 4 again, after the terminal device obtains a call request of the payment component for the login component from the service application, the terminal device may obtain, by using the service application, an interface class 2 associated with the login component from an interface declaration service included in the common interface component according to the call request. Wherein the interface class 2 associated with the login component is used for representing the content of the business service of the login component, such as the account of the login component for logging in the operation object.
Step S103, according to the interface class associated with the second service component, calling an instance object corresponding to the implementation class associated with the second service component from the interface management service included in the common interface component, and calling the implementation class of the second service component through the instance object to implement the service; the implementation class associated with the second business component is used for implementing business services of the second business component; the implementation class associated with the second service component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class into the interface management service.
In some possible embodiments, the terminal device may invoke, according to the interface class associated with the second service component, an instance object corresponding to the implementation class associated with the second service component from the interface management service included in the common interface component through the service application, and invoke, through the instance object, the implementation class of the second service component to implement the service. Referring to fig. 4 again, according to the interface class 2 associated with the login component, the terminal device may invoke, by the service application, an instance object 2 corresponding to the implementation class 2 associated with the login component from the interface management service included in the common interface component, and invoke, by the instance object 2, the implementation class 2 of the login component to implement the service. As shown in fig. 4, the instance object list in the interface management service may include an instance object 1 corresponding to an implementation class 1 associated with the payment component and an instance object 2 corresponding to an implementation class 2 associated with the login component. Referring to fig. 5, fig. 5 is a first data communication flow chart of a data processing method according to an embodiment of the present application. As shown in fig. 5, when the terminal device needs to call the login component through the payment component, the terminal device may call a management interface (such as a gettingface interface) in the interface management service, and transfer the interface class 2 associated with the login component into the management interface. It should be understood that, the management interface is configured to obtain, according to an interface class associated with any service component, an instance object corresponding to the interface class associated with any service component, that is, the management interface may obtain, according to an interface class 2 associated with the login component, an instance object 2 corresponding to the interface class 2.
Further, the terminal device may determine an instance object corresponding to the interface class according to the interface class associated with the second service component by managing an instance object list in the interface management service, call an implementation class associated with the second service component from the instance object list through the instance object, and call the service of the second service component through the implementation class. The instance object list comprises instance objects corresponding to the implementation classes associated with the N business components. Specifically, the terminal device transmits the interface class 2 associated with the login component to the management interface, traverses an instance object list in the interface management service through the management interface, and determines the instance object 2 corresponding to the interface class 2 from the instance object list according to the interface class 2 associated with the login component. The terminal equipment can call the realization class 2 associated with the login component through the instance object 2, so that the business service of the login component is called through the realization class 2, and the login service is provided for the operation object. The implementation classes associated with the N business components carry custom notes, and the custom notes are used for registering instance objects corresponding to the implementation classes into the interface management service. That is, the implementation class associated with the login component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class associated with the login component in an instance object list in the interface management service, so that the terminal device can call the login component to realize the business service.
In the embodiment of the application, the data processing method can provide service component calling functions among a plurality of service components, and centralize interface classes associated with the service components in service application in a common interface component, so that the coupling degree among the service components can be reduced. Meanwhile, the instance objects corresponding to the implementation classes of the business components are registered into the interface management service included in the public interface component through the custom annotation, so that a technician can be prevented from manually completing the interface registration, the maintenance cost of the interface is reduced, and the development efficiency is improved.
Referring to fig. 6, fig. 6 is a second flowchart of a data processing method according to an embodiment of the present application. Before the terminal device invokes the service components through the service application, the processing such as annotating the implementation class associated with each service component through the section-oriented programming (i.e. AOP programming) in the packaging compiling stage is also required, and as shown in fig. 6, the data processing method at least may include the following steps S201 to S204.
Step S201, N business components and interface classes and implementation classes respectively associated with the N business components are obtained.
In some possible implementations, please refer to fig. 7, fig. 7 is a second data communication flow chart of the data processing method provided in the embodiment of the present application. As shown in fig. 7, in the packing and compiling stage, the terminal device may obtain N service components in the service response and interface classes and implementation classes respectively associated with the N service components. The interface classes respectively associated with the N business components are used for representing the content of the business services of the N business components, and the implementation classes respectively associated with the N business components are used for the business services of the N business components. For example, the terminal device may acquire interface class 1 and implementation class 1 associated with the payment component as shown in fig. 4, and interface class 2 and implementation class 2 associated with the login component; the N business components may include a payment component and a login component.
Step S202, generating an interface declaration service in a public interface component based on the interface class associated with the N business components; the interface class is used for calling an instance object corresponding to the implementation class associated with the business component in the operation stage.
In some possible embodiments, as shown in fig. 7, the terminal device may generate the interface declaration service in the common interface component based on the interface class associated with the N business components. The interface classes associated with the N business components are used for calling the instance objects corresponding to the implementation classes associated with the business components in the operation stage, so that the business services of the N business components are realized. For example, as shown in fig. 4, the terminal device may generate an interface declaration service in the common interface component based on the payment component-associated interface class 1 and the login component-associated interface class 2. The terminal equipment can acquire the interface class associated with the payment component or the login component from the interface declaration service, and call the business component associated with the interface class through the interface class associated with the payment component or the login component to realize the payment service or the login service.
In step S203, in the packaging and compiling stage, the source code associated with the service application is intercepted by the compiling and packaging tool, and a first format class set included in the source code is obtained, where the first format class set includes N implementation classes.
In some possible embodiments, the terminal device may intercept, in a packaging compiling stage, source code associated with the service application through a packaging compiling tool, and obtain a first set of format classes included in the source code. Wherein the first set of format classes includes N implementation classes. Specifically, as shown in fig. 7, the terminal device may intercept, through a packaging and compiling tool (such as a Gradle plugin), a source code associated with a service application, and the terminal device may invoke a Transform interface in the Gradle plugin to obtain a first format class set included in the source code. The first format class set is all first format classes included in the service application, namely, the first format class set includes implementation class 1 associated with the payment component and implementation class 2 associated with the login component. It should be understood that the packing and compiling tool may traverse and read class files in the service application, where in the source code corresponding to the service application, there are multiple places in the class files, for example, class files generated by java source code, class files in jar (various SDKs) and aar files, etc., and the entrance of the packing and compiling tool may collect these class files together uniformly, each class file is read only once, and the read class files may be sequentially processed according to the AOP Handler processing chain in AOP programming until all class files are traversed.
Step S204, processing the first format class set through a section-oriented tool to obtain a target format class carrying a user-defined annotation, and registering the target format class into an interface management service in a public interface component; the association relation between the target format class and the custom annotation is obtained by annotating N implementation classes through the custom annotation.
In some possible embodiments, the terminal device may process the first format class set through a facet-oriented tool to obtain a target format class carrying a custom annotation, and register the target format class into an interface management service in the common interface component. The tangent plane-oriented tool may be a javaist compiling tool, which is configured to perform format conversion on the first format class set, and convert each first format class in the first format class set into a second format class applicable to AOP programming. The user-defined annotation is preset annotation, and an annotation life cycle and an annotation object are set. The annotation life cycle is used for declaring the custom annotation in the packing compiling stage, namely the custom annotation is only used in the packing compiling stage, and the custom annotation is not run in other stages (such as a running stage). The annotation object is used to state that the N business component associated implementation classes are annotated. It should be appreciated that annotations are typically a code-level specification that may be declared in front of packages, classes, fields, methods, local variables, methods, etc., for purposes of illustration and annotation, but do not directly affect the semantics of the program. The form of the annotation is typically "@ annotation name.
Specifically, as shown in fig. 7, the terminal device may convert the first format class set into the second format class set applicable to the section-oriented tool through the section-oriented tool, that is, the terminal device may perform format conversion on each class file included in the first format class set through the javaist compiling tool, to obtain the ctclass file. The class files are all first format classes included in the first format class set, the terminal equipment can convert all the first format classes with the format files being class files into all the second format classes with the format files being ctclass files through a Javascssast compiling tool, and the second format class set is obtained according to all the second format classes.
Further, the terminal equipment identifies N second format classes carrying the custom annotations from the second format class set through a section-oriented tool, and determines the N second format classes as target format classes. The association relation between the target format class and the custom annotation is obtained by annotating N implementation classes through the custom annotation. As shown in fig. 7, the terminal device may identify the ctclass file carrying the custom annotation through the javaist compiling tool, and determine the ctclass file carrying the custom annotation as the target format class. The terminal equipment can transmit the custom annotation into the service interface associated with each second format class in the second format class set through the Javascssast compiling tool, and the second format class of the annotation object corresponding to the custom annotation returned by the service interface is determined to be the target format class according to the reflection mechanism. Specifically, the terminal device transmits the custom annotation to a service interface (a gateway interface) associated with each second format class, each second format class traverses an annotation list according to the custom annotation, if the annotation list contains the custom annotation, the custom annotation is instantiated to obtain an annotation object corresponding to the custom annotation, the annotation object is returned to the service interface, and the terminal device determines the second format class returned to the annotation object as a target format class. For example, the terminal device transmits the custom annotation to the associated service interface of the second format class associated with the payment component (the second format class associated with the payment component at this time is obtained by converting the format of the implementation class associated with the payment component), receives an annotation object corresponding to the custom annotation according to the reflection mechanism, and determines the second format class associated with the payment component as the target format class. The process of determining the second format class associated with the login component as the target format class is similar to the process of determining the second format class associated with the payment component as the target format class, and is not described in detail herein.
Further, as shown in fig. 7, the terminal device may instantiate the target format class through a javaist compiling tool to obtain an instance object corresponding to the target format class, and register the instance object to an instance object list in the interface management service. Specifically, the terminal device instantiates the target format class associated with the payment component to obtain an instance object 1 corresponding to the target format class associated with the payment component, and instantiates the target format class associated with the login component to obtain an instance object 2 corresponding to the target format class associated with the login component. Further, the terminal device registers an instance object 1 corresponding to the target format class associated with the payment component and an instance object 2 corresponding to the target format class associated with the login component into an instance object list in the interface management service.
In some possible embodiments, when the operation object needs to add a third service component to the service components, the implementation class associated with the third service component may be annotated according to the custom annotation. Specifically, the terminal device may acquire an interface class and an implementation class associated with the third service component, and add the interface class associated with the third service component to the interface declaration service in the common interface component. The terminal equipment can instantiate the implementation class associated with the third service component through AOP programming to obtain an instance object corresponding to the implementation class associated with the third service component, and register the instance object corresponding to the implementation class associated with the third service component into an instance object list in the interface management service. At this time, the terminal device may call the third service component through the service application to implement the service of the third service component.
In the embodiment of the application, the terminal equipment concentrates the interface class associated with each service component in the interface declaration service in the public interface component, so that the call of each service component is realized, and the coupling degree between each service component can be reduced because no dependency relationship exists between each service component. Meanwhile, according to the form of annotating the implementation class associated with each service component by the user-defined annotation, the terminal equipment registers the instance object corresponding to the implementation class associated with each service component in the interface management service in the public interface component, and the interface registration of each service component is realized by means of injection, so that the instance object corresponding to the implementation class associated with each service component is automatically registered in the interface management service, thereby avoiding that a technician manually completes the interface registration, reducing the maintenance cost of the interface and improving the development efficiency.
Based on the above description of the embodiments of the data processing method, the embodiments of the present application also disclose a data processing apparatus 1. Referring to fig. 8, fig. 8 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. In the embodiment of the application, the device can operate the following modules:
A first obtaining module 11, configured to obtain, in an operation phase, a call request of a first service component for a second service component in a service application; the service application comprises N service components and a public interface component which is respectively connected with the N service components; the N business components comprise a first business component and a second business component; the N business components are used for providing business services for business applications; the public interface component is used for providing service component calling functions among the N service components;
a second obtaining module 12, configured to obtain, according to the call request, an interface class associated with the second service component from an interface declaration service included in the common interface component; the interface class associated with the second business component is used for representing the content of business services of the second business component;
the first calling module 13 is configured to call, according to the interface class associated with the second service component, an instance object corresponding to an implementation class associated with the second service component from the interface management service included in the common interface component, and implement a service by calling the implementation class of the second service component through the instance object; the implementation class associated with the second business component is used for implementing business services of the second business component; the implementation class associated with the second service component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class into the interface management service.
The first calling module 13 includes:
the first calling unit 131 is configured to call a management interface in the interface management service, and transfer an interface class associated with the second service component into the management interface;
the first processing unit 132 is configured to traverse, through the management interface, an instance object list in the interface management service, determine an instance object corresponding to the interface class according to an interface class associated with the second service component, call, through the instance object, an implementation class associated with the second service component from the instance object list, and call, through the implementation class, a service of the second service component; the instance object list comprises instance objects corresponding to the implementation classes associated with the N business components.
Wherein, the device further includes:
a third obtaining module 14, configured to obtain N service components and interface classes and implementation classes respectively associated with the N service components;
a first generating module 15, configured to generate an interface declaration service in a common interface component based on interface classes associated with N service components; the interface class is used for calling an instance object corresponding to the implementation class associated with the service component in the operation stage;
a fourth obtaining module 16, configured to obtain, in a packaging and compiling stage, a first format class set included in a source code by intercepting, by a compiling and packaging tool, a source code associated with a service application, where the first format class set includes N implementation classes;
The first processing module 17 is configured to process the first format class set through a facet-oriented tool to obtain a target format class carrying a custom annotation, and register the target format class into an interface management service in the common interface component; the association relation between the target format class and the custom annotation is obtained by annotating N implementation classes through the custom annotation.
Wherein, the custom annotation comprises an annotation life cycle and an annotation object; the annotation lifecycle is used for declaring that the custom annotation exists in the packaging compiling stage; the annotation object is used to state that the N business component associated implementation classes are annotated.
Wherein the first processing module 17 includes:
the second processing unit 171 is configured to convert the first format class set into a second format class set applicable to the surface-oriented tool through the surface-oriented tool;
a third processing unit 172, configured to identify, by a tangent plane oriented tool, N second format classes carrying custom annotations from the second format class set, and determine the N second format classes as target format classes;
the fourth processing unit 173 is configured to instantiate the target format class to obtain an instance object corresponding to the target format class, and register the instance object to an instance object list in the interface management service.
Wherein the third processing unit 172 includes:
the first processing subunit 1721 is configured to transmit, through the facet-oriented tool, the custom annotation to a service interface associated with each second format class in the second format class set, and determine, according to a reflection mechanism, a second format class of an annotation object corresponding to the custom annotation returned by the service interface as a target format class.
According to the above-described embodiment corresponding to fig. 2, the implementation described in steps S101 to S103 in the data processing method shown in fig. 2 may be performed by each module of the apparatus shown in fig. 8. For example, the implementation described in step S101 in the data processing method shown in fig. 2 may be performed by the first acquisition module 11 in the apparatus shown in fig. 8, the implementation described in step S102 may be performed by the second acquisition module 12, and the implementation described in step S103 may be performed by the first calling module 13. The implementation manners performed by the first acquiring module 11, the second acquiring module 12, and the first invoking module 13 may refer to the implementation manners provided by the steps in the embodiment corresponding to fig. 2, and are not described herein again.
In the embodiment of the application, the terminal equipment can realize the inter-calling function between any business components through the business application, so that the business components provide business services for the business application. The business application comprises N business components and common interface components which are respectively connected with the N business components, a first business component in the business application can call an interface class of a second business component through an interface declaration service in the common interface components, and an instance object corresponding to an implementation class associated with the second business component is called from an interface management service included in the common interface components according to the interface class associated with the second business component. Further, the implementation class associated with the second business component can be invoked by the instance object, thereby implementing the business service of the second business component. The second business component carrying the custom annotation can register the instance object corresponding to the implementation class into the interface management service. It should be appreciated that by centralizing the interface classes associated with the N service components in the interface management service included in the common interface component, thereby implementing the invocation of each service component, the degree of coupling between each service component may be reduced. Meanwhile, the instance objects corresponding to the implementation classes of the business components are registered into the interface management service included in the public interface component through the custom annotation, so that a technician can be prevented from manually completing the interface registration, the maintenance cost of the interface is reduced, the development efficiency is improved, the cost is low, and the applicability is strong.
In the embodiment of the present application, each module in the apparatus shown in the foregoing figures may be combined into one or several other modules separately or all, or some (some) of the modules may be further split into a plurality of modules with smaller functions to form a module, which may implement the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above modules are divided based on logic functions, and in practical application, the functions of one module may be implemented by a plurality of modules, or the functions of a plurality of modules may be implemented by one module. In other possible implementations of the present application, the apparatus may also include other modules, where in practical applications, these functions may also be implemented with assistance from other modules, and may be implemented by cooperation of multiple modules, where no limitation is placed on this.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computer device provided in an embodiment of the present application, where the computer device may be a terminal device or a server. The computer device 1000 may include: processor 1001, network interface 1004, and memory 1005, and in addition, the above-described computer device 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. In some embodiments, the user interface 1003 may include a Display (Display), a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. Alternatively, the network interface 1004 may 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 (non-volatile memory), such as at least one disk memory. Optionally, the memory 1005 may also be at least one memory device located remotely from the aforementioned processor 1001. As shown in fig. 9, an operating system, a network communication module, a user interface module, and a device control application may be included in a memory 1005, which is one type of computer-readable storage medium.
In the computer device 1000 shown in FIG. 9, the network interface 1004 may provide network communication functions; while user interface 1003 is primarily used as an interface for providing input to a user; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
in the operation stage, acquiring a call request of a first service component in the service application for a second service component; the service application comprises N service components and a public interface component which is respectively connected with the N service components; the N business components comprise a first business component and a second business component; the N business components are used for providing business services for business applications; the public interface component is used for providing service component calling functions among the N service components;
acquiring an interface class associated with the second service component from an interface declaration service included in the common interface component according to the call request; the interface class associated with the second business component is used for representing the content of business services of the second business component;
according to the interface class associated with the second service component, invoking an instance object corresponding to the implementation class associated with the second service component from the interface management service included in the common interface component, and invoking the implementation class of the second service component through the instance object to realize service; the implementation class associated with the second business component is used for implementing business services of the second business component; the implementation class associated with the second service component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class into the interface management service.
It should be understood that the computer device 1000 described in the embodiments of the present application may perform the description of the data processing method in the embodiments corresponding to fig. 2 and 6, and may also perform the description of the data processing apparatus in the embodiments corresponding to fig. 8, which are not described herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores a computer program executed by the aforementioned data processing apparatus, and when the processor executes the computer program, the description of the data processing method in the embodiment corresponding to fig. 2 and fig. 6 can be executed, so that a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application. As an example, a computer program may be deployed to be executed on one computer device or on multiple computer devices at one site or on multiple computer devices distributed across multiple sites and interconnected by a communication network, where the multiple computer devices distributed across multiple sites and interconnected by a communication network may constitute a communication system.
In addition, it should be noted that: embodiments of the present application also provide a computer program product, which may include a computer program, which may be stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer readable storage medium, and the processor may execute the computer program, so that the computer device may execute the description of the data processing method in the embodiment corresponding to fig. 2 and fig. 6, which is not described herein. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer program product according to the present application, reference is made to the description of the embodiments of the method according to the present application.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The terms first, second and the like in the description and in the claims and drawings of the embodiments of the present application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or device that comprises a list of steps or elements is not limited to the list of steps or modules but may, in the alternative, include other steps or modules not listed or inherent to such process, method, apparatus, article, or device.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The methods and related devices provided in the embodiments of the present application are described with reference to the method flowcharts and/or structure diagrams provided in the embodiments of the present application, and each flowchart and/or block of the method flowcharts and/or structure diagrams may be implemented by a computer program, and combinations of flowcharts and/or blocks in the flowchart and/or block diagrams. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or structural diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or structures.
The foregoing disclosure is only illustrative of the preferred embodiments of the present application and is not intended to limit the scope of the claims herein, as the equivalent of the claims herein shall be construed to fall within the scope of the claims herein.

Claims (9)

1. A method of data processing, the method comprising:
acquiring N service components and interface classes and implementation classes respectively associated with the N service components;
generating an interface declaration service in a public interface component based on the interface class associated with the N business components; the interface class is used for calling an instance object corresponding to the implementation class associated with the service component in the operation stage;
in a packaging and compiling stage, intercepting a source code associated with a service application through a compiling and packaging tool, and acquiring a first format class set contained in the source code, wherein the first format class set comprises N implementation classes;
processing the first format class set through a tangent plane-oriented tool to obtain a target format class carrying a custom annotation, and registering the target format class into an interface management service in the public interface component; the association relation between the target format class and the custom annotation is obtained by annotating the N implementation classes through the custom annotation;
In the operation stage, acquiring a call request of a first service component in the service application for a second service component; the service application comprises N service components and a public interface component which is respectively connected with the N service components; the N business components comprise the first business component and the second business component; the N business components are used for providing business services for the business applications; the public interface component is used for providing service component calling functions among the N service components;
acquiring an interface class associated with the second service component from an interface declaration service included in the common interface component according to the call request; the interface class associated with the second business component is used for representing the content of business services of the second business component;
according to the interface class associated with the second service component, invoking an instance object corresponding to the implementation class associated with the second service component from interface management services included in the common interface component, and invoking the implementation class of the second service component through the instance object to implement service; the implementation class associated with the second business component is used for implementing business services of the second business component; and the implementation class associated with the second business component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class into the interface management service.
2. The data processing method according to claim 1, wherein the calling, from the interface management service included in the common interface component, an instance object corresponding to an implementation class associated with the second service component according to the interface class associated with the second service component, the implementation class of the second service component through the instance object to implement the service includes:
invoking a management interface in the interface management service, and transmitting the interface class associated with the second service component into the management interface;
traversing an instance object list in the interface management service through the management interface, determining an instance object corresponding to the interface class according to the interface class associated with the second service component, calling an implementation class associated with the second service component through the instance object, and calling the service of the second service component through the implementation class; the instance object list comprises instance objects corresponding to the implementation classes associated with the N business components.
3. The data processing method of claim 1, wherein the custom annotations include annotation lifecycles and annotation objects; the annotation lifecycle is used to declare that the custom annotation exists at the packaging compilation stage; the annotation object is used for declaring to annotate the implementation class associated with the N business components.
4. The data processing method according to claim 1, wherein the processing the first set of format classes by a facet oriented tool to obtain a target format class carrying the custom annotation, and registering the target format class in the interface management service in the common interface component includes:
converting the first format class set into a second format class set applicable to the face-to-face tool through the face-to-face tool;
identifying N second format classes carrying the custom annotations from the second format class set through the section-oriented tool, and determining the N second format classes as target format classes;
and instantiating the target format class to obtain an instance object corresponding to the target format class, and registering the instance object into an instance object list in the interface management service.
5. The data processing method of claim 4, wherein the identifying, by the facet-oriented tool, N second format classes from the second set of format classes that carry the custom annotation, the N second format classes being determined to be target format classes, comprises:
And transmitting the custom annotation into a service interface associated with each second format class in the second format class set through the section-oriented tool, and determining the second format class of the annotation object corresponding to the custom annotation returned by the service interface as the target format class according to a reflection mechanism.
6. A data processing apparatus, comprising:
the third acquisition module is used for acquiring N service components and interface classes and implementation classes respectively associated with the N service components;
the first generation module is used for generating an interface statement service in the public interface component based on the interface class associated with the N business components; the interface class is used for calling an instance object corresponding to the implementation class associated with the service component in the operation stage;
the fourth acquisition module is used for acquiring a first format class set included in the source code by intercepting the source code associated with the service application through a compiling and packaging tool in a packaging and compiling stage, wherein the first format class set comprises N implementation classes;
the first processing module is used for processing the first format class set through a tangent plane-oriented tool to obtain a target format class carrying a user-defined annotation, and registering the target format class into an interface management service in the public interface component; the association relation between the target format class and the custom annotation is obtained by annotating N implementation classes through the custom annotation;
The first acquisition module is used for acquiring a call request of the first service component for the second service component in the service application in the operation stage; the service application comprises N service components and a public interface component which is respectively connected with the N service components; the N business components comprise the first business component and the second business component; the N business components are used for providing business services for the business applications; the public interface component is used for providing service component calling functions among the N service components;
the second obtaining module is used for obtaining the interface class associated with the second service component from the interface declaration service included in the public interface component according to the call request; the interface class associated with the second business component is used for representing the content of business services of the second business component;
the first calling module is used for calling an instance object corresponding to an implementation class associated with the second business component from interface management services included in the public interface component according to the interface class associated with the second business component, and calling the implementation class of the second business component through the instance object to realize business services; the implementation class associated with the second business component is used for implementing business services of the second business component; and the implementation class associated with the second business component carries a custom annotation, and the custom annotation is used for registering an instance object corresponding to the implementation class into the interface management service.
7. A computer device, comprising: a processor, a memory, and a network interface;
the processor is connected to the memory, the network interface for providing data communication functions, the memory for storing program code, the processor for invoking the program code to perform the method of any of claims 1-5.
8. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program adapted to be loaded by a processor and to perform the method of any of claims 1-5.
9. A computer program product, characterized in that the computer program product comprises a computer program stored in a computer readable storage medium and adapted to be read and executed by a processor to cause a computer device with the processor to perform the method of any of claims 1-5.
CN202311310183.2A 2023-10-11 2023-10-11 Data processing method, device, equipment and computer readable storage medium Active CN117056317B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311310183.2A CN117056317B (en) 2023-10-11 2023-10-11 Data processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311310183.2A CN117056317B (en) 2023-10-11 2023-10-11 Data processing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN117056317A CN117056317A (en) 2023-11-14
CN117056317B true CN117056317B (en) 2024-01-26

Family

ID=88669622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311310183.2A Active CN117056317B (en) 2023-10-11 2023-10-11 Data processing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117056317B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338828A (en) * 2020-03-24 2020-06-26 广州华多网络科技有限公司 Terminal equipment and application program interface calling control method thereof
CN111400070A (en) * 2020-03-24 2020-07-10 广州华多网络科技有限公司 Terminal equipment and cross-process interface calling implementation and execution method thereof
CN114217787A (en) * 2021-12-13 2022-03-22 网易(杭州)网络有限公司 Development method and device of modular application program and storage medium
WO2023098241A1 (en) * 2021-12-03 2023-06-08 深圳前海微众银行股份有限公司 Request processing method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338828A (en) * 2020-03-24 2020-06-26 广州华多网络科技有限公司 Terminal equipment and application program interface calling control method thereof
CN111400070A (en) * 2020-03-24 2020-07-10 广州华多网络科技有限公司 Terminal equipment and cross-process interface calling implementation and execution method thereof
WO2023098241A1 (en) * 2021-12-03 2023-06-08 深圳前海微众银行股份有限公司 Request processing method and apparatus
CN114217787A (en) * 2021-12-13 2022-03-22 网易(杭州)网络有限公司 Development method and device of modular application program and storage medium

Also Published As

Publication number Publication date
CN117056317A (en) 2023-11-14

Similar Documents

Publication Publication Date Title
US20210149648A1 (en) System and a method for automating application development and deployment
US11816492B2 (en) Third party integration of plugins and widgets
TWI767182B (en) H5-Based Access Components and Mobile Terminals
US8875106B2 (en) Automated testing process
US11042387B2 (en) Deploying cross-platform applications on mobile devices with native and web components
US10296297B2 (en) Execution semantics for sub-processes in BPEL
CN110865889B (en) Method and device for transmitting event between components
KR20160060023A (en) Method and apparatus for code virtualization and remote process call generation
CN117093286B (en) Plug-in generation method, device, equipment and computer readable storage medium
US10474479B1 (en) Preventing framework conflicts for multi-OS applications
CN113688186B (en) Intelligent contract execution method, engine and block link point
US9552239B2 (en) Using sub-processes across business processes in different composites
US20190212990A1 (en) Framework for generating adapters in an integrated development environment
CN109062714A (en) The method, apparatus and electronic equipment of long-range control Android device
US10606569B2 (en) Declarative configuration elements
CN117056317B (en) Data processing method, device, equipment and computer readable storage medium
US11803786B2 (en) Enterprise integration platform
US11977652B2 (en) Secure compartmented access infrastructure for sensitive databases
EP2828746A1 (en) Methods of distributing a computer program product, and a computer system
CN111506301B (en) Method for bypassing system restriction reflection call and related equipment
CN117389567A (en) Multi-terminal application development method, device, medium and equipment
He Type-parameterized actors and their supervision
CN116166452A (en) White list processing method and device for remote procedure call
CN118043804A (en) Obfuscating exposed public APIs from a software library
CN117389829A (en) Measuring method and device of computing power resource, electronic equipment and readable storage medium

Legal Events

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