Information processing method, apparatus, device, storage medium, and program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本申请提供一种信息处理方法、装置、设备、存储介质及程序产品,以解决相关技术中,网页资源加载时间长,容易出现加载延迟甚至出现卡顿或闪烁的情况,降低了系统响应性能的问题
[0046] In one solution provided by the aforementioned information processing method, apparatus, device, storage medium, and program product, a native application is run, and file resource information recorded in the native application is obtained. If the native application's file resource list includes a target webpage resource, a runtime environment for the target webpage application is created, and the target webpage application provides processing functions for the target webpage resource. Upon receiving a trigger instruction to run the target webpage resource, the target webpage application running in the runtime environment is invoked to run the target webpage resource within the native application. When it is determined that the native application's file resource information includes the target webpage resource, by creating a runtime environment for the target webpage application, the runtime environment of the target webpage application can be prepared before the target webpage resource is triggered, thus completing the pre-warm-up of the target webpage application. By pre-creating the runtime environment, the runtime environment creation process is decoupled from user operations. When a user triggers webpage resources such as information collection documents, the web application can be directly invoked to run these resources, shortening the loading time of webpage resources, enabling faster response, reducing stuttering or flickering caused by loading delays, and optimizing system response performance.
Smart Images

Figure CN122547418A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an information processing method, apparatus, device, storage medium, and program product. Background Technology
[0002] With the widespread adoption of mobile devices, it has become a new trend for users to use mobile devices to meet their entertainment or work needs.
[0003] Currently, many entertainment-related functions or office tools, such as audio and video players and information gathering tools, are usually web applications developed based on web pages. When running the web resources provided by these web applications through the native applications of mobile terminals, the web resources take a long time to load, and loading delays, or even stuttering or flickering, are likely to occur, reducing system responsiveness. Summary of the Invention
[0004] This application provides an information processing method, apparatus, device, storage medium, and program product to solve the problem in the related art that web page resources have long loading times, are prone to loading delays, or even experience lag or flickering, which reduces system response performance.
[0005] In a first aspect, embodiments of this application provide an information processing method, including:
[0006] Run native applications;
[0007] Retrieve file resource information recorded in the native application;
[0008] If the file resource information contains the target webpage resource, create the runtime environment of the target webpage application, which provides the processing function of the target webpage resource.
[0009] Upon receiving a trigger instruction to run the target webpage resource, the target webpage application running in the runtime environment is invoked to run the target webpage resource within the native application.
[0010] Optionally, the runtime environment for the target web application is created, including:
[0011] Create a webpage view container within the native application for the target web application to run;
[0012] Obtain the resource files of the target web application;
[0013] Execute the target web application's resource files within the web page view container to create the runtime environment for the target web application.
[0014] Optionally, obtain the resource files of the target web application, including:
[0015] Obtain the resource address of the target web application;
[0016] Obtain the resource files of the target web application based on its resource address.
[0017] Optionally, the runtime environment of the target web application includes a web view container. After invoking the target web application running in the runtime environment to run the target web resources in the native application, the method further includes:
[0018] Receive a close command for the target webpage resource;
[0019] The target webpage resources are closed, and the webpage view container is kept running to provide the runtime environment for the target webpage application.
[0020] Optionally, after invoking the target web application running in the runtime environment to run the target web resource in the native application, the method further includes:
[0021] Upon receiving a close command for the target webpage resource, the target webpage application is triggered to reset the state of the target webpage resource to its initial state.
[0022] Optionally, upon receiving a close command for the target webpage resource, the target webpage application is triggered to reset the state of the target webpage resource to its initial state, including:
[0023] Upon receiving a close instruction for a target webpage resource, a close notification is sent to the target webpage resource. The close notification carries the Uniform Resource Locator (URL) of the target webpage resource, so that the target webpage application can reset the state of the target webpage resource to its initial state based on the URL in the close notification.
[0024] Optionally, after closing the target webpage resource, the method further includes:
[0025] Upon receiving a trigger instruction for the target webpage resource again, the target webpage application is invoked to run the target webpage resource based on the running webpage view container.
[0026] Optionally, after creating the runtime environment for the target web application, the method further includes:
[0027] Receive notification information from the target web application;
[0028] Upon receiving a trigger instruction to run the target webpage resource, the target webpage application running in the runtime environment is invoked to run the target webpage resource within the native application, including:
[0029] If the notification message indicates that the target web application is ready and a trigger instruction to run the target web resource has been received, the target web application running in the runtime environment is invoked to run the target web resource in the native application.
[0030] Optionally, the file resource information includes a list of file resources. If the file resource information includes the target webpage resource, a runtime environment for the target webpage application is created, including:
[0031] Upon receiving a trigger command from the native application regarding the file resource list, switch to the file resource list;
[0032] After switching to the file resource list, if it is determined that the target web page resource is included in the native application's file resource list, then the runtime environment for the target web page application is created.
[0033] Optionally, the target web page resources include information gathering documents, and the target web page application is an information gathering application;
[0034] If the file resource information includes the target webpage resource, create the runtime environment for the target webpage application, including:
[0035] If the file resource information includes information collection documents, create a runtime environment for the information collection application;
[0036] Upon receiving a trigger instruction to run the target webpage resource, the target webpage application running in the runtime environment is invoked to run the target webpage resource within the native application, including:
[0037] Upon receiving a trigger instruction to run an information collection document, the information collection application running in the runtime environment is invoked to run the information collection document in the native application.
[0038] Secondly, embodiments of this application provide an information processing apparatus, including:
[0039] The runtime module is used to run native applications;
[0040] The acquisition module is used to acquire file resource information recorded in the native application;
[0041] The creation module is used to create the runtime environment of the target web application when the file resource information contains the target web resource. The target web application provides the processing function of the target web resource.
[0042] The calling module is used to call the target web application running in the runtime environment when a trigger instruction to run the target web resource is received, so as to run the target web resource in the native application.
[0043] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described information processing method.
[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described information processing method.
[0045] Fifthly, embodiments of this application provide a computer program product, which includes a computer program. When the computer program is run, the above-described information processing method is executed.
[0046] In one solution provided by the aforementioned information processing method, apparatus, device, storage medium, and program product, a native application is run, and file resource information recorded in the native application is obtained. If the native application's file resource list includes a target webpage resource, a runtime environment for the target webpage application is created, and the target webpage application provides processing functions for the target webpage resource. Upon receiving a trigger instruction to run the target webpage resource, the target webpage application running in the runtime environment is invoked to run the target webpage resource within the native application. When it is determined that the native application's file resource information includes the target webpage resource, by creating a runtime environment for the target webpage application, the runtime environment of the target webpage application can be prepared before the target webpage resource is triggered, thus completing the pre-warm-up of the target webpage application. By pre-creating the runtime environment, the runtime environment creation process is decoupled from user operations. When a user triggers webpage resources such as information collection documents, the web application can be directly invoked to run these resources, shortening the loading time of webpage resources, enabling faster response, reducing stuttering or flickering caused by loading delays, and optimizing system response performance. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a schematic diagram of the application environment of the information processing method in one embodiment of this application;
[0049] Figure 2 This is a flowchart illustrating an information processing method according to one embodiment of this application;
[0050] Figure 3 This is an interface diagram of a document list of a native application in one embodiment of this application;
[0051] Figure 4 This is a signaling interaction diagram of step S40 in one embodiment of this application;
[0052] Figure 5 yes Figure 2 A schematic diagram of the implementation process of step S30;
[0053] Figure 6 This is an interface diagram of the message list and document list of a native application in one embodiment of this application;
[0054] Figure 7 yes Figure 2 Another implementation flow diagram of step S30;
[0055] Figure 8 This is a signaling interaction diagram during the creation of the runtime environment in one embodiment of this application;
[0056] Figure 9 This is another flowchart illustrating the information processing method in one embodiment of this application;
[0057] Figure 10 This is a signaling interaction diagram of the process of closing target webpage resources in one embodiment of this application;
[0058] Figure 11 This is a schematic diagram illustrating the specific implementation process of the information processing method in one embodiment of this application;
[0059] Figure 12 This is a schematic diagram of the structure of an information processing device according to one embodiment of this application;
[0060] Figure 13 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0062] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of a described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this specification and the appended claims, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0063] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0064] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0065] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0066] To facilitate understanding of the technical solutions of this application, some terms and concepts involved in the embodiments of this application will be explained below:
[0067] 1. Native applications are applications developed using native programming languages, such as Objective-C, Swift, Java, Kotlin, and C#, for operating systems like iOS, Android, and Windows. Native applications can be directly installed on a device and leverage the device's hardware and operating system to implement relevant application functions. For example, native applications can utilize the device's hardware and operating system to create runtime environments for other applications, such as web applications, allowing other applications to call the corresponding application's functions.
[0068] 2. Web applications, or web applications, are applications accessed through a browser. They are typically developed using web technologies such as JavaScript, Hyper Text Markup Language (HTML), and Cascading Style Sheets (CSS). Web applications do not need to be installed on a device and are accessed on various devices or platforms through a Uniform Resource Locator (URL). Web applications have the advantage of cross-platform compatibility because they can run on any device that supports a web browser.
[0069] 3. A Web View container is a component used to display relevant web resources (such as audio, video, and information collection documents) within a native application. It provides an embedded browser view, offering a runtime environment for web applications that allow them to load and display relevant web resources within the native application and interact with other parts of the native application.
[0070] 4. JavaScript Bridge, or JS Bridge, is a technology used for communication between native applications and embedded WebView containers. JS Bridge allows native applications and WebView containers to call and pass data to each other, thus enabling interaction between native and web applications.
[0071] Many entertainment-related functions or office tools, such as audio and video players and information collection tools, are typically web applications (i.e., web applications) developed based on web pages. When running the web resources provided by these web applications through a mobile device's native application, a runtime environment for the web application needs to be created before the web application can run the relevant web resources. This results in long loading times for web resources, easily leading to loading delays, or even stuttering or flickering, reducing system responsiveness. For example, when running information collection documents provided by information collection tools (such as questionnaires or smart forms) through a mobile device's native application, the mobile device creates a web view container, loads and executes the relevant resource files of the web application within the web view container, enabling the web application to run within the native application. Therefore, when users open information collection documents from the native application, they may experience issues with interface opening and interaction, such as loading delays or flickering, affecting the user experience.
[0072] Furthermore, when closing web page resources such as audio and video playback and information collection documents, the WebView container used by the web application to run will be destroyed at the same time. When the relevant web page resources are opened again, the WebView container needs to be recreated for the web application to run, which not only leads to long loading time, but also causes resource occupation and waste.
[0073] To address the aforementioned issues, this application provides an information processing method, apparatus, device, storage medium, and program product. By running a native application and acquiring file resource information recorded within that application, and if the native application's file resource information includes a target webpage resource, a runtime environment for the target webpage application is created. This target webpage application provides processing functions for the target webpage resource. Upon receiving a trigger instruction to run the target webpage resource, the target webpage application running in the runtime environment is invoked to run the target webpage resource within the native application. By creating a runtime environment for the target webpage application, it can be prepared before the target webpage resource is triggered, effectively pre-warming up the target webpage application. By pre-creating the runtime environment, the creation process is decoupled from user operations. When a user triggers webpage resources such as information collection documents, the web application can be directly invoked to run these resources, shortening the loading time and enabling faster response times. This reduces stuttering or flickering caused by loading delays and optimizes system response performance.
[0074] The information processing method provided in this application embodiment can be applied to, for example, Figure 1 In the application scenarios shown. See also Figure 1 As shown, terminal device 101 communicates with server 102 via a network. This network can be, but is not limited to, a local area network (LAN), a metropolitan area network (MAN), or a wide area network (WAN).
[0075] The terminal device has a native application installed. This native application can create a runtime environment for the target web application, which then calls the target web application to process its resources. The user can launch the target web application using the native application installed on the terminal device 101. When the terminal device 101 receives an operation from the user to launch the target web application and run related web resources, it downloads the relevant data for the target web application from the server 102 and then runs the web resources provided by the target web application.
[0076] In practical applications, the terminal device (such as a mobile terminal device) 101 runs a native application and obtains file resource information recorded in the native application. If it is determined that the file resource information of the native application contains target web page resources, the terminal device 101 creates a runtime environment for the target web page application in the native application, so that the native application can run the target web page application in the created runtime environment. The target web page application provides the processing function of the target web page resources. When a trigger instruction to run the target web page resources is received, the terminal device calls the target web page application running in the runtime environment to run the target web page resources in the native application.
[0077] In this embodiment, when the terminal device determines that the target webpage resource is included in the file resource information of the native application, it can prepare the target webpage application's runtime environment before the target webpage resource is triggered, thus completing the pre-warm-up of the target webpage application. By pre-creating the runtime environment, the runtime environment creation process is decoupled from user operations. When the user triggers webpage resources such as information collection documents, the web application can be directly invoked to run these resources, shortening the loading time of webpage resources, enabling faster response, reducing stuttering or flickering caused by loading delays, and optimizing system response performance.
[0078] The terminal device 101 may include, but is not limited to: smartphones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, mobile internet devices (MIDs), smart TVs, in-vehicle devices, portable wearable devices (such as head-mounted devices, wristbands), and other smart devices. The server may be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers.
[0079] In one embodiment, such as Figure 2 As shown, an information processing method is provided, which is applied to... Figure 1 Taking a terminal device as an example, the explanation includes the following steps:
[0080] S10: Run native applications.
[0081] The terminal device has a native application installed. This native application is natively capable of creating the runtime environment for the target web application, thereby invoking the target web application, which provides processing functions for the target web resources. The native application can be an office application software for enterprise users, or it can be an instant messaging application. The target web application can include at least one of an audio player, a video player, and an information gathering tool; the target web resources provided by the target web application can include at least one of audio / video files, video files, and various information gathering documents.
[0082] In practical applications, after a terminal device starts up, it can automatically run the native applications installed on the terminal device; or, it can trigger the native applications installed on the terminal device, for example, when a user clicks on the native application icon on the terminal device's display screen, the terminal device will run the native application after receiving the user's trigger operation.
[0083] S20: Retrieve file resource information recorded in the native application.
[0084] After running the native application, the terminal device obtains the file resource information recorded in the native application.
[0085] The file resource information can be information about one or more file resources that have already been created or are running in the native application. File resource information can include one or more file resources such as documents, spreadsheets, audio files, and video files that have already been created or are running in the native application.
[0086] The file resource information can be a list of file resources within the native application. This list can include one or more file resources such as documents, spreadsheets, audio files, and video files created or running within the native application. In other embodiments, the file resource information can also be data such as historical file resource records within the native application.
[0087] Users can add target webpage resources from a target web application to the file resource information (such as the file resource list) of a native application in a certain way. For example, a user can create or trigger the opening of a target webpage resource in the native application of the current terminal device (such as a mobile terminal device), or trigger the opening of a target webpage resource in the browser of the current terminal device, so that the file resource information (such as the file resource list) of the native application includes the target webpage resource. In addition, users can also trigger the opening of target webpage resources in the native application of other terminal devices (such as fixed-location terminal devices, i.e., desktop terminals), so that after the user runs and logs into the native application, its file resource information (such as the file resource list) includes the target webpage resource.
[0088] S30: If the target web page resources are included in the file resource information of the native application, create the runtime environment for the target web page application.
[0089] After running a native application, the terminal device checks whether the target webpage resource is included in the file resource information (such as a file resource list) recorded in the native application. If the target webpage resource is not included in the native application's file resource information, no additional action is required, and subsequent responses to user commands can proceed normally.
[0090] If the target webpage resources are included in the file resource information of the native application, the runtime environment for the target webpage application is created within the native application. That is, the native application creates the relevant components that allow the target webpage application to run, downloads and executes the relevant resource files of the target webpage application, thereby creating the runtime environment for the target webpage application, effectively warming it up in advance.
[0091] The target web application can be an information collection application, such as a form application, a questionnaire application, or a smart form filling application; the target web resource can include information collection documents, such as forms, questionnaires, and smart forms. The native application includes a document list, which records information about one or more file resources created or run within the native application; that is, the file resource information recorded in the native application can be a document list.
[0092] When the target webpage resources are included in the file resource information of the native application, a runtime environment for the target webpage application is created. This includes creating a runtime environment for the information collection application when the terminal device contains information collection documents in the file resource information (such as a document list) of the native application. In other words, a Web View container is created within the native application for the information collection application to run. The application downloads and executes the resource files of the information collection application through the Web View container to create its runtime environment, thus completing the pre-warming of the information collection application.
[0093] For example, the native application could be an instant messaging application that provides features such as instant messaging, web resource access, and other functionalities. The target web application could be a collection table application, and the target web resource could be a collection table. Figure 3 The image shows the interface of the native application's file resource list, which is also the document list interface (accessible by clicking the document icon within the native application). The file resource list interface can include options such as "Relevant to Me" and "Smart Table" to filter web resources based on different criteria. The "Relevant to Me" section of the file resource list includes various types of files such as meeting attendance sheets, XX tables, and unmarked tables. From... Figure 3It is evident that the user created a collection form provided by the collection form application—the "July 24th Meeting Attendance Form"—within the native application before 14:01; that is, the user created a web resource provided by the target web application within the native application. At this point, the terminal device determines that the document list contains the information collection document "July 24th Meeting Attendance Form," which means it determines that the native application's file resource list contains the target web resource. This allows the creation of a runtime environment for the collection form application, enabling the collection form application to run the aforementioned meeting attendance form within that environment. Furthermore, the native application also includes function icons related to instant messaging features such as a message dashboard, contacts, and "Me" (i.e., personal information).
[0094] S40: Upon receiving a trigger instruction to run the target webpage resource, invoke the target webpage application running in the runtime environment to run the target webpage resource in the native application.
[0095] The terminal device determines whether it has received a user's trigger instruction for the target webpage resource, such as an instruction to open the target webpage resource. If it receives a trigger instruction to run the target webpage resource, it invokes the target webpage application running in the runtime environment to run the target webpage resource within the native application.
[0096] Specifically, upon receiving a trigger instruction to run a target webpage resource, the terminal device triggers the target webpage application to run in the created runtime environment and sends the trigger instruction for the target webpage resource to the target webpage application. This trigger instruction contains the Uniform Resource Locator (URL) of the target webpage resource. After receiving the trigger instruction, the target webpage application runs the target webpage resource within its native application according to the URL in the trigger instruction, so that the user can perform related operations on the target webpage resource.
[0097] For example, the target web application could be an information gathering application, and the target web resource could be an information gathering document. When the terminal device determines that the native application's file resource information contains an information gathering document, it creates a runtime environment for the information gathering application. Upon receiving a trigger instruction to run the information gathering document, the terminal device invokes the information gathering application running in the runtime environment to run the information gathering document within the native application; that is, it triggers the information gathering application to run in the created runtime environment.
[0098] Among them, such as Figure 4As shown, when a user clicks on a target webpage resource (such as an information gathering document) in the native application, a trigger command to run the target webpage resource is sent. The terminal device receives this trigger command and, in response, uses the JS Bridge within the native application to send the same trigger command, containing the URL of the target webpage resource, to the target webpage application (such as the information gathering application) running in a pre-created runtime environment (such as a Web View container). The target webpage application receives the trigger command and runs the target webpage resource within the native application's runtime environment based on the URL in the trigger command. For example, the information gathering application, based on the URL of the information gathering document in the trigger command, renders and displays the information gathering document within the native application, allowing the user to browse, edit, and perform other operations on the document.
[0099] In this embodiment, the target web application can be an information collection application, and the target web resource can be an information collection document; this is merely an illustrative example. In other embodiments, the target web application and the target web resource it provides can be other things, such as an audio player or a video player, and the target web resource can be a corresponding audio file, video file, etc.
[0100] In this case, after the native application is closed, such as when the user logs out of the native application's account or closes the native application, the terminal device stops providing the runtime environment for the target web application. This can be achieved by destroying the components that provide the runtime environment, i.e., deleting the component's runtime code.
[0101] In this embodiment, when the terminal device determines that the target webpage resource is included in the file resource list of the native application, it can prepare the target webpage application's runtime environment before the target webpage resource is triggered, thus completing the pre-warm-up of the target webpage application. By pre-creating the runtime environment, the runtime environment creation process is decoupled from user operations. When the user triggers webpage resources such as information collection documents, the web application can be directly invoked to run these resources, accelerating application startup and loading speeds, improving application performance, shortening webpage resource loading time, and enabling faster webpage resource responses. This reduces stuttering or flickering caused by loading delays and optimizes system response performance.
[0102] In one embodiment, the file resource information of the native application includes a list of file resources. For example... Figure 5 As shown, step S30, which involves creating the runtime environment for the target web application when the target web page resources are included in the file resource information of the native application, specifically includes the following steps:
[0103] S31: Upon receiving a trigger command from the native application's file resource list, switch to the file resource list.
[0104] After the terminal device runs the native application installed on the terminal device, it determines whether it has received a trigger command from the user regarding the file resource list of the native application. For example, it determines whether it has detected a click operation on the file resource list of the native application, or whether it has received a voice trigger command for that file resource list. If a click operation on the file resource list is detected or a voice trigger command for that file resource list is received, it indicates that the user may have a need to use file resources, especially target webpage resources, and therefore it is determined that the trigger command for the file resource list of the native application has been received.
[0105] Upon receiving a trigger command from the native application's file resource list, the terminal device switches to the file resource list interface of the native application.
[0106] S32: After switching to the file resource list, if it is determined that the target web page resource is included in the native application's file resource list, create the runtime environment for the target web page application.
[0107] After switching to the file resource list, the terminal device checks the relevant resources contained in the file resource list to determine whether the target webpage resource is included. If the target webpage resource is found in the native application's file resource list, the runtime environment for the target webpage application is created.
[0108] The native application can be an instant messaging application, and the file resource list can be a document list from the original application. The target web application can be a collection table application, and the target web resource is a collection table provided by the target web application. After the terminal device runs the native application, it automatically enters or responds to the user's operation to display the native application's main page, which is the instant messaging function interface, i.e., the messaging interface. In addition, the native application also provides interfaces for other functions, such as email, documents, contacts, and a workspace. Figure 6 As shown in 6a, the native application's message interface displays a complete list of messages from different contacts (e.g., contact A), different contact groups (including group A), and other entities (e.g., industry news); the native application's message interface can also display messages from schedules, meetings, etc. The trigger command for sending the native application's document list via the terminal device, for example... Figure 6 As shown in 6b, users can click on the document control, or document icon, on the interface to send a trigger command for the document list. Upon receiving the trigger command, the terminal device displays the document list interface. Figure 6It's clear from the document list that the user created a collection sheet within the native application: a meeting attendance sheet for July 24th. At this point, the terminal device can create a runtime environment for the collection sheet application, allowing the application to run the aforementioned meeting attendance sheet within that environment. Additionally, the native application includes a message list using instant messaging, an email list using email sending and receiving, and other functionalities such as a workspace and address book.
[0109] In this embodiment, after running the native application, upon receiving a trigger command from the native application's file resource list, the system switches to the file resource list. After switching to the file resource list, if it is determined that the native application's file resource list contains the target webpage resource, the runtime environment for the target webpage application is created. This solution, by switching to the file resource list in response to the trigger command—that is, after determining that the user has a need for file resources—and confirming that the target webpage resource is included in the file resource list, creates the runtime environment for the target webpage application, which better meets the user's actual needs. Compared to creating the runtime environment after running the native application, or by running the native application and confirming that its file resource list contains the target webpage resource, this solution reduces unnecessary environment creation operations, minimizing resource consumption and waste on the terminal device.
[0110] In one embodiment, such as Figure 7 As shown, step S30 or step S32, which involves creating the runtime environment for the target web application, specifically includes the following steps:
[0111] S301: Create a webpage view container in the native application for the target webpage application to run.
[0112] If the target webpage resource is found in the native application's file resource list, the terminal device creates a webpage view container within the native application for the target webpage application to run; that is, it creates a Web View container. The webpage view container itself serves as a universal hosting environment, adaptable to different platforms and devices, allowing the target webpage application to run seamlessly across various native applications. This provides better compatibility and consistency for multi-platform support, eliminating the need for repetitive adaptation and optimization work for different native applications or operating systems.
[0113] In other embodiments, web-compatible components adapted to native applications can also be developed for different target web applications. During the process of creating the runtime environment for the target web application, web-compatible components corresponding to each target web application can be created to provide a runtime environment for different target web applications.
[0114] S302: Obtain the resource files of the target web application.
[0115] The terminal device obtains the resource files of the target web application, which may include application resource files such as HTML, CSS, and JavaScript.
[0116] Specifically, obtaining the resource files of the target web application includes the following steps:
[0117] S3021: Obtain the resource address of the target web application.
[0118] Specifically, the terminal device obtains the resource address of the target web application. This resource address is the storage address of the relevant file resources of the target web application. This resource address can be obtained from the server of the native application (or the target web application).
[0119] S3022: Obtain the resource files of the target web application based on the resource address of the target web application.
[0120] The terminal device retrieves the resource files of the target web application from a specified device (such as the server of the native application) based on the resource address of the target web application. Obtaining the resource files of the target web application directly through its resource address is simple and convenient.
[0121] Specifically, the resource address of the target web application can be a Uniform Resource Locator (URL) for the target web application. The terminal device obtains the URL of the target web application from the server. This URL is a fixed URL used to point to the relevant file resources of the target web application. The URL of the target web application can be the URL of a blank page of the target web application. The URL of the target web application can be obtained from the native application or from the browser that opened the target web document. Based on the URL of the target web application, the terminal device obtains the resource file corresponding to the URL of the target web application from the server.
[0122] For example, a terminal device sends a file request to a server, and this file request contains the URL of a target web application. Upon receiving the file request, the server searches for the corresponding application resource file (such as HTML, CSS, and JavaScript files) in its database or a relevant network based on the URL of the target web application in the file request, and then sends the resource file corresponding to the URL of the target web application to the terminal device. The terminal device then receives the resource file of the target web application from the server.
[0123] S303: Execute the resource files of the target web application in the web page view container to create the runtime environment of the target web application.
[0124] After the terminal device obtains the resource files of the target web application, it executes the resource files within the created web view container, ensuring that the native application and the target web application can communicate normally to create the runtime environment for the target web application. Specifically, after executing the resource files of the target web application within the web view container, runtime code for the target web application to run within the web view container is automatically generated. Subsequent calls to this generated runtime code will trigger the target web application to run in the runtime environment, i.e., within the web view container.
[0125] In one embodiment, after executing the resource files of the target web application within the web page view container, i.e., after creating the runtime environment for the target web application, the target web application runs in this environment. At this time, the target web application automatically registers with the JS Bridge platform, allowing the native application to call the JS Bridge to communicate with the target web application, thus ensuring that the native application and the target web application can communicate normally. After successfully registering with the JS Bridge, the target web application uses the JS Bridge to send a notification message to the native application. This notification message can be used to inform the native application that the target web application is ready, i.e., to prompt the native application that the target web application can run normally.
[0126] The terminal device receives a notification from the target web application. If the notification indicates that the target web application is ready, it determines that the target web application can run normally within the native application and can use the target web resources normally, awaiting the user's trigger event for the target web resources. If the notification indicates that the target web application is ready and a trigger command to run the target web resources is received, the terminal device invokes the target web application running in the runtime environment to run the target web resources within the native application.
[0127] like Figure 8 The diagram illustrates the runtime environment for creating the target web application and the process of calling the target web application. After the terminal device runs the native application, the user can click on the document control (document identifier) in the native application to open the file resource list, i.e., send a trigger command to the document list. At this time, the terminal device switches to the file resource list (such as the document list) and determines whether the file resource list contains the target web resource (such as an information collection document). If it is determined that the target web resource is included in the native application's file resource list, then... Figure 8As shown, the mobile terminal creates a Web View container within its native application for the target web application (such as a collection table) to run, and obtains the URL of the target web application through the native application. The terminal device's native application calls the Web View container's application, obtaining the target web application's resource files based on the target web application's URL. The terminal device's native application then calls the Web View container's application, executing the target web application's resource files within the Web View container, thus launching the target web application within the web view container.
[0128] After the target web application starts in the web view container, it automatically registers with the JS Bridge platform. This allows the native application to call the JS Bridge to communicate with the target web application, ensuring that the native application and the target web application can communicate normally. Figure 8 As shown, after the target web application successfully registers with the JS Bridge, it uses the JS Bridge to send a notification to the native application. This notification indicates that the target web application is ready, meaning it can run normally. Upon receiving this notification through the native application, the terminal device can mark the target web application as ready, indicating it can run normally and access the target web resources. After receiving the notification from the target web application, if the terminal device receives a trigger command for the target web resource from the native application, it directly invokes the target web application running in the runtime environment to run the target web resource within the native application. Specifically, upon receiving the ready notification and the trigger command to run the target web resource, the terminal device, through the native application, uses the JS Bridge to send the trigger command for the target web resource to the target web application. This trigger command contains the URL of the target web resource, which is different from the URL of the target web application. After receiving the trigger instruction for the target web resource, the target web application runs the target web resource within the native application based on the URL of the target web resource using the Web View container. For example, it might render and display an information collection document within the native application. Only after receiving a notification that the target web application is ready and the trigger instruction to run the target web resource has been received—that is, after ensuring the target web application can run normally and communicate with the native application—is the target web application running in the runtime environment called to run the target web resource within the native application. This ensures the target web application runs normally, improves the response speed of the target web application call, and reduces lazy loading.
[0129] In this embodiment, a webpage view container for the target webpage application to run is created within the native application, and the resource files of the target webpage application are obtained. Then, the resource files of the target webpage application are executed within the webpage view container to create the runtime environment for the target webpage application. By creating the webpage view container and loading and executing the resource files of the target webpage application in advance within the native application, the target webpage application can be pre-warmed up. This ensures that the target webpage application can respond promptly when the user triggers the target webpage resources, providing a fast, seamless, and stable interactive experience, significantly improving overall application response performance and user experience. Furthermore, by creating a stable runtime environment for the target webpage application within the native application using the webpage view container, consistent performance across various terminal devices and operating systems can be ensured, reducing runtime errors caused by platform differences or environmental instability.
[0130] In one embodiment, the runtime environment of the target web application includes a web page view container. For example... Figure 9 As shown, after step S40, that is, after calling the target web application running in the runtime environment to run the target web resource in the native application, the method further includes the following steps:
[0131] S50: Receive a closing command for the target webpage resource.
[0132] After running the target webpage resource within a native application, the terminal device responds to various commands for that resource to perform operations such as editing or closing it. In other words, the terminal device can receive editing commands for the target webpage resource and update its status or data accordingly. For example, it can respond to editing commands to update the playback status of audio or video, changing it from stopped to playing, or from playing to stopped and waiting. It can also respond to editing commands to add, delete, and modify data in information collection documents.
[0133] The terminal device can also receive a closing command for the target webpage resource and respond to the closing command to close the target webpage resource.
[0134] S60: Close the target web page resources and control the web page view container to continue running in order to provide a runtime environment for running the target web page application.
[0135] The runtime environment of the target web application includes a web view container. Upon receiving a command to close the target web resource, the terminal device closes the target web resource running in the native application and controls the web view container to continue running, thereby providing a runtime environment for the target web application. This facilitates subsequent calls to the target web application to run the target web resource in the native application, achieving web view container reuse, which is also the reuse of the target web application's runtime environment.
[0136] Specifically, the Web View container is kept running until the native application is shut down. That is, after closing the target web page resources and keeping the Web View container running, it's determined whether the native application has shut down, or whether it has stopped running. If the native application is determined to be shut down, the Web View container is destroyed, i.e., deleted, to destroy the target web application's runtime environment, preventing the target web application from running within the native application.
[0137] In this embodiment, upon receiving a close command for the target webpage resource, the target webpage resource is closed, while the webpage view container continues to run to provide the runtime environment for the target webpage application. This solution maintains the current runtime environment and resources of the target webpage application even when the target webpage resource is closed, allowing for rapid invocation of the target webpage application upon its next access, thus restoring the application to its running state. Effective management and reuse of the Web View container reduces the time spent reloading and initializing resource files, improving the response speed of the target webpage application. Simultaneously, keeping the Web View container running allows for reuse, enabling users to switch between different target webpage resources while using the same Web View container. This reduces the overhead of repeatedly creating and destroying containers in traditional solutions, thus reducing resource consumption and memory usage.
[0138] In one embodiment, after step S30, i.e., after invoking the target web application running in the runtime environment to run the target web resource in the native application, the method further includes the following steps:
[0139] S70: Upon receiving a close command for the target webpage resource, reset the state of the target webpage resource to its initial state.
[0140] Upon receiving a command to close the target webpage resource, the terminal device also triggers the target webpage application to reset the state of the target webpage resource, that is, to reset the state of the target webpage resource to its initial state so that the target webpage resource can be restarted in response to subsequent trigger commands.
[0141] Specifically, when a user closes a target webpage resource (such as an information gathering document), they send a command to close the target webpage resource, such as... Figure 10 As shown.
[0142] Upon receiving a close command for a target webpage resource, the terminal device, through the native application and using the JS Bridge, sends a close notification for the target webpage resource to the target webpage application. This close notification carries the URL of the target webpage resource. Upon receiving the close notification, the target webpage application resets the state of the target webpage resource corresponding to that URL, restoring it to its initial state, such as the state before audio / video file playback or the blank page state of an information collection document. This allows the target webpage resource to re-run in response to subsequent trigger commands. If the user closes the native application (i.e., sends a close command to the native application), the terminal device closes the native application and destroys the Web View container through the native application, preventing the target webpage application from running within the native application.
[0143] In this embodiment, upon receiving a close command for the target webpage resource, the target webpage resource is closed, and the target webpage application is triggered to reset the state of the target webpage resource to its initial state. This allows the target webpage application to be quickly invoked the next time the target webpage resource is opened, thus restoring the target webpage resource to its initial state and accelerating the response speed of the target webpage resource.
[0144] In one embodiment, after step S60, i.e. after closing the target webpage resource, the method further includes the following steps:
[0145] S80: Upon receiving the trigger instruction for the target webpage resource again, the target webpage application is invoked to run the target webpage resource based on the running webpage view container.
[0146] After the terminal device closes the target webpage resource, if it receives a trigger instruction for the target webpage resource again, it calls the target webpage application to run the target webpage resource based on the continuing running webpage view container.
[0147] Specifically, taking a data collection document as an example, when a user closes a data collection document in the native application, the terminal device receives a close command for the target webpage resource, closes the target webpage resource, keeps the webpage view container running, and triggers the target webpage application to reset the state of the target webpage resource. Then, when the user clicks on the data collection document in the native application again, the terminal device receives a trigger command to run the data collection document. Responding to this trigger command, the terminal device uses the JS Bridge to send the data collection document trigger command to the data collection application running in the pre-created Web View container. Upon receiving the data collection document trigger command, the data collection application renders and displays the data collection document in the native application based on the URL in the trigger command.
[0148] In this embodiment, after closing the target webpage resource, upon receiving the trigger command for the target webpage resource again, the terminal device, based on the running webpage view container, calls the target webpage application to run the target webpage resource. This enables the target webpage application to be called quickly, thereby restoring the target webpage application to its running state and reducing the overhead of repeatedly creating and destroying containers, thus reducing resource consumption and waste.
[0149] To more clearly describe the information processing method provided in the embodiments of this application, the following is combined with... Figure 11 Describe it.
[0150] Taking native applications as office software applications aimed at enterprise users, target web applications as data collection form applications, and target web resources as data collection forms, etc., as an example. Figure 11 The following is a schematic diagram illustrating the implementation flow of an information processing method provided in this application embodiment, including the following steps:
[0151] S1: Receives trigger commands from the native application's document list.
[0152] The terminal device runs native applications, which are office software applications designed for enterprise users. When a user clicks on the document list icon in the native application, the terminal device receives the user's trigger command for the native application's document list and switches to the native application's document list (i.e., file resource list).
[0153] S2: Determine whether the document list contains the collection table. If yes, proceed to step S3; otherwise, end.
[0154] After switching to the document list, the terminal device determines whether the document list contains a collection table. If the native application's document list does not contain a collection table, the processing process terminates directly. If the native application's document list contains a collection table, the runtime environment for the collection table application is created.
[0155] S3: Create the runtime environment for information gathering applications.
[0156] This includes creating the runtime environment for the collection table application, or warming up the runtime environment for the collection table application, including:
[0157] Create a Web View container in the native application, and then perform the following steps within the Web View container:
[0158] S31: Get the URL of the collection table application.
[0159] The terminal device obtains the URL of the collection table application through the native application.
[0160] S32: Download the resource files for the collection table application.
[0161] Terminal devices download resource files, such as HTML, JS, and CSS, from the URL of the collection form application.
[0162] S33: Execute the resource files of the collection table application.
[0163] The terminal device executes the resource files of the collection form application to make the collection form application run in the Web View container.
[0164] S34: Receive a readiness notification for the collection table application.
[0165] After the data collection application runs in the Web View container, it registers a JS Bridge. After successful registration, it uses the JS Bridge to send a notification message, also known as a readiness notification, to the native application. This readiness notification is used to inform the native application that the data collection application is running normally.
[0166] S35: Wait for a trigger event from the user's collection table to execute step S4.
[0167] After receiving the readiness notification from the collection table application through the native application, the terminal device determines that the runtime environment of the collection table application has been successfully created. It can then mark the collection table application as ready and wait for the user's trigger event for the collection table, that is, wait for the user's trigger command for the collection table.
[0168] S4: The application runs the collection table based on the runtime environment.
[0169] Step S4 includes the following process:
[0170] S41: The native application sends a trigger command to collect the table.
[0171] The terminal device controls the native application to send a collection table trigger command to the collection table application, which includes the URL of the collection table application.
[0172] S42: The collection table application receives this trigger instruction.
[0173] S43: The collection table application responds to this triggering instruction by rendering and displaying the collection table in the native application.
[0174] The collection table application receives and responds to the trigger command, rendering and displaying the collection table corresponding to the UL in the trigger command within the native application based on the Web View container.
[0175] S5: Close the collection table.
[0176] The terminal device receives the closing instruction of the collection table and responds to the closing instruction to close the collection table.
[0177] S6: Determine whether to close the native application. If not, proceed to step S7; otherwise, end.
[0178] The terminal device determines whether to close the native application, that is, whether the native application should stop running. If the native application is closed, the Web View container is destroyed and the process is terminated. If the native application is not closed, step S7 is executed.
[0179] S7: Controls the Web View container to continue running and triggers a reset of the collection table state for the collection table application.
[0180] If the native application is not closed, the terminal device controls the Web View container to continue running in the native application, and based on the Web View container, triggers the collection table application to reset the state of the collection table in order to wait for the trigger event from the user's collection table.
[0181] After step S1, and after receiving the trigger instruction from the native application's document list, if the document list includes a collection table, the following steps are also included:
[0182] S8: Receive the trigger command for the collection table.
[0183] When the document list contains a collection form, the user clicks to open the information collection document in the document list, and the terminal device receives the trigger instruction for the collection form.
[0184] S9: Determine whether the application of the collection table has been preheated. If not, proceed to step S3 above. If yes, proceed to step S4 above.
[0185] Upon receiving the trigger command for the collection table, the terminal device determines whether the collection table application has completed its warm-up, i.e., whether the runtime environment for the collection table application corresponding to that collection table has been created for the collection table application to run. If the collection table application has not completed its warm-up, then step S3 is executed, i.e., the runtime environment for the collection table application is created, and the subsequent steps of S3 are executed. If the collection table application has completed its warm-up, then step S4 is executed directly, i.e., the collection table is run based on the runtime environment by calling the collection table application.
[0186] In this embodiment, by pre-creating the runtime environment, the runtime environment creation process is decoupled from user operations. When the user triggers web page resources such as the collection table, the web application can be directly called to run the collection table and other web page resources, which shortens the loading time of web page resources, enables web page resources to respond quickly, reduces the stuttering or flickering caused by loading delays, and optimizes the system response performance.
[0187] Furthermore, even when web page resources such as the collection form are closed, but the native application remains running, the Web View container continues to operate. This preserves the current runtime environment and resources of the web application, ensuring that the corresponding web application can be quickly invoked and restored to its running state the next time the collection form or other web page resources are accessed. Effective management and reuse of the Web View container reduces the time spent reloading and initializing resource files, improving the responsiveness of the target web application. Simultaneously, keeping the Web View container running allows for reuse, enabling users to switch between different target web page resources using the same Web View container. This reduces the overhead of repeatedly creating and destroying containers in traditional solutions, thus reducing resource consumption and memory usage.
[0188] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0189] In one embodiment, an information processing apparatus is provided, which corresponds one-to-one with the information processing methods described in the above embodiments. For example... Figure 12 As shown, the information processing device includes an operation module 121, an acquisition module 122, a creation module 123, and a calling module 124. Detailed descriptions of each functional module are as follows:
[0190] Run module 121, used to run native applications;
[0191] Module 122 is used to obtain file resource information recorded in the native application.
[0192] Create module 123 to create the runtime environment of the target web application when the file resource information of the native application contains the target web page resource. The target web application provides the processing function of the target web page resource.
[0193] Module 124 is used to invoke the target web application running in the runtime environment when a trigger instruction to run the target web resource is received, so as to run the target web resource in the native application.
[0194] In this embodiment, by pre-creating the runtime environment, the runtime environment creation process is decoupled from user operations. When the user triggers web resources such as information collection documents, the web application can be directly called to run the information collection documents and other web resources, which shortens the loading time of web resources, enables web resources to respond quickly, reduces lag or flickering caused by loading delays, and optimizes system response performance.
[0195] Optionally, module 123 is specifically used for:
[0196] Create a webpage view container within the native application for the target web application to run;
[0197] Obtain the resource files of the target web application;
[0198] Execute the target web application's resource files within the web page view container to create the runtime environment for the target web application.
[0199] Optionally, creating module 123 is also specifically used for:
[0200] Obtain the resource address of the target web application;
[0201] Obtain the resource files of the target web application based on its resource address.
[0202] Optionally, the information processing device further includes a receiving module 125 and a closing module 126, and the operating environment of the target web application includes a web page view container.
[0203] The receiving module 125 is used to receive a closing command for the target webpage resource;
[0204] The shutdown module 126 is used to shut down the target web page resources and control the web page view container to continue running in order to provide a runtime environment for running the target web page application.
[0205] Optionally, the information processing device further includes a trigger module 127;
[0206] Trigger module 127 is used to trigger the target web application to reset the state of the target web resource to its initial state when a closing command for the target web resource is received.
[0207] Optionally, the trigger module 127 is specifically used for:
[0208] Upon receiving a close instruction for a target webpage resource, a close notification is sent to the target webpage resource. The close notification carries the Uniform Resource Locator (URL) of the target webpage resource, so that the target webpage application can reset the state of the target webpage resource to its initial state based on the URL in the close notification.
[0209] Optionally, the receiving module 125 is also used to receive notification information from the target web application after creating the runtime environment of the target web application;
[0210] Module 124 is specifically used to: when the notification message indicates that the target web application is ready and a trigger instruction to run the target web resource is received, invoke the target web application running in the runtime environment to run the target web resource in the native application.
[0211] Optionally, the calling module 143 is also used to, after closing the target web page resource, upon receiving a trigger instruction for the target web page resource again, call the target web page application to run the target web page resource based on the running web page view container.
[0212] Optionally, the file resource information includes a file resource list, and the information processing device further includes a switching module 128;
[0213] The switching module 128 is used to switch to the file resource list when a trigger instruction is received from the native application's file resource list;
[0214] Module 124 is invoked, specifically to create the runtime environment of the target web application if, after switching to the file resource list, it is determined that the native application's file resource list contains the target web page resource.
[0215] Optionally, the target web page resources include information gathering documents, and the target web page application is an information gathering application;
[0216] Module 123 is specifically used to: create the runtime environment for the information collection application when the information collection document is included in the file resource information of the native application;
[0217] Module 124 is specifically used to: upon receiving a trigger instruction to run an information collection document, invoke the information collection application running in the runtime environment to run the information collection document within the native application.
[0218] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0219] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0220] This application also provides an electronic device, such as... Figure 13 As shown, the electronic device 13 includes: at least one processor 131, a memory 132, and a computer program 133 stored in the memory 132 and executable on the at least one processor 131. When the processor 131 executes the computer program 133, it implements the steps in any of the above method embodiments, or when the processor 131 executes the computer program 133, it implements the functions of each module / unit in the above device embodiments.
[0221] For example, the computer program 133 may be divided into one or more modules / units, which are stored in the memory 132 and executed by the processor 131 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 133 in the electronic device.
[0222] Those skilled in the art will understand that Figure 13 The electronic device described is merely an example and does not constitute a limitation on the electronic device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0223] The processor mentioned above can be a central processing unit, or it can be other general-purpose processors, digital signal processors, application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0224] The memory can be an internal storage unit of the electronic device, such as a hard drive or RAM. The memory can also be an external storage device of the electronic device, such as a plug-in hard drive, smart memory card, secure digital card, flash memory card, etc. Furthermore, the memory can include both internal and external storage units of the electronic device.
[0225] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0226] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0227] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographic device / terminal device, a recording medium, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0228] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0229] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0230] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0231] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0232] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. An information processing method, characterized in that, include: Run native applications; Obtain the file resource information recorded in the native application; If the file resource information contains target web page resources, a runtime environment for the target web page application is created in the native application, and the target web page application provides processing functions for the target web page resources. Upon receiving a trigger instruction to run the target webpage resource, the target webpage application running in the runtime environment is invoked to run the target webpage resource in the native application.
2. The information processing method as described in claim 1, characterized in that, The runtime environment for creating the target web application includes: Create a webpage view container in the native application for the target webpage application to run; Obtain the resource files of the target web application; The resource files of the target web application are executed within the web page view container to create the runtime environment for the target web application.
3. The information processing method as described in claim 2, characterized in that, The step of obtaining the resource files of the target web application includes: Obtain the resource address of the target web application; Based on the resource address of the target web application, obtain the resource file of the target web application.
4. The information processing method as described in claim 1, characterized in that, The runtime environment of the target web application includes a web view container. After invoking the target web application running in the runtime environment to run the target web resource in the native application, the method further includes: Receive a close command for the target webpage resource; The target webpage resources are closed, and the webpage view container is kept running to provide a runtime environment for the target webpage application.
5. The information processing method as described in claim 1, characterized in that, After invoking the target web application running in the runtime environment to run the target web resource in the native application, the method further includes: Upon receiving a close command for the target webpage resource, the target webpage application is triggered to reset the state of the target webpage resource to its initial state.
6. The information processing method as described in claim 5, characterized in that, Upon receiving a close command for the target webpage resource, triggering the target webpage application to reset the state of the target webpage resource to its initial state includes: Upon receiving a close instruction for the target webpage resource, a close notification for the target webpage resource is sent to the target webpage resource. The close notification carries the Uniform Resource Locator (URL) of the target webpage resource, so that the target webpage application can reset the state of the target webpage resource to its initial state based on the URL in the close notification.
7. The information processing method as described in claim 4, characterized in that, After closing the target webpage resource, the method further includes: Upon receiving the trigger instruction for the target webpage resource again, the target webpage application is invoked to run the target webpage resource based on the running webpage view container.
8. The information processing method according to any one of claims 1-7, characterized in that, After creating the runtime environment for the target web application, the method further includes: Receive notification information from the target web application; Upon receiving a trigger instruction to run the target webpage resource, the step of invoking the target webpage application running in the runtime environment to run the target webpage resource in the native application includes: When the notification message indicates that the target web application is ready and a trigger instruction to run the target web resource has been received, the target web application running in the runtime environment is invoked to run the target web resource in the native application.
9. The information processing method according to any one of claims 1-7, characterized in that, The file resource information includes a list of file resources. When the file resource information includes the target webpage resource, creating the runtime environment for the target webpage application includes: Upon receiving a trigger command from the native application's file resource list, switch to the file resource list; After switching to the file resource list, if it is determined that the target webpage resource is included in the file resource list of the native application, the runtime environment of the target webpage application is created.
10. The information processing method according to any one of claims 1-7, characterized in that, The target web page resources include information collection documents, and the target web page application is an information collection application; When the target webpage resource is included in the file resource information, creating the runtime environment for the target webpage application includes: If the information collection document is included in the file resource information, a runtime environment for the information collection application is created; Upon receiving a trigger instruction to run the target webpage resource, the step of invoking the target webpage application running in the runtime environment to run the target webpage resource in the native application includes: Upon receiving a trigger instruction to run the information collection document, the information collection application running in the runtime environment is invoked to run the information collection document in the native application.
11. An information processing device, characterized in that, include: The runtime module is used to run native applications; The acquisition module is used to acquire file resource information recorded in the native application; A creation module is used to create a runtime environment for a target webpage application when the file resource information contains target webpage resources. The target webpage application provides processing functions for the target webpage resources. The calling module is used to call the target webpage application running in the runtime environment when a trigger instruction to run the target webpage resource is received, so as to run the target webpage resource in the native application.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the information processing method as described in any one of claims 1 to 10.
13. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the information processing method as described in any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is run, the information processing method as described in any one of claims 1-10 is executed.