Lightweight component bus implementation method, device, electronic device and medium

By setting up the component bus manager in the IOS platform, managing each business component and obtaining its service protocol call table, the routing manager bloated and complexity caused by strong coupling between components is solved, and the efficiency of component service call is improved.

CN114253525BActive Publication Date: 2025-02-14PING AN SECURITIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111567483.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2025-02-14
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

In the IOS platform, due to the strong coupling between components, the router manager is bloated and complicated, affecting the efficiency of the component's service call.

Method used

By setting up a component bus manager in the system platform, managing each business component, reducing the coupling degree between components, and obtaining the service agreement call table of each business component through the component bus manager, and obtaining the service agreement call table of each business component based on the service agreement call table. Service category, and finally calls the service services of each service component through the preset component bus route.

Benefits of technology

It effectively reduces the coupling between business components, improves the efficiency of component service calls, and simplifies subsequent code maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114253525B_ABST
    Figure CN114253525B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of process optimization, and discloses a lightweight component bus implementation method, including: obtaining a preset system platform, and setting a component bus manager in the system platform; querying each business component in the system platform, obtaining a business component set, and connecting each business component to the component bus manager; obtaining the service protocol call table of each business component in the business component set through the component bus manager, and obtaining the service category corresponding to each business component according to each service protocol call table; calling the preset component bus route, and implementing the service business corresponding to the service category through the component bus route. The present invention also proposes a lightweight component bus implementation device, equipment and storage medium. The present invention also relates to blockchain technology, and the data to be transmitted can be stored in a blockchain node. The present invention can improve the service calling efficiency of components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of process optimization, and in particular to a method, device, electronic device and computer-readable storage medium for realizing a lightweight component bus. Background Art

[0002] In the iOS platform, since each component is directly connected to the bus, it often leads to strong coupling between components, resulting in bloated and complicated routing managers. Therefore, it is necessary to manage each component through a componentized solution.

[0003] The existing componentization solution can be implemented through protocols and routing managers, or through the CTMediator category method. In the first method, the routing manager will contain the routing list information of all business components, which is not conducive to subsequent maintenance. Creating a CTMediator category for each component will result in a large amount of code in large projects, and it is necessary to avoid category naming conflicts. There is also a certain cost for subsequent code maintenance, which reduces the service call efficiency of the component. Summary of the invention

[0004] The present invention provides a lightweight component bus implementation method, device, electronic device and computer-readable storage medium, the main purpose of which is to improve the service calling efficiency of the component.

[0005] To achieve the above object, the present invention provides a method for implementing a lightweight component bus, comprising:

[0006] Acquire a preset system platform, and set a component bus manager in the system platform;

[0007] Query each business component in the system platform to obtain a business component set, and connect each business component to the component bus manager;

[0008] Obtaining the service protocol call table of each business component in the business component set through the component bus manager, and obtaining the service category corresponding to each business component according to each service protocol call table;

[0009] A preset component bus route is called, and the service business corresponding to the service category is implemented through the component bus route.

[0010] Optionally, the implementing the service business corresponding to the service category through the component bus routing includes:

[0011] Obtaining a service type selector in the component bus routing;

[0012] Determining, by the service type selector, whether the service category is page-type routing processing or service-type routing processing;

[0013] When the service category is page class routing processing, dynamically setting routing parameters for the component bus routing is performed according to the service category to obtain a page class component bus routing;

[0014] Using the page class component bus routing to open the page corresponding to the service category;

[0015] When the service category is service class routing processing, dynamically setting routing parameters for the component bus routing according to the service category to obtain a service class component bus routing;

[0016] The service method corresponding to the service category is called through the service class component bus routing.

[0017] Optionally, the connecting each of the business components to the component bus manager includes:

[0018] Obtaining a component bus connection protocol in each business component in the business component set;

[0019] Each of the business components is connected to the component bus manager using a component bus connection protocol corresponding to each of the business components.

[0020] Optionally, the setting of a component bus manager in the system platform includes:

