Client application development platform and method based on multi-process framework
By introducing independent business processing service modules into the multi-process framework, the main process communication bottleneck and uneven resource scheduling problems in client application development are solved, the application response speed and stability are improved, and flexible and scalable are achieved. Application framework to meet complex business needs.
Patent Information
- Application Number
- CN202411648656.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-11-19
AI Technical Summary
In client application development, the multi-process framework has a chain reaction of main process communication bottlenecks, blocking problems caused by synchronous communication mechanisms, uneven resource scheduling, and global service response delays, which affect the performance and user experience of the application.
Introduce independent business processing service modules, through the communication interaction between the main process, rendering process and the business processing service module, the main process's business logic processing tasks are stripped away, and a variety of programming languages and network communication protocols are adopted to support efficient and flexible data. Processing and resource management.
It improves the response speed and stability of the application, builds a flexible, scalable and easy-to-maintain application framework, reduces the burden on the main process, and improves development efficiency and user experience.
Smart Images

Figure CN119149253A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development, and in particular to a client application development platform and method based on a multi-process framework. Background Art
[0002] Developers generally use open source multi-process frameworks to build cross-platform client applications. However, multi-process frameworks still have the following defects in client application development: (1) Main process communication bottleneck: The main process plays a core role in communicating with the rendering process. As the complexity of the application increases, the amount of communication that the main process needs to handle increases dramatically, which may become a performance bottleneck. Especially in Electron and NW.js, if the communication mechanism is not designed properly or the load is too high, it will lead to response delays and performance degradation, affecting the user experience.
[0003] (2) Blocking problems caused by synchronous communication mechanism: A synchronous communication mechanism is often used between the main process and the rendering process. This mechanism may work well in simple scenarios, but when dealing with complex tasks or high-concurrency requests, any blocking of the main process may cause the rendering process to wait for a long time for a response, and in serious cases, even cause the rendering process to freeze. This non-asynchronous design pattern greatly limits the scalability and stability of the application.
[0004] (3) Uneven resource scheduling and overload issues: As the resource scheduler, the main process is responsible for resource allocation and scheduling between rendering processes. When the main process is overloaded, it may not be able to manage resources effectively, resulting in some rendering processes being short of resources while other processes may have excess resources. This problem of uneven resource allocation will directly affect the performance of the application and the user experience.
[0005] (4) Chain reaction of global service response delay: The response speed of global services (such as file I / O, network requests, etc.) is crucial to the entire application. If these services are delayed or fail in the main process, they will affect all rendering processes that depend on them through the communication mechanism, forming a chain reaction. This global dependency increases the complexity and maintenance difficulty of the application. Summary of the invention
[0006] The purpose of this application is to provide a client application development platform and method based on a multi-process framework, to build an application framework that is easy to maintain and to improve the response speed and stability of the application.
[0007] To achieve the above objectives, this application provides the following solutions.
[0008] In the first aspect, the present application provides a client application development platform based on a multi-process framework, including a multi-process framework module and a business processing service module; the multi-process framework module includes a main process sub-module and at least one rendering process sub-module; the main process sub-module communicates with the rendering process sub-module and the business processing service module respectively; the rendering process sub-module also communicates with the business processing service module.
[0009] The main process submodule is used to manage the life cycle activities of the client application and coordinate the execution of each of the client application.
[0010] The rendering process submodule is used to: render according to the received business operation instructions, and display the rendering interface to the user, while obtaining user operation information to generate a user business request, and send the user business request to the business processing service module; receive data processing results and update the rendering interface.
[0011] The business processing service module is used to: self-start the business processing service according to a preset startup instruction, or start the business processing service according to a received startup instruction; receive the user business request sent by the rendering process sub-module for data processing, and return the data processing result to the rendering process sub-module; the business processing service module supports development in multiple programming languages.
[0012] In a second aspect, the present application provides a client application development method based on a multi-process framework, which is applied to a client application development platform based on a multi-process framework, and the method includes:
[0013] The main process submodule manages the lifecycle activities of the client applications and coordinates the execution of each of the client applications.
[0014] The business processing service module automatically starts the business processing service according to a preset start instruction, or starts the business processing service according to a received start instruction.
[0015] The rendering process submodule performs rendering according to the received business operation instruction, and displays the rendering interface to the user, and at the same time obtains the user operation information to generate a user business request, and sends the user business request to the business processing service module.
[0016] The business processing service module receives the user business request sent by the rendering process submodule for data processing, and returns the data processing result to the rendering process submodule; the business processing service module supports development in multiple programming languages.
[0017] The data processing result is received through the rendering process submodule and the rendering interface is updated.
[0018] According to the specific embodiments provided by the present application, the present application has the following technical effects: The present application provides a client application development platform and method based on a multi-process framework, in which an independent business processing service module is set up, thereby introducing an independent local business processing service that can be deployed across platforms, and realizing the decoupling and centralized processing of business logic. Through the communication and interaction between the main process submodule, the rendering process submodule and the business processing service module, the business logic processing tasks originally undertaken by the main process are completely separated and transferred to an independent business processing service. Such a setting can not only improve the response speed and stability of the application, but also build a flexible, scalable and easy-to-maintain application framework. And among them, the business processing service supports developers to implement business logic in multiple programming languages, thereby making full use of existing resources and accelerating project development and deployment. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A schematic diagram of a client application development platform based on a multi-process framework provided in accordance with an embodiment of the present application.
[0021] Figure 2 A schematic diagram of login verification provided for an embodiment of the present application.
[0022] Figure 3 A schematic diagram of obtaining an email list provided in an embodiment of the present application.
[0023] Figure 4 A schematic diagram of receiving mails provided in an embodiment of the present application.
[0024] Figure 5 A schematic diagram of reading mails provided in an embodiment of the present application.
[0025] Figure 6 A schematic diagram of sending an email provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The multi-process framework has completely changed the way client applications are developed. It enables developers to use familiar Web technologies (HTML, CSS, and JavaScript) to build cross-platform client applications. This feature has greatly broadened the application of Electron-like platforms and has been widely used in many fields. From lightweight code editors such as Visual Studio Code, to cross-platform communication tools such as Skype, to professional API development and testing tools such as Postman, Electron has become the technical support behind many well-known software with its cross-platform nature and the convenience of front-end technology.
[0028] Based on this, this application realizes an efficient, secure and flexible application framework by reconstructing the business processing mode of the application, and promotes the client application of the multi-process framework to develop in a more professional and modular direction. In addition, the client application developed in this application refers to an application installed on a user device, which is a personal terminal computer, a tablet computer or any other hardware that can run an application. The client application interacts directly with the user device and usually needs to communicate with the server to obtain or store data.
[0029] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0030] In an exemplary embodiment, Figure 1 As shown, a client application development platform based on a multi-process framework is provided, including a multi-process framework module and a business processing service module; the multi-process framework module includes a main process submodule and at least one rendering process submodule; the main process submodule communicates with the rendering process submodule and the business processing service module respectively; the rendering process submodule also communicates with the business processing service module. The business processing service module also communicates with the cloud; the business processing service module is also used to: when performing data processing, perform data interaction with the cloud to realize data storage or data call.
[0031] (1) The main process submodule is used to: manage the life cycle activities of the client application and coordinate the execution of each of the client applications; determine the corresponding current main process according to the application requirements of the client application; generate business operation instructions and startup instructions based on the current main process; send the business operation instructions to the rendering process submodule; send the startup instructions to the business processing service module.
[0032] Among them, the application requirements of client applications generally include the management of life cycle events, the management of window creation events, the interaction with the operating system, and the execution of preset lightweight services. The life cycle events include application software startup, application software exit, application software restart, and application software upgrade; the window creation events include window creation, window display, window hiding, window closing, window minimization, and window maximization. In addition, it can also include the layout and status settings of multiple windows; the interaction with the operating system includes reading system configuration, managing notifications, processing system-level shortcut keys, etc.; the preset lightweight services include user login status verification, window permission control, etc., which are all lightweight business logic. In the process of realizing the above functions, the communication between the main process submodule and the rendering process submodule is realized through the IPC (Inter-Process Communication) mechanism.
[0033] (ii) The business processing service module is used to: self-start the business processing service according to a preset startup instruction, or receive the startup instruction and start the business processing service according to the startup instruction; receive the user business request sent by the rendering process submodule to perform data processing (such as database query, external API call, etc.), and return the data processing result to the rendering process submodule; the business processing service module supports the use of multiple programming languages for development and supports multiple network communication protocols to assist in completing the data processing process; wherein, the business processing service supports multiple network communication protocols to ensure smooth interaction with the rendering process and improve efficiency. The business processing service is a socket service, and the socket service can be a web service, which can make this application have a wide range of applications.
[0034] Specifically, the business processing service module is responsible for the data and business logic specified by the main process submodule, such as heavy-load data or business logic (complex calculations, external service interactions, user interaction processing, etc.), to avoid overloading the main process. The business processing service can flexibly use cross-platform languages such as Java, PHP, Go, etc., support direct business migration, and allow relevant technical personnel to use their familiar voice to write relevant business programs without having to learn js to implement back-end business. In the process of realizing the above functions, the business processing service module provides a RESTful API or WebSocket interface for the rendering process submodule to call.
[0035] (III) The rendering process submodule is used to: render according to the received business operation instructions, and display the rendering interface to the user, and at the same time obtain user operation information to generate a user business request, and send the user business request to the business processing service module; receive data processing results and update the rendering interface, and then display the updated rendering interface to the user. In addition, the rendering process submodule is also used to process business logic directly related to the interface, such as form validation, data formatting, etc.
[0036] In another specific application example, the business processing service module in the client application development platform based on the multi-process framework is still based on the multi-process framework. The application scenarios of this platform include various applications based on desktop PCs, such as: email systems, IoT device management systems, content management systems, instant messaging systems, and real-time collaborative editing tools. In addition, it can also be applied to enterprise-level applications (such as CRM systems, ERP systems), cross-platform game clients, online education platforms, and multimedia content creation and editing software to achieve complex data processing, real-time interaction, and cross-platform compatibility.
[0037] In another specific application example, the business processing service module in the client application development platform based on the multi-process framework is still based on the multi-process framework, and the specific framework used is the Electron framework, and the corresponding module is the Electron framework module. In terms of application characteristics, Electron has demonstrated excellent cross-platform capabilities, allowing a set of code to run seamlessly on multiple operating systems such as Windows, macOS, and Linux, greatly reducing development costs and shortening time to market. They also make full use of the convenience of front-end development, allowing front-end developers to easily transform into client application developers without having to learn additional new skills, thereby improving development efficiency and end-user experience. In addition, both provide a wealth of APIs and extension mechanisms, supporting comprehensive coverage from file operations, network requests to underlying system functions, and allowing developers to call the native interface of the operating system to achieve deeper functional integration and expansion.
[0038] In terms of platform framework, the multi-process framework adopted by Electron is mainly composed of three parts: Chromium, Node.js and application layer. As the front-end rendering engine, Chromium is responsible for drawing the main window and all view contents of the application, and provides underlying UI controls, JavaScript engine and network communication functions. As the back-end operating environment, Node.js provides the underlying API interface and supports system-level functions such as file operations, process management and network communication. The application layer is an application framework built on Chromium and Node.js, which is used to develop the interface design and business logic of client applications. This framework perfectly combines the Web technology stack and the underlying system functions, providing developers with a flexible and scalable way to develop client applications. Correspondingly, the main process submodule calls the Electron API interface to manage windows and system functions.
[0039] In another specific application example, taking the application scenario of an email system as an example, the present application provides an application of a client application development platform based on a multi-process framework in an email system to realize multiple functions such as login verification, mail list acquisition, mail collection, mail reading and mail sending.
[0040] (11) Login verification. The corresponding rendering interface is a user login interface, the corresponding user operation information is a user name entered by the user, a password entered by the user, and a button type clicked by the user, and the corresponding user service request is a login verification request.
[0041] The business processing service module is also used for: in the business processing service, listening to the login verification request from the rendering process submodule, and parsing the login verification request upon receipt to obtain the corresponding user name and password; establishing a connection with the mail server and after the connection is successful, using the parsed user name and password to perform login verification to obtain a verification result; encapsulating the verification result as a data processing result into an HTTP response, and returning it to the rendering process submodule; the verification result is verification passed or verification failed; when the verification result is verification passed, polling the mail server to store the mail in the local database for standby.
[0042] The rendering process submodule is further used to perform business rendering according to the data processing result to update the user login interface and display corresponding prompt information of successful login or failed login to the user.
[0043] (12) Obtaining an email list. The corresponding rendering interface is an email interface after successful login, and the corresponding user service request is an email list obtaining request.
[0044] The business processing service module is also used for: in the business processing service, executing a corresponding database query operation according to the received mail list acquisition request to obtain mail list data sorted according to a preset time sequence; encapsulating the mail list data sorted according to the preset time sequence as a data processing result into a response body, and returning it to the rendering process submodule.
[0045] The rendering process submodule is further used to perform business rendering according to the data processing result, so as to update the mail interface after the successful login, and display the updated mail list interface to the user.
[0046] (13) Receiving emails. The corresponding rendering interface is the email display interface.
[0047] The business processing service module is also used to: start a preset mail receiving process in the business processing service; the preset mail receiving process is used to automatically connect to the mail server at every preset time interval, then retrieve all mails received within the preset time interval and download and decode them, store the decoded mail data in the local database for standby use, and generate a successful mail receiving reminder at the same time; send the successful mail receiving reminder to the rendering process submodule in real time through the WebSocket long connection.
[0048] The rendering process submodule is also used to: send an HTTP request to the business processing service module according to the email receiving success reminder.
[0049] The business processing service module is also used to: according to the HTTP request, return the email data corresponding to all emails received within the preset time period as the data processing result to the rendering process submodule.
[0050] The rendering process submodule is further used to perform business rendering according to the data processing result, so as to update the email display interface and display corresponding email summary information to the user.
[0051] (14) Reading an email. The corresponding rendering interface is an email display interface, the corresponding user operation information is that the user clicks to view an email, and the corresponding user service request is an email viewing request; the email viewing request includes a unique identifier of the email clicked by the user.
[0052] The business processing service module is also used to: in the business processing service, receive and parse the email viewing request to obtain the unique identifier; perform data query in the local database based on the unique identifier, and encapsulate the email data obtained by the query as a data processing result into a response body, and then return it to the rendering process submodule.
[0053] The rendering process submodule is further used to perform business rendering according to the data processing result, so as to update the email display interface and display the corresponding email details to the user.
[0054] (15) Sending an email. The corresponding rendering interface is an email writing interface, the corresponding user operation information is a user clicking a send button, and the corresponding user service request is an email sending request; the email sending request includes email sending content; and the email sending content includes a recipient address.
[0055] The business processing service module is also used to: in the business processing service, receive and parse the email sending request to obtain the email sending content; encode and convert the email sending content, and then store it in the local server for standby; based on the SMTP protocol, establish a connection with the mail server and after the connection is successful, send the encoded and converted email sending content stored in the local server to the target mail server via the mail server; the target mail server corresponds to the recipient address.
[0056] Based on the same inventive concept, the embodiment of the present application also provides a client application development method based on a multi-process framework, which is applied to the above-mentioned client application development platform based on a multi-process framework, and the method includes: Step 100, managing the life cycle activities of the client application and coordinating the execution of each of the client applications through the main process submodule. The relevant contents of the client application software are the same as those recorded in the client application development platform based on the multi-process framework above, and will not be repeated here.
[0057] Step 200: The business processing service module automatically starts the business processing service according to a preset start instruction, or starts the business processing service according to a received start instruction.
[0058] Step 300, the rendering process submodule performs rendering according to the received business operation instruction, and displays the rendering interface to the user, and at the same time obtains user operation information to generate a user business request, and sends the user business request to the business processing service module.
[0059] Step 400, receiving the user business request sent by the rendering process submodule through the business processing service module to perform data processing, and returning the data processing result to the rendering process submodule; the business processing service module supports development in multiple programming languages.
[0060] Step 500: Receive data processing results through the rendering process submodule and update the rendering interface.
[0061] Taking the application scenario of the email system as an example, the client application development method based on the multi-process framework of this application can also realize multiple functions such as login verification, mail list acquisition, mail collection, mail reading and mail sending, and in actual application, the above multiple functions can be realized in sequence, and when the latter function is realized, the subsequent processing can be performed based on the previously realized function. In addition, the Electron framework can be selected as needed, and the corresponding main process submodule is the Electron main process; web services can also be used as needed.
[0062] (21) Login verification, such as Figure 2 shown.
[0063] First, after the client application development platform based on the multi-process framework is started, the client of the email system is started. At this time, the main process submodule is responsible for initializing the rendering process and starting the business processing service. The rendering process submodule loads the user login interface through rendering, and the interface is displayed to the user in the form of a UI interface; the business processing service module (such as using a web service) starts to listen to the login verification request from the rendering process submodule, and polls the back-end mail server to continuously store letters in the local database. In actual applications, the rendering process display results can also be displayed to the user.
[0064] Secondly, the user enters the user name and password through the UI interface and clicks the login button, thereby sending an http or https request containing the user login information to the business processing service module, which is a login verification request.
[0065] Furthermore, after receiving the login verification request, the business processing service module parses the username and password information therein. Then, the business processing service module uses the SMTP (Simple Mail Transfer Protocol) or POP (Post Office Protocol) service to establish a connection with the back-end mail server. After successfully connecting to the mail server, the business processing service module attempts to log in to the mail server using the username and password provided by the user. The mail server responds to the login attempt and informs whether the username and password match, that is, gives the verification result. If the verification passes, the user identity is considered legitimate; if the verification fails, the login request is rejected.
[0066] Finally, the business processing service module encapsulates the verification result (login success or failure) into an HTTP response and returns it to the front-end UI interface. The rendering process submodule displays the corresponding login success or failure prompt information to the user based on the received verification result.
[0067] (22) Mailing list access, such as Figure 3 shown.
[0068] First, the user triggers the mail list acquisition operation through the front-end interface (specifically, the mail interface after successful login). This operation can be automatically triggered after successful login or manually triggered, and can be set as needed. Based on the above mail list acquisition operation, a mail list acquisition request is sent to the business processing service module. The purpose of this request is to obtain a list of mails in the user's inbox arranged in reverse chronological order.
[0069] Secondly, the business processing service module performs the corresponding database query operation according to the received mail list acquisition request, specifically retrieving the mails in the user's inbox from the SQLite database (the local database in the business processing service module) and sorting them in reverse order by timestamp, so that the user can quickly identify the newly received mails to be processed. Then, the sorted mail list data (including the unique ID of each mail, mail subject, possible sender information, etc.) is encapsulated into a response body and returned to the rendering process submodule.
[0070] Finally, the rendering process submodule parses the received response body and dynamically renders the data on the page, presenting a visual mailing list interface to the user.
[0071] (23) Receive mail, such as Figure 4 shown.
[0072] First, in the business processing service deployed in the business processing service module, a regularly running background process is set, namely the preset mail receiving process, which automatically connects to the configured mail server at a preset time interval. After the connection is successful, the preset mail receiving process synchronously retrieves all newly arrived mails since the last check (i.e., mails received within the interval), then downloads and decodes the mails, and stores the decoded mail data in a local database (such as a SQLite database) for subsequent quick access and processing.
[0073] When the email is successfully downloaded and stored in the SQLite database, the business processing service module sends a new email notification to the UI interface (i.e., the email display interface) in real time through the established WebSocket persistent connection; after receiving the notification, the rendering process submodule sends an HTTP request to the business processing service module to obtain the detailed data of the new email.
[0074] Finally, after obtaining the detailed data of the above email, the rendering process submodule uses this data to update the interface and display the summary information of the new email (such as sender, subject, date, etc.). Users can further view the detailed content of the email or perform other operations such as replying, deleting, etc. through the interactive elements on the interface.
[0075] (24) Read emails, such as Figure 5 shown.
[0076] First, the user selects and triggers the viewing of a specific email by clicking the mouse in the email display interface provided by the rendering process submodule, thereby generating an email viewing request; the email viewing request includes a unique identifier (ie, email ID) of the specific email.
[0077] Then, the rendering process submodule passes the email viewing request to the business processing service module so that the business processing service module can identify and process the request and obtain the email ID contained therein. After that, the business processing service module uses the email ID as a retrieval condition in the local database (such as a SQLlite database or data structure) to perform a query operation to find the corresponding email data, which includes the sender, recipient, email subject, email body, email sending time, etc. of the email. After successfully retrieving the email data, the business processing service module encapsulates this information in an appropriate format (such as JSON) and returns it to the rendering process submodule through an HTTP response.
[0078] Finally, the rendering process submodule parses the received data and displays it to the user in the rendering process, so that the user can view the detailed content of the email.
[0079] (25) Send emails, such as Figure 6 shown.
[0080] First, the rendering process submodule provides an email writing interface, on which the user enters the email content, including the recipient address, email subject, body content, email attachments and other necessary information. When the user clicks the send button after completing the writing of the email content, an email sending request is generated based on the email content entered by the user and sent to the business processing service module. After the business processing service module parses the received email content, it performs necessary encoding conversion (such as converting attachments to Base64, etc.) to ensure the integrity and security of the data during transmission. Then, the above-mentioned encoded information is securely stored in the local database, waiting for further processing or retained as a backup.
[0081] When further processing is to send an email, specifically, after the email is ready and stored in the local database, the business processing service module connects to the smtpd (SMTP daemon) service of the mail server through the SMTP (Simple Mail Transfer Protocol) client. This step involves identity authentication (such as using the SMTP AUTH protocol) to ensure the legitimacy of the email sending authority. Once the connection is successful and the authentication is passed, the business processing service module sends the email content stored in the local database (after appropriate protocol encapsulation) to the target mail server.
[0082] In summary, this application completely reconstructs the business processing model of desktop Web applications based on a multi-process framework by introducing an independent, cross-platform business processing service module. The business processing service module separates the originally heavy business logic processing tasks from the main process and transfers them to efficient and scalable business processing services, thereby achieving the decoupling and centralized processing of heavy-load business logic, effectively reducing the burden on the main process and avoiding performance bottlenecks caused by complex business logic processing. At the same time, this framework change makes the application framework more flexible and scalable, making it easier to cope with the rapid changes in future business needs.
[0083] The setting of the business processing service module in this application can not only ensure smooth interaction with the rendering process in the multi-process framework through various network communication protocols such as HTTP / HTTPS, WebSocket / WSS, but also make full use of the flexibility of multi-language programming, such as Java, PHP, Go, etc., to accelerate the project development and deployment process, and greatly expand the functional boundaries and adaptability of client applications based on the multi-process framework. That is, the cross-platform characteristics and multi-language support of the business processing service of this application promote the effective use and reuse of resources, reduce development costs, and provide strong support for the development of client applications based on the multi-process framework towards more professional and modular development, meet the needs of complex and changing business scenarios, and solve the problem of the skill gap between front-end developers and business developers. Therefore, this application improves the response speed, stability and maintainability of client applications based on the multi-process framework.
[0084] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations. All actions to obtain signals, information or data in this application are carried out in accordance with the relevant data protection laws and policies of the country where they are located and with the authorization of the owner of the corresponding device.
[0085] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0086] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A client application development platform based on a multi-process framework, characterized in that: The client application development platform based on the multi-process framework includes a multi-process framework module and a business processing service module; The multi-process framework module includes a main process submodule and at least one rendering process submodule; the main process submodule communicates with the rendering process submodule and the business processing service module respectively; the rendering process submodule also communicates with the business processing service module; The main process submodule is used to: manage the life cycle activities of the client application and coordinate the execution of each of the client applications; The rendering process submodule is used to: render according to the received business operation instruction, and display the rendering interface to the user, and at the same time obtain user operation information to generate a user business request, and send the user business request to the business processing service module; Receive data processing results and update the rendering interface; The business processing service module is used to: automatically start the business processing service according to a preset start instruction, or start the business processing service according to a received start instruction; Receive the user service request sent by the rendering process submodule to perform data processing, and return the data processing result to the rendering process submodule; the business processing service module supports development in multiple programming languages.
2. The client application development platform based on a multi-process framework according to claim 1, characterized in that: The main process submodule is also used to: determine the corresponding current main process according to the application requirements of the client application; generate a business operation instruction and a start instruction according to the current main process; send the business operation instruction to the rendering process submodule; send the start instruction to the business processing service module; The business processing service module is also used to: support multiple network communication protocols to assist in completing the data processing process; the business processing service is a socket service.
3. The client application development platform based on a multi-process framework according to claim 1, characterized in that: When the application scenario of the client application development platform based on the multi-process framework is an email system and the functional application is login verification, the corresponding rendering interface is a user login interface, the corresponding user operation information is a user name entered by the user, a password entered by the user, and a button type clicked by the user, and the corresponding user service request is a login verification request; The business processing service module is further used to: in the business processing service, monitor the login verification request from the rendering process submodule, and parse the login verification request upon receipt to obtain the corresponding user name and password; Establishing a connection with the mail server and after the connection is successful, using the parsed username and password to perform login verification to obtain a verification result; encapsulating the verification result as a data processing result into an HTTP response and returning it to the rendering process submodule; the verification result is verification passed or verification failed; when the verification result is verification passed, polling the mail server to store the mail in the local database for standby; The rendering process submodule is further used to perform business rendering according to the data processing result to update the user login interface and display corresponding prompt information of successful login or failed login to the user.
4. The client application development platform based on a multi-process framework according to claim 1, characterized in that: When the application scenario of the client application development platform based on the multi-process framework is an email system and the functional application is obtaining a mail list, the corresponding rendering interface is an email interface after successful login, and the corresponding user service request is a request to obtain a mail list; The business processing service module is further used for: in the business processing service, performing a corresponding database query operation according to the received mail list acquisition request to obtain mail list data sorted in a preset time sequence; encapsulating the mail list data sorted in a preset time sequence as a data processing result into a response body, and returning it to the rendering process submodule; The rendering process submodule is further used to perform business rendering according to the data processing result, so as to update the mail interface after the successful login, and display the updated mail list interface to the user.
5. The client application development platform based on a multi-process framework according to claim 1, characterized in that: When the application scenario of the client application development platform based on the multi-process framework is an email system and the functional application is receiving emails, the corresponding rendering interface is an email display interface; The business processing service module is also used to: in the business processing service, start a preset mail receiving process; the preset mail receiving process is used to automatically connect to the mail server at every preset time interval, then retrieve all mails received within the preset time interval, download and decode them, store the decoded mail data in the local database for standby, and generate a successful mail receiving reminder; send the successful mail receiving reminder to the rendering process submodule in real time through the WebSocket long connection; The rendering process submodule is further used to: send an HTTP request to the business processing service module according to the email receiving success reminder; The business processing service module is also used to: according to the HTTP request, return the mail data corresponding to all mails received within the preset time period as the data processing result to the rendering process submodule; The rendering process submodule is further used to perform business rendering according to the data processing result, so as to update the email display interface and display corresponding email summary information to the user.
6. The client application development platform based on a multi-process framework according to claim 1, characterized in that: When the application scenario of the client application development platform based on the multi-process framework is an email system and the functional application is reading emails, the corresponding rendering interface is an email display interface, the corresponding user operation information is that the user clicks to view an email, and the corresponding user service request is an email viewing request; the email viewing request includes a unique identifier of the email clicked by the user; The business processing service module is further used to: receive and parse the email viewing request in the business processing service to obtain the unique identifier; Performing data query in the local database based on the unique identifier, encapsulating the email data obtained from the query as a data processing result into a response body, and then returning it to the rendering process submodule; The rendering process submodule is further used to perform business rendering according to the data processing result, so as to update the email display interface and display the corresponding email details to the user.
7. The client application development platform based on a multi-process framework according to claim 1, characterized in that: When the application scenario of the client application development platform based on the multi-process framework is an email system and the functional application is sending emails, the corresponding rendering interface is an email writing interface, the corresponding user operation information is a user clicking a send button, and the corresponding user service request is an email sending request; the email sending request includes email sending content; the email sending content includes a recipient address; The business processing service module is further used to: receive and parse the email sending request in the business processing service to obtain the email sending content; Encoding the email content and then storing it in a local server for future use; Based on the SMTP protocol, a connection is established with the mail server and after the connection is successful, the encoded and converted mail content stored in the local server is sent to the target mail server via the mail server; the target mail server corresponds to the recipient address.
8. The client application development platform based on a multi-process framework according to claim 1, characterized in that: The business processing service module also communicates with the cloud; the business processing service module is also used to: when performing data processing, interact with the cloud to achieve data storage or data call.
9. A client application development method based on a multi-process framework, applied to a client application development platform based on a multi-process framework as claimed in any one of claims 1 to 8, characterized in that: The client application development method based on the multi-process framework includes: Managing the lifecycle activities of client applications and coordinating the execution of each of the client applications through the main process submodule; The business processing service module automatically starts the business processing service according to a preset start instruction, or starts the business processing service according to a received start instruction; The rendering process submodule performs rendering according to the received business operation instruction, and displays the rendering interface to the user, and at the same time obtains the user operation information to generate a user business request, and sends the user business request to the business processing service module; The business processing service module receives the user business request sent by the rendering process submodule for data processing, and returns the data processing result to the rendering process submodule; the business processing service module supports development in multiple programming languages; The data processing result is received through the rendering process submodule and the rendering interface is updated.
10. The client application development method based on a multi-process framework according to claim 9, characterized in that: The application requirements of the client application include management of life cycle events, management of window creation events, interaction with the operating system, and execution of preset lightweight services.
Citation Information
Patent Citations
Page display method and device for hybrid application and medium
CN110457621A
Data processing method and device, electronic equipment and storage medium
CN115525401A
Page access method, electronic equipment and computer readable storage medium
CN117093303A
Device-independent application development based on business processes
US20140317596A1
Cited By
Multi-process framework-based client application development platform and method
WO2026108773A1
