App data processing method and device and mobile terminal
By using a component-based development architecture, the app is broken down into independent business components, which solves the problem of high module coupling in large app projects, achieves low coupling interaction and efficient maintenance, and reduces maintenance costs and compilation time.
Patent Information
- Application Number
- CN202110532547.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-17
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2041-05-17
AI Technical Summary
In large-scale APP projects, the single-project architecture leads to high coupling between business modules, high maintenance costs, difficulty in debugging and locating problems, low reusability between modules, and long compilation time.
The application adopts a component-based development architecture, which breaks down the application into independent business components. The underlying container layer enables decoupled interaction and communication, and each business component runs and compiles independently. Package management tools are used to achieve component-level reuse.
It reduced the maintenance cost of the app, improved maintenance efficiency, shortened compilation time, and enabled independent positioning and efficient maintenance of business modules.
Smart Images

Figure CN113296742B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mobile internet, and in particular to an APP data processing method and device and a mobile terminal. BACKGROUND
[0002] In APP (Application) project development, if the data volume involved in the project is small, the existing single-engine architecture can meet most of the needs, but when it comes to large projects or the number of Apps is increasing, the original single-engine architecture is not enough to meet the architecture needs. When the project is getting larger and larger, there is no clear division between the business modules of the single-engine architecture, and all the module codes are written in one project, which leads to high coupling degree between the modules, resulting in high maintenance cost in the later stage. When debugging a module or a function, the entire large single project needs to be compiled and run, which takes a long time to compile, and often a change in one place may affect other coupled modules, making it difficult to locate the problem. SUMMARY
[0003] The present application provides an APP data processing method, device and mobile terminal, which uses different business components to process different types of business data, and the business components are decoupled from each other, which can reduce the maintenance cost of the APP in the later stage, and when the APP is used, it is convenient to locate the specific problem component.
[0004] In a first aspect, the present application provides an APP data processing method, which comprises: obtaining interaction information of a business component; a plurality of business components are integrated in a target project file, different business components are used to process different types of business data, and the business components in the target project file are in a decoupling relationship; generating data processing parameters according to the interaction information; when an APP data processing request is received, generating a data processing result of the APP data processing request according to the data processing parameters.
[0005] Further, the interaction information includes lifecycle information; generating data processing parameters according to the interaction information comprises: determining event filtering parameters and event forwarding parameters according to the lifecycle information; and taking the event filtering parameters and the event forwarding parameters as data processing parameters.
[0006] Further, the APP data processing request includes a lifecycle event processing request; generating a data processing result of the APP data processing request according to the data processing parameters comprises: forwarding the lifecycle information to a target component according to the lifecycle event processing request and the data processing parameters.
[0007] Further, the interaction information comprises first registration information; the data processing parameter is generated according to the interaction information, comprising: generating a dictionary parameter according to the first registration information; and taking the dictionary parameter as the data processing parameter.
[0008] Further, the APP data processing request comprises a jump request; the data processing result of the APP data processing request is generated according to the data processing parameter, comprising: determining second registration information of a to-be-processed component according to the jump request; matching the first registration information and the second registration information by using the data processing parameter to obtain a matching result; the matching result comprises a target jump component; and performing jump processing of the to-be-processed component to the target jump component according to the matching result.
[0009] Further, the APP data processing request comprises a call request; the data processing result of the APP data processing request is generated according to the data processing parameter, comprising: determining third registration information of a to-be-processed component according to the call request; matching the first registration information and the third registration information by using the data processing parameter to obtain a matching result; the matching result comprises a target call component; and performing call processing of the to-be-processed component to the target call component according to the matching result.
[0010] Further, the method further comprises: obtaining interaction information of a target object; the target object can be used for information interaction with the business component or with other objects in the APP except the target object.
[0011] Further, the interaction information comprises publisher information and subscriber information; the data processing parameter is generated according to the interaction information, comprising: determining a message scheduling table according to the publisher information and the subscriber information; and taking the message scheduling table as the data processing parameter.
[0012] Further, the APP data processing request comprises a subscription request; the data processing result of the APP data processing request is generated according to the data processing parameter, comprising: determining a target subscriber according to the subscription request; and sending target publisher information to the target subscriber according to the data processing parameter.
[0013] Further, the business component comprises a first type component and a second type component; the first type component is used for processing first type business data; the second type component is used for processing second type business data; the use frequency of the first type business data is lower than the use frequency of the second type business; and the second type business data is used for implementing a preset function.
[0014] Secondly, embodiments of the present invention also provide an APP data processing device, the device comprising: an acquisition module for acquiring interaction information of business components; multiple business components are integrated in a target project file, different business components are used to process different types of business data, and the business components in the target project file are decoupled from each other; a parameter module for generating data processing parameters based on the interaction information; and a processing module for generating a data processing result of the APP data processing request based on the data processing parameters when an APP data processing request is received.
[0015] Furthermore, the interaction information includes lifecycle information; the parameter module is used to: determine event filtering parameters and event forwarding parameters based on the lifecycle information; and use the event filtering parameters and the event forwarding parameters as data processing parameters.
[0016] Furthermore, the APP data processing request includes a lifecycle event processing request; the processing module is configured to: forward the lifecycle information to the target component according to the lifecycle event processing request and the data processing parameters.
[0017] Furthermore, the interaction information includes first registration information; the parameter module is used to: generate dictionary parameters based on the first registration information; and use the dictionary parameters as data processing parameters.
[0018] Furthermore, the APP data processing request includes a jump request; the processing module is configured to: determine the second registration information of the component to be processed based on the jump request; match the first registration information and the second registration information using the data processing parameters to obtain a matching result; the matching result includes a target jump component; and perform jump processing from the component to be processed to the target jump component based on the matching result.
[0019] Furthermore, the APP data processing request includes a call request; the processing module is configured to: generate a data processing result of the APP data processing request based on the data processing parameters, including: determining the third registration information of the component to be processed based on the call request; matching the first registration information and the third registration information using the data processing parameters to obtain a matching result; the matching result includes a target call component; and executing the call processing of the component to be processed to the target call component based on the matching result.
[0020] Furthermore, the acquisition module is also used to: acquire the interaction information of the target object; the target object can be used to interact with the business component.
[0021] Furthermore, the interaction information includes publisher information and subscriber information; the parameter module is used to: determine a message scheduling table based on the publisher information and the subscriber information; and use the message scheduling table as a data processing parameter.
[0022] Furthermore, the APP data processing request includes a subscription request; the processing module is configured to: determine the target subscriber based on the subscription request; and send the target publisher information to the target subscriber based on the data processing parameters.
[0023] Furthermore, the business component includes a first type of component and a second type of component; the first type of component is used to process a first type of business data; the second type of component is used to process a second type of business data; the usage frequency of the first type of business data is lower than the usage frequency of the second type of business data; the second type of business data is used to implement a preset function.
[0024] Thirdly, embodiments of the present invention also provide a mobile terminal, which includes any of the above-mentioned APP data processing devices.
[0025] Fourthly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described APP data processing method.
[0026] Fifthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program for performing the above-described APP data processing method.
[0027] The embodiments of this invention bring the following beneficial effects: These embodiments provide an APP data processing scheme, which includes acquiring interaction information of business components; integrating multiple business components in a target project file, with different components used to process different types of business data, and the business components in the target project file being decoupled; generating data processing parameters based on the interaction information; and generating the data processing result of the APP data processing request based on the data processing parameters when an APP data processing request is received. By processing different types of business data through different business components, and with the business components being decoupled from each other, this invention enables independent operation and compilation of each business module of the APP, facilitating later maintenance, reducing maintenance costs, and improving maintenance efficiency.
[0028] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0029] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0030] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0031] Figure 1 This is a flowchart of an APP data processing method provided in an embodiment of the present invention;
[0032] Figure 2 This is a hierarchical diagram of the mobile terminal component-based architecture provided in the embodiments of the present invention;
[0033] Figure 3 This is a block diagram illustrating the decoupling design principle of the routing bus provided in an embodiment of the present invention.
[0034] Figure 4 This is a block diagram illustrating the message bus decoupling design principle provided in an embodiment of the present invention.
[0035] Figure 5 A block diagram illustrating the decoupling design principle of lifecycle management provided in this embodiment of the invention;
[0036] Figure 6 This is a structural block diagram of an APP data processing device provided in an embodiment of the present invention;
[0037] Figure 7 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Currently, many systems use a single-project architecture to build their apps, resulting in high coupling between business modules during development, high maintenance costs, and the need to analyze multiple coupled modules holistically to pinpoint problems. Furthermore, the current single-project architecture only allows for file or code-level copy-and-paste reuse between different app development projects. It also requires compiling all resources and code files during development and debugging, making the process time-consuming.
[0040] Based on this, the present invention provides an APP data processing method, apparatus, and mobile terminal. This method, through a component-based development architecture, decomposes the application into various different business modules. Interactions and communication between business modules are no longer implemented in a tightly coupled manner, but rather through an intermediate layer—the underlying container layer—to achieve decoupled interaction and communication between business modules. Each business module is completely independent and can run and compile independently. This allows for direct identification of specific business modules during later maintenance. The component-based architecture encapsulates abstractable functions and business processes into corresponding functional and business components. Package management tools enable direct component-level code reuse, and subsequent unified component maintenance and upgrades facilitate easy reuse. Furthermore, the component-based architecture encapsulates numerous abstractable functions and business processes into corresponding functional and business components, compiles and packages them into binary files, and integrates them into the application, significantly shortening the compilation time during application development and making application development more efficient.
[0041] To facilitate understanding of this embodiment, a detailed description of an APP data processing method disclosed in this embodiment of the invention will be provided first.
[0042] First, the terms involved will be explained.
[0043] Low coupling: Low coupling means that two related modules should minimize their mutual dependencies as much as possible, and avoid strong dependencies between the two modules. The ultimate goal of low coupling is complete decoupling, where two completely decoupled modules can call each other, but can also run independently.
[0044] This invention provides an APP data processing method, see [link to APP data processing method]. Figure 1 The flowchart shown represents an APP data processing method, which includes the following steps:
[0045] Step S102: Obtain the interaction information of the business components.
[0046] In this embodiment of the invention, multiple business components are integrated in the target project file. Different business components are used to process different types of business data, and the business components in the target project file are decoupled from each other.
[0047] The target project can be a main project created when creating the app. The main project implements the app's overall business logic, which is broken down into its components. Each component can be a sub-project. The main project integrates all business components as third-party libraries. Each sub-project can be maintained, compiled, and run independently, and the business components are completely decoupled.
[0048] The interaction information of business components can be used to enable business components to process business data.
[0049] Step S104: Generate data processing parameters based on the interaction information.
[0050] In this embodiment of the invention, the interaction information can be used to determine the components involved in the business processing and the functions implemented by the business components.
[0051] Data processing parameters are used to determine the logic for processing business data. These parameters can be used to control the business data processing process.
[0052] Step S106: When an APP data processing request is received, the data processing result of the APP data processing request is generated according to the data processing parameters.
[0053] In this embodiment of the invention, the APP data processing request can be issued by a business component or by other modules that interact with the business component. For example, the APP data processing request can originate from a button or text. Based on the APP data processing request, information such as the requester, the data content to be processed, and the interactor with which the requester communicates can be determined. Data processing is performed based on the business processing logic determined by the data processing parameters to obtain the data processing result.
[0054] This invention provides an APP data processing solution, which includes acquiring interaction information of business components; integrating multiple business components in a target project file, with different components used to process different types of business data, and the business components in the target project file being decoupled from each other; generating data processing parameters based on the interaction information; and generating the data processing result of the APP data processing request based on the data processing parameters when an APP data processing request is received. This invention, by processing different types of business data through different business components and decoupling them from each other, enables independent operation and compilation of each business module of the APP, facilitating later maintenance, reducing maintenance costs, and improving maintenance efficiency.
[0055] To facilitate decoupling between the main project and various business components, in one embodiment, the interaction information includes lifecycle information; data processing parameters are generated based on the interaction information, and the processing can be carried out according to the following steps:
[0056] The event filtering parameters and event forwarding parameters are determined based on the lifecycle information; these parameters are then used as data processing parameters.
[0057] In this embodiment of the invention, the lifecycle information includes startup information and running status information of the business component. The startup information determines the startup time of the business component, and the running status information determines whether the component is running in the foreground, in the background, running normally, running abnormally, or has stopped running.
[0058] See Figure 5 The diagram shown illustrates the decoupled design principle of lifecycle management. Event filtering parameters are used to filter lifecycle information, while event forwarding parameters can be used to determine the event forwarding strategy, such as forwarding priority.
[0059] It should be noted that, in the implementation of this invention, lifecycle information can be obtained through the APP instantiation process, so as to enable the business logic in the lifecycle hook function (Hook function) in the main project to be distributed to various business components.
[0060] In one embodiment, the APP data processing request includes a lifecycle event processing request; the data processing result of the APP data processing request is generated based on the data processing parameters, and can be processed according to the following steps:
[0061] Based on the lifecycle event handling request and data processing parameters, the lifecycle information is forwarded to the target component.
[0062] In this embodiment of the invention, the APP data processing request can be issued by a business component, which can be a sub-module in the main project. The lifecycle event processing request can be used to determine the business component to be interacted with and the data to be processed. Using the data processing logic determined by the data processing parameters, the data processing result of the APP data processing request is generated. For example, the data processing result could be the distribution of the business logic from the lifecycle hook function (Hook function) in the main project to each business component.
[0063] To enable interaction between various business components and ensure high cohesion and low coupling between components, in one embodiment, the interaction information includes first registration information; generating data processing parameters based on the interaction information can be performed according to the following steps:
[0064] Generate dictionary parameters based on the first registration information; use the dictionary parameters as data processing parameters.
[0065] In this embodiment of the invention, when compiling a service component, relevant functions can be called to register the service component on the routing bus. In this embodiment, the interaction information includes first registration information, which is the registration information sent by the service component to the routing bus. The first registration information sent by multiple service components is processed, and the resulting parameters are used as dictionary parameters to determine the data processing logic in the routing bus.
[0066] To address the issue of page navigation between business components, in one embodiment, the APP data processing request includes a navigation request; generating the data processing result of the APP data processing request based on the data processing parameters can be performed according to the following steps:
[0067] The second registration information of the component to be processed is determined based on the jump request; the first registration information and the second registration information are matched using data processing parameters to obtain the matching result; the matching result includes the target jump component; based on the matching result, the jump processing from the component to be processed to the target jump component is executed.
[0068] In an embodiment of the present invention, see Figure 3 The diagram illustrates the decoupling design principle of the routing bus. The second registration information may include the URL (uniform resource locator) parameter of the component to be processed. The first registration information may include URL parameters of multiple business components. A redirection request can be issued by the component to be processed. Based on the redirection request, the component to which the component to be processed should redirect, i.e., the target redirection component, can be determined. The URL parameter of the component to be processed in the second registration information is matched with the multiple URL parameters in the first registration information. If a match is found between the component to be processed and the target redirection component, the redirection process from the component to the target redirection component is executed. If no URL parameter of the target redirection component is found in the multiple URL parameters in the first registration information, it is determined that no match has been found between the component to be processed and the target redirection component, and the user can redirect to a pre-defined page.
[0069] To address the issue of function calls between business components, in one embodiment, the APP data processing request includes a call request; generating the data processing result of the APP data processing request based on the data processing parameters can be performed according to the following steps:
[0070] The third registration information of the component to be processed is determined based on the call request; the first registration information and the third registration information are matched using data processing parameters to obtain the matching result; the matching result includes the target calling component; based on the matching result, the call processing of the component to be processed to the target calling component is executed.
[0071] In an embodiment of the present invention, see Figure 3 The diagram illustrates the decoupling design principle of the routing bus. The third registration information may include the URL parameters of the component to be processed. The first registration information may include the URL parameters of multiple business components. A call request can be issued by the component to be processed. Based on the call request, the component to be called by the component to be processed, i.e., the target calling component, can be determined. The URL parameters of the component to be processed in the third registration information are matched with the multiple URL parameters in the first registration information. If a match is found between the component to be processed and the target calling component, the call processing of the component to the target calling component by the component to be processed is executed. If the URL parameters of the target calling component are not found among the multiple URL parameters in the first registration information, it is determined that no match has been found between the component to be processed and the target calling component, and the user can be redirected to a pre-defined page.
[0072] Considering that in addition to information interaction between components, there is also information interaction between components and other data units in the app, the following steps can be performed after obtaining the interaction information of the business components:
[0073] Obtain interaction information of the target object; the target object can be used to interact with business components or other objects in the APP besides the target object.
[0074] In this embodiment of the invention, the target object is a data unit other than the business component that can interact with the business component. The target object can interact with the business component or with data units that are not part of the business component. The target object can be a button object or a text object, etc.
[0075] Considering that the routing bus solves the one-to-one message call problem, multiple registrations of the same URL will be overwritten. To meet the needs of one-to-many message dispatch, a message bus design is required to supplement the communication between decoupled components. Therefore, the interaction information includes publisher information and subscriber information. Data processing parameters are generated based on the interaction information, which can be performed according to the following steps:
[0076] The message scheduling table is determined based on the publisher and subscriber information; the message scheduling table is then used as a data processing parameter.
[0077] In an embodiment of the present invention, see Figure 4 The block diagram shown illustrates the decoupling design principle of the message bus. The publisher information can be used to determine the business components, business names, and message attachments for publishing messages. The subscriber information can be used to determine the business components with subscription needs and related information. The message scheduling table can be used to determine the correspondence between the publisher information and the subscriber information.
[0078] In one embodiment, the APP data processing request includes a subscription request; generating the data processing result of the APP data processing request based on the data processing parameters can be performed according to the following steps:
[0079] The target subscriber is determined based on the subscription request; the target publisher information is sent to the target subscriber based on the data processing parameters.
[0080] In this embodiment of the invention, the target publisher information is determined for the target subscriber based on the correspondence between the publisher information and the subscriber information determined by the data processing parameters. The target publisher information can be sent to the target subscriber in a certain priority order.
[0081] Considering the low reusability of repetitive tasks as the number of apps increases, even if reuse occurs, it's merely code-level copying and requires multiple synchronized updates for subsequent modifications, hindering unified upgrades and maintenance of the same codebase. Therefore, in one embodiment, the business component includes a first type of component and a second type of component; the first type of component processes first type of business data; the second type of component processes second type of business data; the usage frequency of the first type of business data is lower than that of the second type of business data; the second type of business data is used to implement preset functions.
[0082] In an embodiment of the present invention, see Figure 2 The diagram showing the component-based architecture hierarchy of the mobile terminal illustrates that the first category of components can include business component 1, business component 2, business component 3, etc., within the business component layer. The second category of components can include UI (User Interface) components, data processing components, and general function components. Specifically, UI components can include basic UI components and business UI components; data processing components can include one or more of the following: data acquisition SDK (Software Development Kit) components, data conversion components, data persistence components, and file service components; general function components can include one or more of the following: network service components, security service components, screen adaptation components, Hybrid (switch) service components, push notification components, hot update components, dynamic configuration components, internationalization components, and face / fingerprint authentication components.
[0083] In this embodiment of the invention, the second type of component allows frequently used functions to be set as multiple separate components, thereby achieving high reusability by calling these individual business components. The first type of component can implement some less frequently used or basic functions, thereby improving the flexibility of data processing.
[0084] This invention provides an APP data processing method, device, and mobile terminal. This solution can serve as a basic component-based framework for mobile terminals, adaptable to various APP application systems. During application system development, it allows for the splitting of business into modules, with each business module being developed, operated, and maintained independently. It also provides underlying technical support for the interaction and communication between these independent business modules.
[0085] This invention also provides an APP data processing device, as described in the following embodiments. Since the principle by which this device solves the problem is similar to that of the APP data processing method, the implementation of this device can be found in the implementation of the APP data processing method; repeated details will not be elaborated further. See [link to documentation]. Figure 6 The diagram shown illustrates the structural block diagram of the APP data processing device, which includes:
[0086] The acquisition module 61 is used to acquire the interaction information of the business components; multiple business components are integrated in the target project file, and different business components are used to process different types of business data. The business components in the target project file are decoupled from each other; the parameter module 62 is used to generate data processing parameters based on the interaction information; the processing module 63 is used to generate the data processing result of the APP data processing request based on the data processing parameters when the APP data processing request is received.
[0087] In one embodiment, the interaction information includes lifecycle information; the parameter module is used to: determine event filtering parameters and event forwarding parameters based on the lifecycle information; and use the event filtering parameters and event forwarding parameters as data processing parameters.
[0088] In one embodiment, the APP data processing request includes a lifecycle event processing request; the processing module is configured to: forward lifecycle information to the target component based on the lifecycle event processing request and data processing parameters.
[0089] In one embodiment, the interaction information includes first registration information; a parameter module is used to: generate dictionary parameters based on the first registration information; and use the dictionary parameters as data processing parameters.
[0090] In one embodiment, the APP data processing request includes a jump request; the processing module is configured to: determine the second registration information of the component to be processed based on the jump request; match the first registration information and the second registration information using data processing parameters to obtain a matching result; the matching result includes the target jump component; and perform jump processing from the component to be processed to the target jump component based on the matching result.
[0091] In one embodiment, the APP data processing request includes a call request; the processing module is configured to: generate a data processing result of the APP data processing request based on data processing parameters, including: determining the third registration information of the component to be processed based on the call request; matching the first registration information and the third registration information using the data processing parameters to obtain a matching result; the matching result includes the target call component; and executing the call processing of the component to be processed to the target call component based on the matching result.
[0092] In one embodiment, the acquisition module is further configured to: acquire interaction information of the target object; the target object can be used to interact with business components.
[0093] In one embodiment, the interaction information includes publisher information and subscriber information; the parameter module is used to: determine a message scheduling table based on the publisher information and subscriber information; and use the message scheduling table as a data processing parameter.
[0094] In one embodiment, the APP data processing request includes a subscription request; the processing module is configured to: determine the target subscriber based on the subscription request; and send the target publisher information to the target subscriber based on the data processing parameters.
[0095] In one embodiment, the business component includes a first type of component and a second type of component; the first type of component is used to process a first type of business data; the second type of component is used to process a second type of business data; the usage frequency of the first type of business data is lower than that of the second type of business data; the second type of business data is used to implement a preset function.
[0096] This invention also provides a mobile terminal, which includes any of the above-mentioned APP data processing devices.
[0097] In this embodiment of the invention, the mobile terminal adopts a component-based architecture, see [link to relevant documentation]. Figure 2 The diagram shows the hierarchical structure of a mobile component-based architecture. From the perspective of the app runtime, the mobile client in this component-based architecture is divided into four layers. The horizontal layers are completely decoupled and independent of each other. The vertical layers depend on the layers below them, calling the services provided by the layers below.
[0098] The business component layer is where the entire app is actually assembled from multiple business components. This means that when creating the app, a main project is first created, and then the overall business logic is broken down. Each business component is an independent sub-project. The main project is responsible for integrating all business components as third-party libraries. Each sub-project can be maintained, compiled, and run independently; the business components are completely decoupled. The business component layer depends on the following three layers to function.
[0099] The basic component layer includes a set of UI components, a set of data processing components, and a set of general functional components. It provides specific technical support for the development of the business component layer.
[0100] The underlying container layer is the core of the entire architecture. It is the core technology for decoupling business components. The routing bus solves one-to-one communication between components (including page navigation and function calls), and the message bus solves one-to-many communication between components. The routing bus and message bus provide underlying support for decoupling between components. Lifecycle management solves the decoupling between business components and the main project. In summary, the underlying container layer lays the foundation for the underlying communication of the component-based framework. The underlying container layer provides the technical foundation for the interaction and communication between upper-layer business components, enabling upper-layer components to interact and communicate with each other without strong coupling.
[0101] At the platform system layer, all the components encapsulated at the upper layer depend on the platform system's interface. The platform system here includes the iOS (a mobile operating system developed by Apple) platform and the Android platform.
[0102] Based on the same inventive concept, this invention also provides an embodiment of an electronic device for implementing all or part of the above-described APP data processing method. This electronic device specifically includes the following:
[0103] The device comprises a processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to realize information transmission between related devices; the electronic device can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the electronic device can be implemented with reference to the embodiments for implementing the above-mentioned APP data processing method and the embodiments for implementing the above-mentioned APP data processing device, the content of which is incorporated herein, and repeated details will not be described again.
[0104] Figure 7 This is a schematic diagram of the system composition structure of an electronic device provided in an embodiment of the present invention. Figure 7 As shown, the electronic device 70 may include a processor 701 and a memory 702; the memory 702 is coupled to the processor 701. It is worth noting that... Figure 7 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.
[0105] In one embodiment, the functionality implemented by the APP data processing method can be integrated into the processor 701. The processor 701 can be configured to perform the following controls: acquire interaction information of business components; integrate multiple business components in a target project file, with different components used to process different types of business data, and the business components in the target project file being decoupled; generate data processing parameters based on the interaction information; and when an APP data processing request is received, generate the data processing result of the APP data processing request based on the data processing parameters.
[0106] As can be seen from the above, the electronic device provided in the embodiments of the present invention processes different types of business data through different business components. The business components are decoupled from each other, which enables the independent operation and compilation of each business module of the APP, facilitates later maintenance, reduces maintenance costs, and improves maintenance efficiency.
[0107] In another embodiment, the APP data processing device can be configured separately from the processor 701. For example, the APP data processing device can be configured as a chip connected to the processor 701, and the APP data processing method can be implemented through the control of the processor.
[0108] like Figure 7 As shown, the electronic device 70 may further include: a communication module 703, an input unit 704, an audio processing unit 705, a display 706, and a power supply 707. It is worth noting that the electronic device 70 does not necessarily need to include these components. Figure 7 All components shown; in addition, the electronic device 70 may also include Figure 7 For components not shown, please refer to existing technologies.
[0109] like Figure 7 As shown, processor 701, sometimes also referred to as controller or operation control, may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of electronic device 70.
[0110] The memory 702 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable device. It may store the aforementioned failure-related information, and also store a program for executing that information. The processor 701 may execute the program stored in the memory 702 to perform information storage or processing, etc.
[0111] Input unit 704 provides input to processor 701. Input unit 704 may be, for example, a keypad or touch input device. Power supply 707 provides power to electronic device 70. Display 706 displays images and text. Display may be, for example, an LCD display, but is not limited to this.
[0112] The memory 702 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 702 can also be some other type of device. The memory 702 includes a buffer memory 7021 (sometimes called a buffer). The memory 702 may include an application / function storage unit 7022 for storing application programs and function programs or processes for executing the operation of the electronic device 70 via the processor 701.
[0113] The memory 702 may also include a data storage unit 7023 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 7024 of the memory 702 may include various drivers for the electronic device's communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0114] The communication module 703 is a transmitter / receiver that transmits and receives signals via the antenna 708. The communication module (transmitter / receiver) 703 is coupled to the processor 701 to provide input signals and receive output signals, which is the same as in a conventional mobile communication terminal.
[0115] Based on different communication technologies, multiple communication modules 703 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) 703 is also coupled to a speaker 709 and a microphone 710 via an audio processing unit 705 to provide audio output via the speaker 709 and receive audio input from the microphone 710, thereby realizing typical telecommunications functions. The audio processing unit 705 may include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processing unit 705 is also coupled to a processor 701, enabling on-device recording via the microphone 710 and on-device playback of stored audio via the speaker 709.
[0116] In embodiments of the present invention, a computer-readable storage medium is also provided for implementing all steps of the APP data processing method in the above embodiments. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements all steps of the APP data processing method in the above embodiments. For example, when the processor executes the computer program, it implements the following steps: obtaining interaction information of business components; integrating multiple business components in a target project file, with different business components used to process different types of business data, and the business components in the target project file being decoupled; generating data processing parameters based on the interaction information; and generating the data processing result of the APP data processing request based on the data processing parameters when an APP data processing request is received.
[0117] As can be seen from the above, the computer-readable storage medium provided in the embodiments of the present invention processes different types of business data through different business components. The business components are decoupled from each other, which enables the independent operation and compilation of each business module of the APP, facilitates later maintenance, reduces maintenance costs, and improves maintenance efficiency.
[0118] While this invention provides the method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual device or client product execution, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment).
[0119] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0120] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0121] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0122] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0123] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are relatively simple in description because they are fundamentally similar to the method embodiments; relevant parts can be referred to the descriptions in the method embodiments. In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "upper," "lower," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention. Unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal connections between two components. Those skilled in the art can understand the specific meaning of these terms in this invention according to the specific circumstances. It should be noted that, without conflict, the embodiments and features in the embodiments of this invention can be combined with each other. This invention is not limited to any single aspect, nor to any single embodiment, nor to any combination and / or substitution of these aspects and / or embodiments. Each aspect and / or embodiment of this invention can be used alone, or in combination with one or more other aspects and / or other embodiments.
[0124] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for processing APP data, characterized in that, include: Obtain interaction information from business components; Multiple business components are integrated in the target project file. Different business components are used to process different types of business data. The business components in the target project file are decoupled from each other. Data processing parameters are generated based on the interaction information; When an APP data processing request is received, the data processing result of the APP data processing request is generated according to the data processing parameters; The interactive information includes first registration information; Generating data processing parameters based on the interaction information includes: generating dictionary parameters based on the first registration information; using the dictionary parameters as data processing parameters; the first registration information is registration information sent by the business component to the routing bus; the dictionary parameters are used to determine the data processing logic in the routing bus. The APP data processing request includes a jump request; generating the data processing result of the APP data processing request according to the data processing parameters includes: determining the second registration information of the component to be processed according to the jump request; matching the first registration information and the second registration information using the data processing parameters to obtain a matching result; the matching result includes a target jump component; and performing jump processing from the component to be processed to the target jump component according to the matching result; the first registration information includes URL parameters of multiple business components; the jump request is issued by the component to be processed, the target jump component of the component to be processed is determined according to the jump request, and the URL parameters of the component to be processed in the second registration information are matched with multiple URL parameters in the first registration information; if the component to be processed and the target jump component are matched, then the jump processing from the component to be processed to the target jump component is performed; if the multiple URL parameters in the first registration information do not contain the URL parameters of the target jump component, then it is determined that the component to be processed and the target jump component have not been matched, and then the user is redirected to a pre-set page; The APP data processing request includes a call request; generating the data processing result of the APP data processing request according to the data processing parameters includes: determining the third registration information of the component to be processed according to the call request; matching the first registration information and the third registration information using the data processing parameters to obtain a matching result; the matching result includes the target calling component; and executing the call processing of the component to be processed to the target calling component according to the matching result. The business components include a first type of component and a second type of component; the first type of component is used to process a first type of business data; the second type of component is used to process a second type of business data; the usage frequency of the first type of business data is lower than that of the second type of business data; the second type of business data is used to implement preset functions; the first type of component includes business components of the business component layer, and the second type of component includes user interface components, data processing components, and general function components.
2. The method according to claim 1, characterized in that, The interactive information includes lifecycle information; Data processing parameters are generated based on the interaction information, including: The event filtering parameters and event forwarding parameters are determined based on the lifecycle information; The event filtering parameters and the event forwarding parameters are used as data processing parameters.
3. The method according to claim 2, characterized in that, The APP data processing requests include lifecycle event processing requests; The data processing result of the APP data processing request is generated based on the data processing parameters, including: Based on the lifecycle event processing request and the data processing parameters, the lifecycle information is forwarded to the target component.
4. The method according to claim 1, characterized in that, Also includes: Obtain the interaction information of the target object; the target object can be used to interact with the business component or with other objects in the APP besides the target object.
5. The method according to claim 4, characterized in that, The interactive information includes publisher information and subscriber information; Data processing parameters are generated based on the interaction information, including: A message scheduling table is determined based on the publisher information and the subscriber information; The message scheduling table is used as a data processing parameter.
6. The method according to claim 5, characterized in that, The APP data processing requests include subscription requests; The data processing result of the APP data processing request is generated based on the data processing parameters, including: The target subscriber is determined based on the subscription request; Based on the data processing parameters, the target publisher information is sent to the target subscriber.
7. An APP data processing device, characterized in that, include: The acquisition module is used to acquire interaction information from business components; Multiple business components are integrated in the target project file. Different business components are used to process different types of business data. The business components in the target project file are decoupled from each other. The parameter module is used to generate data processing parameters based on the interaction information; The processing module is used to generate the data processing result of the APP data processing request based on the data processing parameters when the APP data processing request is received. The interactive information includes first registration information; The parameter module is used to: generate dictionary parameters based on the first registration information; and use the dictionary parameters as data processing parameters. The first registration information is the registration information sent by the service component to the routing bus; The dictionary parameters are used to determine the data processing logic in the routing bus; The APP data processing requests include redirection requests; The processing module is used to: determine the second registration information of the component to be processed based on the jump request; Using the data processing parameters, the first registration information and the second registration information are matched to obtain a matching result; the matching result includes a target redirection component; based on the matching result, the redirection process from the component to be processed to the target redirection component is executed; The first registration information includes URL parameters for multiple business components; The redirection request is sent by the component to be processed. Based on the redirection request, the target redirection component of the component to be processed is determined. The URL parameters of the component to be processed in the second registration information are matched with multiple URL parameters in the first registration information. If the component to be processed and the target redirection component are matched, the redirection process from the component to the target redirection component is executed. If multiple URL parameters in the first registration information do not exist in the URL parameters of the target redirection component, it is determined that the component to be processed and the target redirection component are not matched, and the user is redirected to the pre-set page. The APP data processing request includes a call request; The processing module is configured to: generate the data processing result of the APP data processing request according to the data processing parameters, including: determining the third registration information of the component to be processed according to the call request; Using the data processing parameters, the first registration information and the third registration information are matched to obtain a matching result; the matching result includes the target calling component; based on the matching result, the calling processing of the component to be processed to the target calling component is executed; The business components include a first type of component and a second type of component; the first type of component is used to process a first type of business data; the second type of component is used to process a second type of business data; the usage frequency of the first type of business data is lower than that of the second type of business data; the second type of business data is used to implement preset functions; the first type of component includes business components of the business component layer, and the second type of component includes user interface components, data processing components, and general function components.
8. The apparatus according to claim 7, characterized in that, The interaction information includes lifecycle information; the parameter module is used for: The event filtering parameters and event forwarding parameters are determined based on the lifecycle information; The event filtering parameters and the event forwarding parameters are used as data processing parameters.
9. The apparatus according to claim 8, characterized in that, The APP data processing request includes a lifecycle event processing request; the processing module is used for: Based on the lifecycle event processing request and the data processing parameters, the lifecycle information is forwarded to the target component.
10. The apparatus according to claim 7, characterized in that, The acquisition module is also used for: Obtain the interaction information of the target object; the target object can be used to interact with the business component.
11. The apparatus according to claim 10, characterized in that, The interactive information includes publisher information and subscriber information; the parameter module is used for: A message scheduling table is determined based on the publisher information and the subscriber information; The message scheduling table is used as a data processing parameter.
12. The apparatus according to claim 11, characterized in that, The APP data processing request includes a subscription request; the processing module is used for: The target subscriber is determined based on the subscription request; Based on the data processing parameters, the target publisher information is sent to the target subscriber.
13. A mobile terminal, characterized in that, Includes the APP data processing device according to any one of claims 7-12.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the APP data processing method according to any one of claims 1 to 6.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that performs the APP data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Business processing method and apparatus, and self-service terminal device
CN107678737A
Development system based on Android system, decoupling method and device
CN109857489A
Data service processing method, device and equipment
CN112416980A