[0021] querying an information storage in the system platform, and obtaining configuration information for setting the component bus manager from the information storage;

[0022] A component bus manager is set in the system platform according to the configuration information.

[0023] Optionally, the connecting each of the business components to the component bus manager by using a component bus connection protocol corresponding to each of the business components includes:

[0024] Obtaining each of the business component view controllers through each of the component bus connection protocols, and obtaining each of the business component interfaces according to the view controllers corresponding to each of the business components;

[0025] The component bus manager calls the interface of each of the business components to connect the component bus manager and each of the business components.

[0026] Optionally, obtaining the service protocol call table of each business component in the business component set through the component bus manager includes:

[0027] Create a list call method in the component bus manager;

[0028] The interface of each of the business components is obtained, the list calling method is sent to the interface of each of the business components through the component bus manager, and the service protocol calling table of each of the business components is obtained by using the list calling method.

[0029] Optionally, acquiring the service category corresponding to each of the business components according to each of the service protocol call tables includes:

[0030] Acquire the first service calling information of the service protocol calling table of each of the business components;

[0031] The service category corresponding to the first service calling information is queried through a preset service relationship table.

[0032] In order to solve the above problems, the present invention also provides a lightweight component bus implementation device, the device comprising:

[0033] A manager setting module, used for receiving and acquiring a preset system platform, and setting a component bus manager in the system platform;

[0034] A component connection module, used to query each business component in the system platform, obtain a business component set, and connect each business component to the component bus manager;

[0035] A service category acquisition module, used to acquire a service protocol call table of each business component in the business component set through the component bus manager, and acquire a service category corresponding to each business component according to each service protocol call table;

[0036] The service business implementation module is used to call the preset component bus route and implement the service business corresponding to the service category through the component bus route.

[0037] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0038] at least one processor; and,

[0039] a memory communicatively connected to the at least one processor; wherein,

[0040] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the lightweight component bus implementation method as described above.

[0041] In order to solve the above problems, the present invention also provides a computer-readable storage medium, including a data storage area and a program storage area, the data storage area stores created data, and the program storage area stores a computer program; wherein, when the computer program is executed by a processor, the lightweight component bus implementation method as described above is implemented.

[0042] In an embodiment of the present invention, a component bus manager is set in a preset system platform, and each business component in the system platform is managed by the component bus manager to reduce the coupling between each business component. The service protocol call table in each business component is obtained by the component bus manager, and the service category corresponding to each business component is obtained according to the service protocol call table. Finally, the service business of the service category corresponding to each business component is called according to the preset component bus route, thereby avoiding interference in service calls caused by strong coupling between each business component and improving the service calling efficiency of the component. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic diagram of a flow chart of a method for implementing a lightweight component bus provided by an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of a module of a lightweight component bus implementation device provided by an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing a lightweight component bus implementation method provided by an embodiment of the present invention;

[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0048] The embodiment of the present application provides a lightweight component bus implementation method. The execution subject of the lightweight component bus implementation method includes but is not limited to at least one of the electronic devices such as the server, the terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. Among them, the server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. In other words, the lightweight component bus implementation method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0049] Reference Figure 1 FIG. 1 is a flow chart of a method for implementing a lightweight component bus according to an embodiment of the present invention. In this embodiment, the method for implementing a lightweight component bus includes:

[0050] S1. Obtain a preset system platform, and set a component bus manager in the system platform.

[0051] In the embodiment of the present invention, the system platform is an IOS system platform, which is a mobile operating system platform developed by Apple Inc., and can provide a system environment for running various software in the platform, including a hardware environment and a software environment. Furthermore, the system platform also provides a hardware architecture, an operating system, a runtime library, etc. of a smart device.

[0052] In the embodiment of the present invention, the component bus manager (CMBusNavigator) may also be referred to as a component bus controller, which is responsible for loading various business components into the APP project of the system platform, maintaining a business component list and providing an external calling interface, thereby playing a role in component integration.

