Hybrid development-based multi-cloud environment joint debugging method, device, system and equipment
Patent Information
- Application Number
- CN202210707735.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-06-21
AI Technical Summary
[0004]在原生应用内嵌H5的开发模式中大多数情况是原生应用和内嵌H5分别独立开发,一个应用具有多个云端环境版本时,多云端环境的内嵌H5要进行充分测试联调便需要原生应用开发侧频繁切换内嵌H5云端环境地址,导致开发效率降低,沟通成本提高
Smart Images

Figure CN115080109B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of cloud computing, and more specifically to a method, apparatus, device, medium, and program product for coordinating and debugging a multi-cloud environment based on hybrid development. Background Technology
[0002] Hybrid development refers to the combined application of native and HTML5 (HTML5, a language for describing web content) development technologies when developing a mobile application to improve efficiency and save costs. In mobile hybrid development scenarios, HTML5 pages are typically embedded within the web container of the native application, working together to fulfill business requirements.
[0003] In the process of realizing the inventive concept of this disclosure, the inventors discovered at least the following problems in the related technology:
[0004] In the development model of embedding H5 in native applications, the native application and the embedded H5 are usually developed independently. When an application has multiple cloud environment versions, the native application development side needs to frequently switch the cloud environment address of the embedded H5 to fully test and debug the embedded H5 in multiple cloud environments, which leads to reduced development efficiency and increased communication costs. Summary of the Invention
[0005] In view of the above problems, this disclosure provides a method, apparatus, device, medium and program product for joint debugging in a multi-cloud environment based on hybrid development, which improves development efficiency and reduces communication costs.
[0006] One aspect of this disclosure provides a method for joint debugging in a multi-cloud environment based on hybrid development, for a first host, comprising: receiving a first request sent by a native application client, wherein the native application client is deployed on a second host, the first request including a target application option selected by a user on the native application client; sending the first request to a target access address to access target HTML5 code corresponding to the target application option, wherein the target access address is determined based on the target application option and the user's identity identifier, the target access address including a target HTML5 code address or a target cloud host address; wherein the first host is configured with N HTML5 code addresses including the target HTML5 code address, and / or N cloud host addresses including the target cloud host address, the N HTML5 code addresses corresponding one-to-one with N HTML5 code deployed on the first host, and the N cloud host addresses corresponding one-to-one with the N HTML5 code deployed on the N cloud hosts, where N is an integer greater than or equal to 1.
[0007] According to an embodiment of this disclosure, a forwarding proxy server is deployed in the first host, comprising: enabling the forwarding proxy server to receive the first request; wherein, sending the first request to the target access address comprises: enabling the forwarding proxy server to forward the first request to the target access address.
[0008] According to embodiments of this disclosure, the N application options include the target application options. Before receiving the first request sent by the native application, the method further includes: receiving a second configuration file sent by the second host, wherein the second configuration file includes a first mapping relationship between the N application options and the N HTML5 code addresses, and / or a second mapping relationship between the N application options and the N cloud host addresses; and causing the forwarding proxy server to perform the operation of accessing the N HTML5 codes according to the second configuration file.
[0009] According to embodiments of this disclosure, before the forwarding proxy server forwards the first request to the target access address, the method further includes: determining the target access address based on the first mapping relationship when the user's identity identifier is a development class identifier; or determining the target access address based on the second mapping relationship when the user's identity identifier is a test class identifier.
[0010] According to an embodiment of this disclosure, before receiving the first request sent by the native application, the method further includes: receiving the N HTML5 codes sent by the second host, wherein the N HTML5 codes are pre-compiled and packaged in the second host; storing the N HTML5 codes in N first directories respectively; and using the addresses of the N first directories as the addresses of the N HTML5 codes.
[0011] According to embodiments of this disclosure, before receiving the first request sent by the native application, the method further includes: receiving a second request sent by the user through the native application, wherein the second request includes the user's identity identifier; responding to the second request, returning second request data to the user; wherein the native application is configured to display a transit hub page to the user based on the second request data, the transit hub page including N application options, the user selecting the target application option from the N application options, and the N application options corresponding one-to-one with the N HTML5 codes.
[0012] According to an embodiment of this disclosure, before receiving the first request sent by the native application client, the method further includes: receiving the HTML5 code of the relay hub page sent by the second host, wherein the HTML5 code of the relay hub page is pre-compiled and packaged in the second host; storing the HTML5 code of the relay hub page in a second directory; wherein the HTML5 code of the relay hub page includes configuration parameters for each of the N application options, and the native application client is configured to generate the corresponding first request according to the configuration parameters of each application option.
[0013] Another aspect of this disclosure provides a method for joint debugging in a multi-cloud environment based on hybrid development, for a second host, comprising: receiving a first operation by a user on a native application, wherein the first operation is used to select a target application option; and sending a first request to a first host according to the target application option selected by the user, wherein the first request includes the target application option, and the first host is configured to execute the method described above.
[0014] According to embodiments of this disclosure, before receiving the first operation from the user on the native application, the method further includes: receiving a second operation from the user on the native application, wherein the second operation is used to invoke a transit hub page; sending a second request to the first host according to the second operation; receiving second request data returned by the first host in response to the second request; and displaying the transit hub page to the user according to the second request data, wherein the transit hub page includes N application options, the user selects a target application option from the N application options, and the N application options correspond one-to-one with N HTML5 codes.
[0015] Another aspect of this disclosure provides a multi-cloud environment co-firing device based on hybrid development, for a first host, comprising: a first receiving module, configured to receive a first request sent by a native application client, wherein the native application client is deployed on a second host, and the first request includes a target application option selected by a user on the native application client; a first sending module, configured to send the first request to a target access address to access target HTML5 code corresponding to the target application option, wherein the target access address is determined based on the target application option and the user's identity identifier, and the target access address includes a target HTML5 code address or a target cloud host address; wherein the first host is configured with N HTML5 code addresses including the target HTML5 code address, and / or N cloud host addresses including the target cloud host address, the N HTML5 code addresses corresponding one-to-one with N HTML5 codes deployed on the first host, and the N cloud host addresses corresponding one-to-one with the N HTML5 codes deployed on the N cloud hosts, where N is an integer greater than or equal to 1.
[0016] Another aspect of this disclosure provides a multi-cloud environment co-operation device based on hybrid development for a second host, comprising: a second receiving module for receiving a first operation by a user on a native application, wherein the first operation is used to select a target application option; the second receiving module for sending a first request to a first host according to the target application option selected by the user, wherein the first request includes the target application option, and the first host is configured to execute the method of any one of claims 1 to 7.
[0017] Another aspect of this disclosure provides a multi-cloud environment co-operation system based on hybrid development, comprising: a first host, configured to receive a first operation by a user on a native application, wherein the first operation is used to select a target application option; and to send a first request to the first host according to the target application option selected by the user, wherein the first request includes the target application option; a second host, configured to receive the first request sent by the native application; and to send the first request to a target access address to access the target HTML5 code corresponding to the target application option, wherein the target access address is determined according to the target application option and the user's identity identifier, and the target access address includes a target HTML5 code address or a target cloud host address; and N cloud hosts, wherein, when the target access address is the target cloud host address, the target cloud host among the N cloud hosts is used to receive the first request sent by the second host, where N is an integer greater than or equal to 1.
[0018] Another aspect of this disclosure provides an electronic device, including: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the method as described above.
[0019] Another aspect of this disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method described above.
[0020] Another aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0021] The above one or more embodiments have the following beneficial effects: A first host receives a first request sent by a native application client and forwards the first request to a target access address to access the target HTML5 code corresponding to the target application option. The first host is configured with N HTML5 code addresses, including the target HTML5 code address, and / or N cloud host addresses, including the target cloud host address. Based on the target application option and the user's identity, it is determined whether the target access address is an address among the N HTML5 code addresses or an address among the N cloud host addresses. By utilizing the relay function of the first host and determining the target access address, the complexity of frequently switching embedded H5 cloud environment addresses in related technologies is reduced, switching time is reduced, development efficiency is improved, and communication costs are lowered. Attached Figure Description
[0022] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0023] Figure 1 This diagram illustrates an application scenario of the multi-cloud environment co-firing method based on hybrid development according to an embodiment of the present disclosure.
[0024] Figure 2 A flowchart illustrating a multi-cloud environment co-firing method based on hybrid development according to an embodiment of the present disclosure is shown schematically.
[0025] Figure 3 A flowchart illustrating the configuration mapping relationship according to an embodiment of the present disclosure is shown schematically;
[0026] Figure 4 A flowchart illustrating the deployment of N HTML5 code snippets according to an embodiment of this disclosure is shown schematically.
[0027] Figure 5A flowchart illustrating the return of second request data according to an embodiment of this disclosure is shown schematically;
[0028] Figure 6 A flowchart illustrating the forwarding of a first request according to an embodiment of this disclosure is shown schematically;
[0029] Figure 7 A flowchart illustrating a multi-cloud environment co-firing method based on hybrid development according to another embodiment of the present disclosure is shown schematically.
[0030] Figure 8 A flowchart illustrating the display of a transit hub page according to an embodiment of this disclosure is shown schematically;
[0031] Figure 9 A flowchart illustrating a multi-cloud environment co-firing method based on hybrid development according to another embodiment of the present disclosure is shown schematically.
[0032] Figure 10 This schematically illustrates the architecture of a multi-cloud environment co-development system based on hybrid development according to an embodiment of the present disclosure;
[0033] Figure 11 This schematically illustrates a structural block diagram of a multi-cloud environment co-firing device for a first host based on hybrid development, according to an embodiment of the present disclosure.
[0034] Figure 12 A schematic diagram illustrates a structural block diagram of a multi-cloud environment co-firing device for a second host based on hybrid development, according to an embodiment of the present disclosure; and
[0035] Figure 13 A block diagram schematically illustrates an electronic device suitable for implementing a multi-cloud environment co-firing method based on hybrid development, according to embodiments of the present disclosure. Detailed Implementation
[0036] To facilitate understanding of the technical solutions of the embodiments of this disclosure, some technical terms involved in this disclosure will be introduced first.
[0037] Hybrid development refers to the use of a combination of native and HTML5 development technologies when developing an App (Application) product in order to improve efficiency and save costs.
[0038] Embedded H5: refers to H5 pages loaded using a webview container within a native application (iOS App / Android App).
[0039] Multi-cloud environment: refers to the need to deploy multiple server environments simultaneously during business development to verify, test, and debug different versions of the code.
[0040] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0041] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0042] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0043] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0044] In related technologies, when developing or testing a mobile application, the local host may directly connect to a cloud host, or multiple people may share a single development environment. It's possible that one person can only switch to deploying version A of the embedded H5 code to cloud host A after developing or testing the native application, and another person can only do so. Each switch requires recompiling, repackaging, and deploying the front-end resources for each version. Therefore, the switching process involves excessively long waiting times, high communication costs between the two developers, and time required for compilation and packaging, leading to reduced development efficiency and increased communication costs.
[0045] In hybrid development of native applications with embedded H5, to reduce communication costs and improve development efficiency, some developers adopt a method of independently developing and debugging in an external browser before deploying to a cloud environment, and then conducting real-world testing on the native application. While this approach speeds up development to some extent, debugging in an external browser cannot accurately identify code defects, especially when there is data interaction between the embedded H5 and the native application, where this method becomes even more inadequate.
[0046] This disclosure provides a method, apparatus, device, medium, and program product for joint debugging in a multi-cloud environment based on hybrid development. A first host receives a first request from a native application and forwards it to a target access address to access the target HTML5 code corresponding to the target application option. The first host is configured with N HTML5 code addresses, including the target HTML5 code address, and / or N cloud host addresses, including the target cloud host address. Based on the target application option and the user's identity, the target access address is determined to be either one of the N HTML5 code addresses or one of the N cloud host addresses. This leverages the relay function of the first host to reduce the complexity of frequently switching embedded H5 cloud environment addresses in related technologies, reducing switching time, improving development efficiency, and lowering communication costs.
[0047] Figure 1 The diagram illustrates an application scenario of the multi-cloud environment co-firing method based on hybrid development according to an embodiment of the present disclosure.
[0048] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 141, 142, and 143 located on the local side, a first host 120 responsible for relay purposes, and N cloud hosts (first cloud host 111, second cloud host 112, third cloud host 113... Nth cloud host 11N). Network 130 is used as a medium to provide a communication link between terminal devices 141, 142, and 143 and the first host 120. Network 130 may also be used as a medium to provide a communication link between the N cloud hosts and the first host 120 (not shown). Network 130 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0049] Users can use terminal devices 141, 142, and 143 to interact with the first host 120 via network 130 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 141, 142, and 143, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0050] Terminal devices 141, 142, and 143, acting as a second host (local host), can be various electronic devices with a display screen and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0051] The first host 120 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 141, 142, and 143 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0052] N cloud hosts can be N cloud servers, and each cloud server can represent a cloud environment. The native application client installs the application's framework, while the application's data is retrieved from the cloud server and presented to the user each time the client is opened.
[0053] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0054] The following will be based on Figure 1 The described scene, through Figures 2-9 The multi-cloud environment joint debugging method based on hybrid development, according to the embodiments of this disclosure, will be described in detail.
[0055] Figure 2 A flowchart illustrating a multi-cloud environment co-firing method based on hybrid development according to an embodiment of the present disclosure is shown.
[0056] like Figure 2 As shown, the multi-cloud environment joint debugging method based on hybrid development in this embodiment includes operations S210 to S220.
[0057] During operation S210, a first request is received from the native application client, which is deployed on the second host. The first request includes the target application option selected by the user on the native application client.
[0058] Reference Figure 1 The native application can be installed on terminal devices 141, 142, and 143. The native application is an application developed based on native technologies (Native App), which can use embedded H5 pages loaded by a webview container. The first request can be an HTTP request.
[0059] For example, the native application can display N application options, such as N different applications, or N versions of a single application. The target application option can be any one of the N options. The user can send the target application option via command line. Alternatively, a visual selection page can be provided for the user, allowing them to click on the target application option.
[0060] In operation S220, a first request is sent to the target access address to access the target HTML5 code corresponding to the target application option. The target access address is determined based on the target application option and the user's identity. The target access address includes the target HTML5 code address or the target cloud host address.
[0061] The first host is configured with N HTML5 code addresses, including the target HTML5 code address, and / or N cloud host addresses, including the target cloud host address. The N HTML5 code addresses correspond one-to-one with the N HTML5 code deployed on the first host, and the N cloud host addresses correspond one-to-one with the N HTML5 code deployed on the N cloud hosts. N is an integer greater than or equal to 1.
[0062] For example, N cloud hosts each have N HTML5 code installed.
[0063] For example, accessing the target HTML5 code could be obtaining an embedded H5 page loaded by a webview container. Users can obtain the corresponding front-end resources on terminal devices 141, 142, and 143 and perform debugging, such as debugging the interaction flow between the native application and the H5 page in one or more scenarios to determine whether it meets the requirements.
[0064] For example, a user's identity can determine whether to access code on a first host or code on a cloud host, thereby determining whether the target access address comes from N HTML5 code addresses or N cloud host addresses based on the target application options.
[0065] For example, during the development phase, developers can access N HTML5 codebases on the primary host to obtain the corresponding front-end resources for development. During the testing phase, testers can access the corresponding HTML5 codebase on the cloud host to perform application testing.
[0066] According to embodiments of this disclosure, a first host receives a first request sent by a native application and forwards the first request to a target access address to access the target HTML5 code corresponding to the target application option. The first host is configured with N HTML5 code addresses, including the target HTML5 code address, and / or N cloud host addresses, including the target cloud host address.
[0067] Users can switch between cloud environment versions by selecting any application option in the native application. Multiple users can simultaneously select the appropriate target application option for their own purposes to perform debugging. Furthermore, N HTML5 codes can be pre-deployed on the first host or N cloud hosts, reducing waiting time, high communication costs, and compilation and packaging time.
[0068] Therefore, based on the target application options and the user's identity, the target access address is determined to be either one of N HTML5 code addresses or one of N cloud host addresses. By leveraging the relay role of the first host, the complexity of frequently switching embedded H5 cloud environment addresses in related technologies is reduced, switching time is reduced, development efficiency is improved, and communication costs are reduced.
[0069] The following describes the configuration operation before operating S210 through one or more embodiments.
[0070] Figure 3 A flowchart illustrating the configuration mapping relationship according to an embodiment of the present disclosure is shown schematically.
[0071] like Figure 3 As shown, a forwarding proxy server is deployed in the first host, and N application options include target application options. Before receiving the first request sent by the native application, the configuration mapping relationship in this embodiment includes operations S310 to S320.
[0072] During operation S310, a second configuration file is received from the second host. This second configuration file includes a first mapping relationship between N application options and N HTML5 code addresses, and / or a second mapping relationship between the N application options and N cloud host addresses. That is, each application option corresponds to either an HTML5 code address or a cloud host address.
[0073] When operating S320, the forwarding proxy server is instructed to perform operations to access N HTML5 code snippets based on the second configuration file.
[0074] For example, a forwarding proxy server can include web servers such as Apache, Nginx, and Microsoft IIS. The web server and the native application can have a one-to-many relationship, capable of providing services to multiple applications simultaneously, thus allowing multiple users to access the service.
[0075] Taking Nginx server as an example, the Nginx configuration file is generated on the second host. After the final Nginx configuration file is generated, it is uploaded to the relay host. Then, the Nginx is restarted by remotely executing the reload command to make the configuration file take effect, so that the Nginx server can execute N HTML5 code operations according to the second configuration file.
[0076] According to embodiments of this disclosure, N application options are mapped one by one to addresses in a multi-cloud environment, and can be mapped to different HTML5 code in a first host or to multiple cloud hosts, enabling flexible access to HTML5 code in the first host or cloud hosts.
[0077] Figure 4 The flowchart illustrating the deployment of N HTML5 codes according to an embodiment of the present disclosure is shown schematically.
[0078] like Figure 4 As shown, before receiving the first request sent by the native application, the deployment of N HTML5 code in this embodiment includes operations S410 to S430.
[0079] When operating S410, it receives N HTML5 code snippets sent by the second host. These N HTML5 code snippets are pre-compiled and packaged in the second host.
[0080] When operating S420, store N HTML5 code snippets in N first directories.
[0081] For example, each first directory can be in the form of a folder, used to store the corresponding HTML5 code.
[0082] When operating S430, the addresses of N first directories are used as the addresses of N HTML5 code.
[0083] For example, the address of the first directory can be the access path of the code files in the folder.
[0084] According to embodiments of this disclosure, in a mobile hybrid development mode, embedded H5 pages of iOS / Android applications can be packaged into a unified cloud server (i.e., the first host) and stored in separate directories for each version of the code. Each version of the code corresponds to a different cloud environment, which can be considered as being mapped to each cloud environment through a forwarding proxy server. In other words, during the development phase, the forwarding proxy server can be used to access the code in each of the first directories to achieve access to the code in the corresponding cloud environment.
[0085] According to embodiments of this disclosure, before receiving the first request sent by the native application, the method further includes: receiving HTML5 code of a relay hub page sent by a second host, wherein the HTML5 code of the relay hub page is pre-compiled and packaged on the second host. The HTML5 code of the relay hub page is stored in a second directory. The HTML5 code of the relay hub page includes configuration parameters for each of N application options, and the native application is configured to generate a corresponding first request based on the configuration parameters of each application option.
[0086] For example, the transit hub page can be a page developed using native technologies and deployed on the device, or it can be an H5 page implemented using hybrid development technologies and deployed on a cloud server. When it is an H5 page, its HTML5 code can be stored separately in a second directory. This serves to maintain it separately from the application's multiple HTML5 codebases. For instance, if the transit hub page is updated less frequently than the application, separating the directories reduces the maintenance cost of the transit hub page.
[0087] When the transit hub page is generated, firstly, the front-end project on the second host side issues a build command. Then, it reads the configuration file and populates the transit page with data. The configuration parameter data format for the three application options is as follows:
[0088]
[0089] Here, `frontend` is a configuration item for the business host address, and `month` is the display name for the interface options, such as naming different versions by month. `isNeedKf` and `isNeedGn` determine whether the display of the front-end page is taken from the primary host or the cloud host based on the user's identity. After the configuration data is filled in, the transit page begins to compile and package to generate the hub page resources, and finally uploads them to the primary host.
[0090] The following describes the process of joint debugging using this method through one or more embodiments.
[0091] Figure 5 A flowchart illustrating the return of second request data according to an embodiment of this disclosure is shown schematically.
[0092] like Figure 5 As shown, before receiving the first request sent by the native application, this embodiment returns the second request data including operations S510 to S520.
[0093] When operating S510, a second request sent by the user through the native application is received, wherein the second request includes the user's identity identifier.
[0094] For example, the second request can be an HTTP request.
[0095] When operating the S520, in response to the second request, the second request data is returned to the user. The native application is configured to display a transit hub page to the user based on the second request data. The transit hub page includes N application options, from which the user selects the target application option. Each of the N application options corresponds one-to-one with a specific HTML5 code.
[0096] Test users or developers can access the native application (Android / iOS) and initiate a second request by clicking a touchpoint button related to the business scenario. After parsing the second request data, the native application redirects to a central page. Users can then select the target application option on the interface, and the current page will redirect to the corresponding target access address, displaying the page with the corresponding HTML5 code.
[0097] For example, during the development phase, developers can access the target HTML5 code deployed on the primary host to obtain front-end resources for development. After development is complete, it can be deployed to the corresponding cloud host. During the testing phase, testers can access the HTML5 code deployed on the target cloud host for testing.
[0098] According to embodiments of this disclosure, the transit hub page is an external user interface. Users can select the target application option through this interface to enter the corresponding HTML5 code page. The native application client configures the cloud-based transit hub page once, and development or testing users can select the target application option through the visual interface of the hub page to enter the actual H5 page, improving development efficiency and reducing communication costs.
[0099] Figure 6 A flowchart illustrating the forwarding of a first request according to an embodiment of this disclosure is shown.
[0100] like Figure 6 As shown, the forwarding of the first request in this embodiment includes operations S610 to S620. Operation S620 is one embodiment of operation S220.
[0101] When operating the S610, the forwarding proxy server receives the first request.
[0102] When operating the S620, the forwarding proxy server forwards the first request to the target access address.
[0103] According to embodiments of this disclosure, when the user's identity is a development-type identifier, the target access address is determined based on a first mapping relationship. Alternatively, when the user's identity is a test-type identifier, the target access address is determined based on a second mapping relationship.
[0104] According to embodiments of this disclosure, by utilizing the forwarding proxy function of a forwarding proxy server, users can select any application option on the native application side to adapt to the development or testing phase, enabling access to code within a first host or cloud host, as well as access by one or more users. The forwarding proxy facilitates users switching between different cloud environments; for example, during the development phase, accessing the code corresponding to the cloud environment on the first host achieves the purpose of switching cloud environments, while during the testing phase, direct access to the cloud host is possible.
[0105] Figure 7 A flowchart illustrating a multi-cloud environment co-firing method based on hybrid development according to another embodiment of the present disclosure is shown.
[0106] like Figure 7 As shown, the multi-cloud environment co-computation method of this embodiment is used for the second host and includes operations S710 to S720.
[0107] When operating the S710, the system receives the user's first action on the native application, where the first action is used to select the target application option.
[0108] During operation of S720, based on the target application option selected by the user, a first request is sent to the first host, wherein the first request includes the target application option, and the first host is configured to execute... Figures 2-6 Corresponding embodiments of the method shown.
[0109] According to embodiments of this disclosure, users can select the target application option from different application options on the native application side to access the target HTML5 code, which at least partially solves the problem of reduced development efficiency and increased communication costs caused by frequent switching of embedded H5 cloud environment addresses in related technologies.
[0110] Figure 8 A flowchart illustrating a presentation of a transit hub page according to an embodiment of this disclosure is shown schematically.
[0111] like Figure 8 As shown, before receiving the user's first operation on the native application, the display relay hub page in this embodiment includes operations S810 to S840.
[0112] When operating the S810, a second operation from the user on the native application is received, wherein the second operation is used to call the transit hub page.
[0113] For example, the second operation includes the user clicking a touchpoint button for a business scenario on the native application to invoke the transit hub page.
[0114] During operation S820, a second request is sent to the first host according to the second operation.
[0115] In operation S830, the second request data is received from the first host in response to the second request.
[0116] When operating S840, a transit hub page is displayed to the user based on the second request data. The transit hub page includes N application options. The user selects the target application option from the N application options. The N application options correspond one-to-one with N HTML5 code snippets.
[0117] According to embodiments of this disclosure, the native application client can configure the cloud transit hub page once, and developers or testers can select the target application option through the visual interface of the hub page to enter the real H5 page, thereby improving development efficiency and reducing communication costs.
[0118] Figure 9 A flowchart illustrating a multi-cloud environment co-firing method based on hybrid development according to another embodiment of the present disclosure is shown.
[0119] Reference Figure 9 The multi-cloud environment co-computation method of this embodiment illustrates the interaction flow between the first host, the second host, and the cloud host, and may include operations S901 to 909.
[0120] When operating the S901, configure the relay hub page, forwarding proxy server, and N HTML5 code files, and transfer them to the first host via FTP.
[0121] For the relay hub page, firstly, the frontend of the second host issues a build command. Then, it reads the second configuration file. Next, it populates the relay hub page with data according to the contents of the second configuration file. Then, after the configuration data is populated, the relay hub page begins to be compiled and packaged. Finally, the compiled and packaged relay hub page resources are transferred to the first host via FTP.
[0122] For forwarding proxy servers, refer to the procedures for S310 to S320; details will not be elaborated here.
[0123] For N HTML5 code snippets, refer to steps S410 to S430; details will not be elaborated here.
[0124] In operation S902, the second host receives the second operation from the user on the native application and sends a second request to the first host, as described in operations S810 to S820, which will not be repeated here.
[0125] In operation S903, the second host receives the second request data returned by the first host in response to the second request, and displays the transit hub page to the user. Refer to operations S830 to S840, which will not be described in detail here.
[0126] In operation S904, the second host receives the user's first operation on the native application and sends a first request to the first host. The first operation may be the user selecting a target application option from N application options displayed on the transit hub page. Refer to operations S710 to S720, which will not be elaborated here.
[0127] In operation S905, the first host receives the first request sent by the native application and determines whether the user's identity is a development class identifier (for example only). If yes, then operation S906 is executed. If not, then operation S908 is executed.
[0128] When operating S906, the Nginx server on the first host sends the first request to the target HTML5 code address among N HTML5 code addresses.
[0129] In operation S907, front-end resource data is returned based on the target HTML5 code accessed in operation S906.
[0130] When operating S908, the Nginx server on the first host sends the first request to the target cloud host address among N cloud host addresses.
[0131] During operation S909, the target cloud host returns front-end resource data based on the target HTML5 code accessed through operation S908. This data can be returned directly to the second host or relayed to an Nginx server.
[0132] According to embodiments of this disclosure, developers can easily configure a transit page hub address in the native application. By operating on this page alone, they can access multiple corresponding H5 page addresses, reducing the time and communication costs incurred by repeatedly switching addresses or servers between the native application and the H5 application during development and debugging.
[0133] Figure 10 The diagram illustrates the architecture of a multi-cloud environment co-development system based on hybrid development according to an embodiment of the present disclosure.
[0134] like Figure 10 As shown, the multi-cloud environment integration system 1000 of this embodiment includes a network FTP transmission module, a network HTTP transmission module, a local host 1010 (i.e., the second host), a relay host 1020 (i.e., the first host), and N cloud hosts 1030 (such as cloud host A, cloud host B, cloud host C, etc.). The local host 1010, the relay host 1020, and the N cloud hosts 1030 can respectively execute the following... Figure 9 The corresponding operations in the method shown.
[0135] Local host 1010 is responsible for compiling and packaging front-end resources and initializing configuration files, then transferring the relevant data to relay host 1020 via a network FTP transfer module. Relay host 1020 acts as the main hub, defining a front-end resource directory to store compiled resources for various version branches. Front-end resources unrelated to business logic are stored in a separate directory on the relay hub page, with resource management and mapping handled by the Nginx web server. The N cloud hosts 1030 act as the final host hosts, with requests proxied by the relay server being routed to the destination resources on each cloud host via HTTP requests at the network layer.
[0136] The first host 1010 is used to receive a first operation from the user on the native application, wherein the first operation is used to select a target application option. And, based on the target application option selected by the user, sends a first request to the first host, wherein the first request includes the target application option.
[0137] The second host 1020 is used to receive the first request sent by the native application client and to send the first request to the target access address to access the target HTML5 code corresponding to the target application option. The target access address is determined based on the target application option and the user's identity, and the target access address includes the target HTML5 code address or the target cloud host address.
[0138] When the target access address is the target cloud host address, the target cloud host among the N cloud hosts 1030 is used to receive the first request sent by the second host, where N is an integer greater than or equal to 1.
[0139] Based on the above-described method for joint debugging in a multi-cloud environment using hybrid development, this disclosure also provides a device for joint debugging in a multi-cloud environment using hybrid development. The device will be described in detail below.
[0140] Figure 11 The schematic diagram illustrates a structural block diagram of a multi-cloud environment co-firing device for a first host based on hybrid development, according to an embodiment of the present disclosure.
[0141] like Figure 11 As shown, the multi-cloud environment co-operation device 1100 of this embodiment includes a first transmitting module 1110 and a first receiving module 1120.
[0142] The first receiving module 1110 can perform operation S210 to receive a first request sent by the native application client, wherein the native application client is deployed on the second host, and the first request includes the target application option selected by the user on the native application client.
[0143] The first sending module 1120 can perform operation S220 to send a first request to the target access address to access the target HTML5 code corresponding to the target application option. The target access address is determined based on the target application option and the user's identity. The target access address includes the target HTML5 code address or the target cloud host address.
[0144] The first host is configured with N HTML5 code addresses, including the target HTML5 code address, and / or N cloud host addresses, including the target cloud host address. The N HTML5 code addresses correspond one-to-one with the N HTML5 code deployed on the first host, and the N cloud host addresses correspond one-to-one with the N HTML5 code deployed on the N cloud hosts. N is an integer greater than or equal to 1.
[0145] According to embodiments of this disclosure, the multi-cloud environment co-operation device 1100 may further include a configuration module, which can execute operations S310-S320 and S410-S430, which will not be described in detail here. This module can also be used to receive the HTML5 code of the relay hub page sent by the second host, wherein the HTML5 code of the relay hub page is pre-compiled and packaged in the second host. The HTML5 code of the relay hub page is stored in a second directory.
[0146] According to the embodiments of this disclosure, the first receiving module 1110 can perform operations S510 to S520, which will not be described in detail here.
[0147] According to the embodiments of this disclosure, the first sending module 1120 can perform operations S610 to S620, which will not be described in detail here.
[0148] Figure 12 The schematic diagram illustrates a structural block diagram of a hybrid development-based multi-cloud environment co-firing device for a second host according to an embodiment of the present disclosure.
[0149] like Figure 12 As shown, the multi-cloud environment co-operation device 1200 based on hybrid development in this embodiment includes a second transmitting module 1210 and a second transmitting module 1220.
[0150] The second receiving module 1210 can perform operation S710 to receive the first operation of the user on the native application, wherein the first operation is used to select the target application option.
[0151] The second receiving module 1220 can perform operation S720, which sends a first request to the first host according to the target application option selected by the user, wherein the first request includes the target application option, and the first host is configured to execute... Figures 2-7 Corresponding embodiments of the method shown.
[0152] According to embodiments of this disclosure, the multi-cloud environment debugging device 1200 may further include a display module, which can perform operations S810 to S840, which will not be described in detail here.
[0153] It should be noted that the implementation methods, technical problems solved, functions achieved, and technical effects of each module / unit / subunit in the device embodiments are the same as or similar to the implementation methods, technical problems solved, functions achieved, and technical effects of each corresponding step in the method embodiments, and will not be repeated here.
[0154] According to embodiments of this disclosure, any multiple modules in the hybrid-developed multi-cloud environment co-firing device 1100 or 1200 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module.
[0155] According to embodiments of this disclosure, at least one of the hybrid-developed multi-cloud environment debugging devices 1100 or 1200 can be at least partially implemented as hardware circuits, such as field-programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits (ASICs), or any other reasonable means of integrating or packaging circuits, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three methods. Alternatively, at least one of the hybrid-developed multi-cloud environment debugging devices 1100 or 1200 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0156] Figure 13 A block diagram schematically illustrates an electronic device suitable for implementing a multi-cloud environment co-firing method based on hybrid development, according to embodiments of the present disclosure.
[0157] like Figure 13As shown, an electronic device 1300 according to an embodiment of the present disclosure includes a processor 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage portion 1308 into a random access memory (RAM) 1303. The processor 1301 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1301 may also include onboard memory for caching purposes. The processor 1301 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0158] RAM 1303 stores various programs and data required for the operation of electronic device 1300. Processor 1301, ROM 1302, and RAM 1303 are interconnected via bus 1304. Processor 1301 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1302 and / or RAM 1303. It should be noted that programs may also be stored in one or more memories other than ROM 1302 and RAM 1303. Processor 1301 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
[0159] According to embodiments of this disclosure, the electronic device 1300 may further include an input / output (I / O) interface 1305, which is also connected to a bus 1304. The electronic device 1300 may also include one or more of the following components connected to the I / O interface 1305: an input section 1306 including a keyboard, mouse, etc.; an output section 1307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN card, modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. A removable medium 1311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1310 as needed so that computer programs read from it can be installed into the storage section 1308 as needed.
[0160] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0161] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 1302 and / or RAM 1303 and / or one or more memories other than ROM 1302 and RAM 1303 described above.
[0162] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this disclosure.
[0163] When the computer program is executed by the processor 1301, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0164] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1309, and / or installed from the removable medium 1311. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0165] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1309, and / or installed from the removable medium 1311. When the computer program is executed by the processor 1301, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0166] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0167] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0168] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0169] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for joint debugging in a multi-cloud environment based on hybrid development, used as a first host, comprising: The system receives a first request sent by a native application client, wherein the native application client is deployed on a second host, the first request includes a target application option selected by the user on the native application client, the native application client displays N application options, the user selects the target application option from the N application options, and the N application options correspond one-to-one with N HTML5 code snippets; The first request is sent to the target access address to access the target HTML5 code corresponding to the target application option, so as to obtain the embedded H5 page of the native application. The target access address is determined according to the target application option and the user's identity. The target access address includes the target HTML5 code address or the target cloud host address. The first host is configured with N HTML5 code addresses, including the target HTML5 code address, and / or N cloud host addresses, including the target cloud host address. The N HTML5 code addresses correspond one-to-one with the N HTML5 code deployed on the first host, and the N cloud host addresses correspond one-to-one with the N HTML5 code deployed on the N cloud hosts. N is an integer greater than or equal to 1.
2. The method according to claim 1, wherein, The first host is equipped with a forwarding proxy server, including: The forwarding proxy server is instructed to receive the first request. Sending the first request to the target access address includes: The forwarding proxy server then forwards the first request to the target access address.
3. The method according to claim 2, wherein, The N application options include the target application options. Prior to receiving the first request sent by the native application, the method further includes: Receive a second configuration file sent by the second host, wherein the second configuration file includes a first mapping relationship between the N application options and the N HTML5 code addresses, and / or a second mapping relationship between the N application options and the N cloud host addresses; The forwarding proxy server is instructed to perform the operation of accessing the N HTML5 codes according to the second configuration file.
4. The method according to claim 3, wherein, Before the forwarding proxy server forwards the first request to the target access address, the method further includes: When the user's identity is a development class identifier, the target access address is determined according to the first mapping relationship; or When the user's identity is a test class identifier, the target access address is determined according to the second mapping relationship.
5. The method according to claim 1, wherein, Before receiving the first request sent by the native application, the following is also included: Receive the N HTML5 code snippets sent by the second host, wherein the N HTML5 code snippets have been pre-compiled and packaged in the second host; The N HTML5 code snippets are stored in N first directories respectively; The addresses of the N first directories are used as the addresses of the N HTML5 code.
6. The method according to any one of claims 1 to 5, wherein, Before receiving the first request sent by the native application, the following is also included: Receive a second request sent by the user through the native application, wherein the second request includes the user's identity identifier; In response to the second request, the second request data is returned to the user; The native application is configured to display a transit hub page to the user based on the second request data, and the transit hub page includes the N application options.
7. The method according to claim 6, wherein, Before receiving the first request sent by the native application, the following is also included: The system receives the HTML5 code of the relay hub page sent by the second host, wherein the HTML5 code of the relay hub page is pre-compiled and packaged in the second host. The HTML5 code of the transit hub page is stored in the second directory; The HTML5 code of the transit hub page includes configuration parameters for each of the N application options, and the native application is configured to generate the corresponding first request based on the configuration parameters of each application option.
8. A method for joint debugging in a multi-cloud environment based on hybrid development, used as a second host, comprising: Receive the user's first operation on the native application, wherein the first operation is used to select a target application option; Based on the target application option selected by the user, a first request is sent to a first host, wherein the first request includes the target application option, and the first host is configured to perform the method of any one of claims 1 to 7.
9. The method according to claim 8, wherein, Before receiving the user's first operation on the native application, the following is also included: Receive the user's second operation on the native application, wherein the second operation is used to invoke the transit hub page; A second request is sent to the first host according to the second operation; Receive the second request data returned by the first host in response to the second request; The transit hub page is displayed to the user based on the second request data. The transit hub page includes N application options. The user selects the target application option from the N application options. The N application options correspond one-to-one with N HTML5 code snippets.
10. A multi-cloud environment co-operation device based on hybrid development, used for a first host, comprising: The first receiving module is used to receive a first request sent by the native application client, wherein the native application client is deployed on the second host, the first request includes a target application option selected by the user on the native application client, the native application client displays N application options, the user selects the target application option from the N application options, and the N application options correspond one-to-one with N HTML5 code snippets; The first sending module is used to send the first request to the target access address to access the target HTML5 code corresponding to the target application option in order to obtain the embedded H5 page of the native application. The target access address is determined according to the target application option and the user's identity identifier. The target access address includes the target HTML5 code address or the target cloud host address. The first host is configured with N HTML5 code addresses, including the target HTML5 code address, and / or N cloud host addresses, including the target cloud host address. The N HTML5 code addresses correspond one-to-one with the N HTML5 code deployed on the first host, and the N cloud host addresses correspond one-to-one with the N HTML5 code deployed on the N cloud hosts. N is an integer greater than or equal to 1.
11. A multi-cloud environment co-operation device based on hybrid development, used as a second host, comprising: The second receiving module is used to receive the user's first operation on the native application, wherein the first operation is used to select a target application option; The second receiving module is configured to send a first request to the first host according to the target application option selected by the user, wherein the first request includes the target application option, and the first host is configured to perform the method of any one of claims 1 to 7.
12. A multi-cloud environment co-operation system based on hybrid development, comprising: The second host is configured to receive a first operation from a user on a native application, wherein the first operation is used to select a target application option; and to send a first request to the first host based on the target application option selected by the user, wherein the first request includes the target application option. A first host is configured to receive a first request sent by the native application client; and to send the first request to a target access address to access the target HTML5 code corresponding to the target application option, wherein the target access address is determined based on the target application option and the user's identity identifier, and the target access address includes the target HTML5 code address or the target cloud host address; In the case of N cloud hosts, where the target access address is the address of the target cloud host, the target cloud host among the N cloud hosts is used to receive the first request sent by the first host, where N is an integer greater than or equal to 1.
13. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 9.
14. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 9.
15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Routing method and device in grayscale publishing scenario
CN108881030A