[0053] Among them, the component is a business component, which is a well-encapsulated physical implementation unit with an identity and a well-defined interface. Specifically, it is a simple encapsulation of data and methods. The component can have properties and methods corresponding to the component. Furthermore, the properties are simple accessors to component data, and the methods are some simple and visible functions of the component.

[0054] Furthermore, the setting of the component bus manager in the system platform includes:

[0055] querying an information storage in the system platform, and obtaining configuration information for setting the component bus manager from the information storage;

[0056] A component bus manager is set in the system platform according to the configuration information.

[0057] In the embodiment of the present invention, the information storage device stores configuration information of each device in the system platform. The configuration information includes storage space, device port space, interface channels, etc. of the component bus manager. Furthermore, the component bus manager is set in the system platform through the interface channels, etc. in the configuration information.

[0058] In the embodiment of the present invention, the components in the system platform can be integrated and managed in a unified manner by setting a component bus manager.

[0059] S2. Query each business component in the system platform to obtain a business component set, and connect each business component to the component bus manager.

[0060] In the embodiment of the present invention, the business component set is a collection of all business components under the system platform.

[0061] In the embodiment of the present invention, the step of connecting each of the business components to the component bus manager includes:

[0062] Obtaining a component bus connection protocol in each business component in the business component set;

[0063] Each of the business components is connected to the component bus manager using a component bus connection protocol corresponding to each of the business components.

[0064] Furthermore, each of the service components and the component bus manager can be directly connected through each of the component bus connection protocols, thereby reducing the coupling between each of the service components.

[0065] In the embodiment of the present invention, the coupling between the business components is reduced to facilitate subsequent code maintenance, that is, maintenance of the code of a specific business component is performed without affecting other business components.

[0066] In another embodiment of the present invention, if there are multiple business components in the system platform and there is no component bus manager, then the business components in the system platform are directly connected, and the coupling between the business components is strong. If there are multiple business components in the system platform and there is a component bus manager, then the business components in the system are connected via the component bus manager, and the coupling between the business components is weak.

[0067] Furthermore, the connecting each of the business components to the component bus manager by using the component bus connection protocol corresponding to each of the business components includes:

[0068] Obtaining each of the business component view controllers through each of the component bus connection protocols, and obtaining each of the business component interfaces according to the view controllers corresponding to each of the business components;

[0069] The component bus manager calls the interface of each of the business components to connect the component bus manager and each of the business components.

[0070] In the embodiment of the present invention, the view controller (ViewController) is a bridge between application data and view, and in this embodiment, is used to obtain the interface of the business component.

[0071] S3. Obtaining the service protocol call table of each business component in the business component set through the component bus manager, and obtaining the service category corresponding to each business component according to each service protocol call table.

[0072] In the embodiment of the present invention, the service protocol call table is a protocol for clarifying the service category corresponding to each business component in the business component set.

[0073] In the embodiment of the present invention, the service category is the category of the service called by each business component, for example, calling a service of a certain page or performing a service of a certain operation in the system platform.

[0074] In the embodiment of the present invention, obtaining the service protocol call table of each business component in the business component set through the component bus manager includes:

[0075] Create a list call method in the component bus manager;

[0076] The interface of each of the business components is obtained, the list calling method is sent to the interface of each of the business components through the component bus manager, and the service protocol calling table of each of the business components is obtained by using the list calling method.

[0077] In the embodiment of the present invention, the list calling method is created in the component bus manager and is used to call the method of the list in each of the business components.

[0078] Further, acquiring the service category corresponding to each of the business components according to each of the service protocol call tables includes:

[0079] Acquire the first service calling information of the service protocol calling table of each of the business components;

[0080] The service category corresponding to the first service calling information is queried through a preset service relationship table.

[0081] In the embodiment of the present invention, after querying the service category corresponding to the first service call information through the preset service relationship table, the method further includes:

[0082] The first service calling information of the service protocol calling table is removed, the second service calling protocol of the service protocol calling table is obtained, and the second service calling information is used as the first service calling information.

[0083] In the embodiment of the present invention, the service relationship table queries a table of service categories of services called by the business component.

[0084] S4. Calling a preset component bus route, and implementing the service business corresponding to the service category through the component bus route.

[0085] In the embodiment of the present invention, the component bus routing (CMBusAavigator) is to implement the routing of the protocol in the business component, such as opening a page or calling a service. Wherein, the routing refers to the network-wide process of determining the end-to-end path when the packet goes from the source to the destination, and is a data packet forwarding device working at the third layer of the OSI reference system, that is, the network layer.

[0086] In the embodiment of the present invention, the implementing of the service business corresponding to the service category through the component bus routing includes:

[0087] Obtaining a service type selector in the component bus routing;

[0088] Determining, by the service type selector, whether the service category is page-type routing processing or service-type routing processing;

[0089] When the service category is page class routing processing, dynamically set routing parameters for the component bus routing according to the service category to obtain page class component bus routing;

[0090] Using the page class component bus routing to open the page corresponding to the service category;

[0091] When the service category is service class routing processing, dynamically setting routing parameters for the component bus routing according to the service category to obtain a service class component bus routing;

[0092] The service method corresponding to the service category is called through the service class component bus routing.

[0093] In the embodiment of the present invention, the service type selector is a device used to select a service type in the component bus routing.

[0094] In the embodiment of the present invention, the service category includes a page type service and a service type service, wherein the page type service is used to open a certain page in the system platform, and the service type service is used to call a specific service method in the system platform.

[0095] Furthermore, the dynamic parameter setting of the component bus route according to the service category is used to enable the component bus route after the parameter setting to call a specified service, thereby avoiding the route calling an erroneous service.

[0096] In an embodiment of the present invention, a component bus manager is set in a preset system platform, and each business component in the system platform is managed by the component bus manager to reduce the coupling between each business component. The service protocol call table in each business component is obtained by the component bus manager, and the service category corresponding to each business component is obtained according to the service protocol call table. Finally, the service business of the service category corresponding to each business component is called according to the preset component bus route, thereby avoiding interference in service calls caused by strong coupling between each business component and improving the service calling efficiency of the component.

[0097] like Figure 2 The figure shows a module diagram of a lightweight component bus implementation device of the present invention.

[0098] The lightweight component bus implementation device 100 of the present invention can be installed in an electronic device. According to the functions implemented, the lightweight component bus implementation device may include a data assembly module 101, a request object construction module 102, a transmission queue construction module 103 and a data transmission module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0099] In this embodiment, the functions of each module / unit are as follows:

[0100] The data assembly module 101 is used to receive a data transmission request, obtain data to be transmitted according to the data transmission request, and construct assembly data using the data to be transmitted;

[0101] A request object construction module 102, used to obtain the priority of the assembly data and construct a target request object according to the priority of the assembly data;

[0102] The transmission queue construction module 103 is used to add the target request object to the message subqueue of the preset message queue to obtain a data transmission queue, wherein the preset message queue includes multiple message subqueues, and the multiple message subqueues are implemented in a linked list structure;

[0103] The data transmission module 104 is used to transmit the data to be transmitted to the server end through the target request object in the data transmission queue.

[0104] In detail, each module described in the lightweight component bus implementation device 100 in the embodiment of the present invention is used in the same manner as described above. Figure 1 The lightweight component bus implementation method has the same technical means and can produce the same technical effects, so it will not be repeated here.

[0105] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a lightweight component bus implementation method according to the present invention.

[0106] The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a lightweight component bus implementation program.

[0107] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing lightweight component bus implementation programs, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0108] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the lightweight component bus implementation program, but also can be used to temporarily store data that has been output or is to be output.

[0109] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0110] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0111] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0112] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0113] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0114] The lightweight component bus implementation program stored in the memory 11 in the electronic device is a combination of multiple computer programs. When running in the processor 10, it can achieve:

[0115] Acquire a preset system platform, and set a component bus manager in the system platform;

[0116] Query each business component in the system platform to obtain a business component set, and connect each business component to the component bus manager;

[0117] Obtaining the service protocol call table of each business component in the business component set through the component bus manager, and obtaining the service category corresponding to each business component according to each service protocol call table;

[0118] A preset component bus route is called, and the service business corresponding to the service category is implemented through the component bus route.

[0119] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0120] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0121] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0122] Acquire a preset system platform, and set a component bus manager in the system platform;

[0123] Query each business component in the system platform to obtain a business component set, and connect each business component to the component bus manager;

[0124] Obtaining the service protocol call table of each business component in the business component set through the component bus manager, and obtaining the service category corresponding to each business component according to each service protocol call table;

[0125] A preset component bus route is called, and the service business corresponding to the service category is implemented through the component bus route.

[0126] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0127] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0128] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0129] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0130] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0131] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0132] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0133] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for implementing a lightweight component bus, characterized in that: The method is applied to a client and includes: Acquire a preset system platform, and set a component bus manager in the system platform; Querying each business component in the system platform to obtain a business component set, and obtaining a component bus connection protocol in each business component in the business component set, and connecting each business component to the component bus manager using the component bus connection protocol corresponding to each business component; Obtaining the service protocol call table of each business component in the business component set through the component bus manager, and obtaining the service category corresponding to each business component according to each service protocol call table; Calling a preset component bus route, obtaining a service type selector in the component bus route, and determining whether the service category is page class route processing or service class route processing through the service type selector; When the service category is page class routing processing, dynamically setting routing parameters of the component bus routing according to the service category obtains page class component bus routing, and using the page class component bus routing to open a page corresponding to the service category; When the service category is service class routing processing, the component bus routing is dynamically set with routing parameters according to the service category to obtain a service class component bus routing, and the service method corresponding to the service category is called through the service class component bus routing.

2. The method for implementing a lightweight component bus according to claim 1, characterized in that: The step of setting a component bus manager in the system platform includes: querying an information storage in the system platform, and obtaining configuration information for setting the component bus manager from the information storage; A component bus manager is set in the system platform according to the configuration information.

3. The method for implementing a lightweight component bus according to claim 1, characterized in that: The connecting each of the business components to the component bus manager by using the component bus connection protocol corresponding to each of the business components includes: Obtaining each of the business component view controllers through each of the component bus connection protocols, and obtaining each of the business component interfaces according to the view controllers corresponding to each of the business components; The component bus manager calls the interface of each of the business components to connect the component bus manager and each of the business components.

4. The method for implementing a lightweight component bus according to claim 1, wherein: The obtaining, through the component bus manager, a service protocol call table of each business component in the business component set includes: Create a list call method in the component bus manager; The interface of each of the business components is obtained, the list calling method is sent to the interface of each of the business components through the component bus manager, and the service protocol calling table of each of the business components is obtained by using the list calling method.

5. The method for implementing a lightweight component bus according to claim 1, wherein: The acquiring the service category corresponding to each of the business components according to each of the service protocol calling tables includes: Acquire the first service calling information of the service protocol calling table of each of the business components; The service category corresponding to the first service calling information is queried through a preset service relationship table.

6. A lightweight component bus implementation device, used to implement the lightweight component bus implementation method according to any one of claims 1 to 5, characterized in that: The device comprises: A manager setting module, used for receiving and acquiring a preset system platform, and setting a component bus manager in the system platform; A component connection module, used to query each business component in the system platform, obtain a business component set, and connect each business component to the component bus manager; A service category acquisition module, used to acquire a service protocol call table of each business component in the business component set through the component bus manager, and acquire a service category corresponding to each business component according to each service protocol call table; The service business implementation module is used to call the preset component bus route and implement the service business corresponding to the service category through the component bus route.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the lightweight component bus implementation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, comprising a data storage area and a program storage area, wherein the data storage area stores created data and the program storage area stores a computer program; wherein: When the computer program is executed by a processor, the lightweight component bus implementation method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • System and method for supporting mixed service based on integrated open network

    CN101826987A

  • Qt-based application program rapid development framework, development method and operation method

    CN111930365A