Memory resource processing method and device, equipment, medium and product
By marking and releasing the memory resources of the on-board terminal page on the mobile terminal, the problem of excessive memory usage of mobile terminals in the Internet of Vehicles is solved, and the stability of on-board interconnection is improved.
Patent Information
- Application Number
- CN202411742823.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
In the Internet of Vehicles scenario, long-term interconnection and frequent page operations between mobile terminals and on-board terminals can easily lead to excessive memory usage of mobile terminals and problems such as APP crashes.
By marking the exited first page on the mobile terminal, recording its page identity, and releasing the memory resources occupied by the first page when the page release condition is met, to support the display of the second page of the on-board terminal.
It effectively avoids the problem of excessive memory usage of mobile terminals due to long interconnection time or frequent user operations, reduces the load pressure of mobile terminals, and ensures the stability of on-board interconnection.
Smart Images

Figure CN119668858A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Vehicles, and in particular to a method, device, equipment, medium and product for processing memory resources. Background Art
[0002] In the Internet of Vehicles scenario, the user's mobile terminal and the vehicle-mounted terminal can establish a communication connection, and through the communication connection, the user can directly use the application (Application, APP) installed in the mobile terminal on the vehicle-mounted terminal, for example, directly use the mobile terminal music APP.
[0003] In the interconnection between the mobile terminal and the vehicle terminal, the mobile terminal is responsible for the data logic processing of the application content, and the vehicle terminal is responsible for the display of the application content.
[0004] However, in the existing interconnection process between mobile terminals and vehicle-mounted terminals, when the interconnection time is long and the user operations are frequent, the mobile terminal is prone to excessive memory usage and APP crashes. Summary of the invention
[0005] The embodiments of the present application provide a method, device, equipment, medium and product for processing memory resources. The technical solution is as follows:
[0006] On the one hand, a method for processing memory resources is provided, the method being executed by a mobile terminal, the method comprising:
[0007] When the vehicle terminal has a switching display requirement from a first page to a second page, marking the first page, obtaining a page identifier corresponding to the first page, establishing a communication connection relationship between the vehicle terminal and the mobile terminal, and performing vehicle interconnection display based on the page provided by the mobile terminal;
[0008] Loading a page resource corresponding to the second page, wherein the page resource is used to support the vehicle-mounted terminal to display the second page;
[0009] When the first page meets a page release condition, memory resources occupied by the first page are released based on the page tag.
[0010] In another aspect, a memory resource processing device is provided, the device comprising:
[0011] A first callback module is used for marking the first page and obtaining a page identifier corresponding to the first page when there is a switching display requirement of the vehicle terminal from the first page to the second page, the vehicle terminal and the mobile terminal establish a communication connection relationship, and the vehicle terminal performs vehicle interconnection display based on the page provided by the mobile terminal;
[0012] A second callback module, used to load a page resource corresponding to the second page, wherein the page resource is used to support the display of the second page by the vehicle terminal;
[0013] The first callback module is further configured to release the memory resources occupied by the first page based on the page mark when the first page meets a page release condition.
[0014] In some optional embodiments, the first callback module is further used to mark the first page by calling a first callback method to obtain the page identifier corresponding to the first page, and the first callback method is used to trigger a resource release operation.
[0015] In some optional embodiments, the first callback module is further used to call the first callback method to release the memory resource occupied by the first page based on the page mark when the first page meets the page release condition.
[0016] In some optional embodiments, the first callback module is further used to obtain the page type of the first page;
[0017] The first callback module is further configured to release the memory resources occupied by the first page based on the page tag when the page type belongs to the target page type.
[0018] In some optional embodiments, the target page type includes at least one of the following:
[0019] Random display type, the page of the random display type is used to display the page content randomly generated when the page is started;
[0020] Instant game type, the page of the instant game type is used to provide instant game content;
[0021] Operation collection type, the page of the operation collection type is used to collect input operation data;
[0022] Information pop-up window type: the page of the information pop-up window type is used to provide prompt information display.
[0023] In some optional embodiments, the first callback module is further used to detect the duration of switching from the first page to the second page;
[0024] The first callback module is further configured to release the memory resources occupied by the first page based on the page mark when the duration of the switching reaches a preset duration threshold.
[0025] In some optional embodiments, the device further comprises:
[0026] An acquisition module, used to acquire load information of the mobile terminal;
[0027] The acquisition module is further used to acquire a historical exit page set when the load information reaches a preset load threshold, wherein the historical exit page set is used to record historical exit pages exited within a historical period, and the historical exit page set includes the first page;
[0028] The first callback module is used to release the memory resources occupied by the first page based on the page mark when the first page is the page with the lowest page priority in the historical exit page set.
[0029] In some optional embodiments, the second callback module is further used to load the page resource corresponding to the second page by calling a second callback method, and the second callback method is used to load resources to maintain the display of the page by the vehicle terminal.
[0030] In some optional embodiments, the device further comprises:
[0031] A processing module, used for performing logic processing and encoding on the page resources to obtain encoded data;
[0032] The sending module is used to send the coded data to the vehicle-mounted terminal, and the vehicle-mounted terminal is used to decode and display the coded data.
[0033] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a method for processing memory resources as described in any of the above-mentioned embodiments of the present application.
[0034] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for processing memory resources as described in any of the above-mentioned embodiments of the present application.
[0035] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the memory resource processing method described in any of the above embodiments.
[0036] The technical solution provided by this application includes at least the following beneficial effects:
[0037] In the in-vehicle interconnection scenario of a mobile terminal and an in-vehicle terminal, when a first page displayed on the in-vehicle terminal switches to a second page, the mobile terminal marks the exited first page, records the page mark of the first page, and the mobile terminal loads page resources of the second page to support the in-vehicle terminal in displaying the second page. The mobile terminal releases the memory resources occupied by the first page in the mobile terminal when the exited first page meets the page release condition, so that the memory resources are released for the exited page of the in-vehicle terminal in the in-vehicle interconnection scenario, avoiding the situation where the mobile terminal occupies too much memory due to a long interconnection time or a large number of user operations between pages, reducing the load pressure of the mobile terminal, and ensuring the stability of the in-vehicle interconnection. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 is a structural block diagram of a vehicle networking system provided by an exemplary embodiment of the present application;
[0040] Figure 2 is a flowchart of a method for processing memory resources provided by an exemplary embodiment of the present application;
[0041] Figure 3 is a flowchart of a method for processing memory resources provided by an exemplary embodiment of the present application;
[0042] Figure 4 is a flowchart of a memory resource processing process provided by an exemplary embodiment of the present application;
[0043] Figure 5 is a structural block diagram of a memory resource processing device provided by an exemplary embodiment of the present application;
[0044] Figure 6It is a schematic diagram of the structure of a server provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application clearer, the implementation mode of the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0046] In this application, the terms "first", "second", etc. are used to distinguish identical items or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first" and "second", nor are there any limitations on quantity and execution order.
[0047] First, a brief introduction is given to the terms involved in the embodiments of the present application.
[0048] Vehicle-to-Everything (V2X): Vehicle-to-Everything is a communication technology that connects cars to the external environment. It includes information exchange between vehicles and other vehicles (Vehicle-to-Vehicle, V2V), infrastructure (Vehicle-to-Infrastructure, V2I), pedestrians (Vehicle-to-People, V2P) and other objects (Vehicle-to-Others, V2O). Through this connection, vehicles can receive and send data in real time, thereby improving road safety, increasing traffic efficiency, reducing energy consumption and reducing traffic congestion.
[0049] In-vehicle interconnection system: It is a system that realizes in-vehicle interconnection functions based on the Internet of Vehicles. It is an important part of modern automotive technology. It allows smartphones to connect with the car's infotainment system, providing a richer and more convenient driving experience. The in-vehicle interconnection system can provide navigation and real-time traffic information, entertainment systems, communication services, safety and emergency response, vehicle control and monitoring, mobile payments, data collection and analysis and other functions.
[0050] Figure 1 The structure block diagram of a vehicle networking system provided by an exemplary embodiment of the present application is shown. The vehicle networking system 100 includes: a mobile terminal 110 and a vehicle terminal 120.
[0051] The mobile terminal 110 has installed and runs applications supporting the in-vehicle interconnection function, including in-vehicle interconnection applications, game applications, social applications, audio and video applications, live broadcast applications, e-commerce applications, application stores, browsers, etc.
[0052] The device types of the mobile terminal 110 include: smart phones, tablet computers, e-book readers, Moving Picture Experts Group Audio Layer III (MP3) players, Moving Picture Experts Group Audio Layer IV (MP4) players, laptop computers, Extended Reality (XR) (including Virtual Reality (VR), Augmented Reality (AR), Mixed Reality (MR)) devices, handheld gaming devices, etc. The following embodiments are illustrated by taking a smart phone as an example.
[0053] The vehicle terminal 120 is a device installed on the vehicle, which is used to realize the connection and data exchange between the vehicle and external systems (such as vehicle network, Internet, mobile communication network, etc.). The vehicle terminal 120 usually includes a variety of sensors, communication modules and computing units, which can monitor the status, location and driving information of the vehicle in real time, and transmit these data to the vehicle network or external system. At the same time, it can also receive external instructions or data, and perform corresponding operations or feedback according to the instructions.
[0054] Optionally, a wired connection is established between the mobile terminal 110 and the vehicle-mounted terminal 120, for example, the mobile terminal 110 and the vehicle-mounted terminal 120 are connected via a data cable; alternatively, a wireless connection is established between the mobile terminal 110 and the vehicle-mounted terminal 120, and optionally, the above-mentioned wireless connection can be implemented through a cellular network (such as 4G, 5G) or a short-range wireless connection technology (for example, Wireless Fidelity (WI-FI), Bluetooth (Bluetooth), ZigBee (ZigBee), Near-field Communication (NFC), etc.).
[0055] Those skilled in the art will appreciate that the number of the above devices may be more or less. For example, the above device may be only one, or the above devices may be dozens or hundreds, or more. The embodiment of the present application does not limit the number and type of devices.
[0056] In the embodiment of the present application, the mobile terminal 110 and the vehicle terminal 120 are connected to each other via a vehicle interconnection system. Optionally, the vehicle interconnection system includes Carplay, Carlife, HiCar, Android Auto, etc., which are not limited here.
[0057] In one example, taking the in-vehicle interconnection system implemented as Carplay as an example, the conditions for supporting Carplay include: 1. The mobile terminal 110 is implemented as an iPhone; 2. The in-vehicle terminal 120 is a terminal in a vehicle that supports Carplay.
[0058] In an illustrative manner, after the mobile terminal 110 and the vehicle terminal 120 establish vehicle interconnection, the user uses the application supporting vehicle interconnection in the mobile terminal 110 through the vehicle terminal 120, wherein when the user instructs to switch from the first page currently displayed on the vehicle terminal 120 to the second page on the vehicle terminal 120, the mobile terminal 110 marks the first page, obtains the page identifier corresponding to the first page, and the mobile terminal 110 loads the page resource corresponding to the second page, thereby supporting the vehicle terminal 120 to display the second page through the page resource, and after the vehicle terminal 120 displays the second page, the mobile terminal 110 determines whether the first page meets the page release condition, and when it is determined that the first page meets the page release condition, the mobile terminal 110 releases the memory resources occupied by the first page based on the page mark. That is, the mobile terminal 110 completes the calculation of the data logic of the application page display process, and the vehicle terminal 120 is responsible for the display of the page, and when the user exits the first page through the vehicle terminal 120, when the mobile terminal 110 determines that the first page meets the page release condition, the mobile terminal 110 releases the memory resources occupied by the first page.
[0059] In combination with the above-mentioned noun introduction and implementation environment, the memory resource processing method provided by the present application is described, and the method is executed by a mobile terminal as an example. Figure 2 As shown, the method includes the following steps 210 to 230.
[0060] Step 210 , when the vehicle-mounted terminal has a display switching demand from a first page to a second page, the first page is marked to obtain a page identifier corresponding to the first page.
[0061] The vehicle terminal is a device installed on the vehicle, which is used to realize the connection and data exchange between the vehicle and external systems (such as vehicle network, Internet, mobile communication network, etc.). The vehicle terminal usually contains a variety of sensors, communication modules and computing units, which can monitor the status, location and driving information of the vehicle in real time, and transmit these data to the vehicle network or external system. At the same time, it can also receive external instructions or data, and perform corresponding operations or feedback according to the instructions.
[0062] In an embodiment of the present application, the vehicle terminal includes a vehicle display, which is used to provide content display function to the user in the vehicle interconnection scenario.
[0063] Optionally, the device types of the mobile terminal include: smart phones, tablet computers, e-book readers, MP3 players, MP4 players, laptop computers, VR devices, AR devices, MR devices, handheld gaming devices, etc.
[0064] In an embodiment of the present application, a communication connection is established between the vehicle-mounted terminal and the mobile terminal, and the vehicle-mounted terminal displays the vehicle-mounted interconnection based on the page provided by the mobile terminal, that is, an interactive environment of vehicle-mounted interconnection is established between the vehicle-mounted terminal and the mobile terminal through a communication connection, and the user can use the application installed in the mobile terminal through the vehicle-mounted terminal.
[0065] Optionally, the in-vehicle interconnected display is implemented to provide logical processing support for the page for the mobile terminal, and the display screen of the in-vehicle terminal displays the page, that is, the mobile terminal serves as a data processing end and the in-vehicle terminal serves as a display end; or, the in-vehicle terminal performs synchronous associated display based on the page displayed by the mobile terminal, that is, the mobile terminal is both a data processing end and a display end, and the in-vehicle terminal and the mobile terminal display the same content.
[0066] Optionally, a wired connection is established between the mobile terminal and the vehicle-mounted terminal, for example, the mobile terminal and the vehicle-mounted terminal are connected via a data cable; alternatively, a wireless connection is established between the mobile terminal and the vehicle-mounted terminal, and optionally, the above wireless connection can be implemented through a cellular network (such as 4G, 5G), Bluetooth, ZigBee, near-field communication, etc.
[0067] In an embodiment of the present application, the first page can be implemented as a page provided by an application that supports the in-vehicle interconnection function; the second page can be implemented as a page provided by an application that supports the in-vehicle interconnection function, or, can be implemented as a system page provided by the in-vehicle terminal.
[0068] Optionally, the first page and the second page may be different pages of the same application, or the first page and the second page may be different pages provided by different applications.
[0069] Optionally, when the first page and the second page are different pages of the same application, the second page is implemented as an upper-level page of the first page; or, the second page is implemented as a lower-level page of the first page; or, the second page and the first page are pages of the same level.
[0070] Optionally, the above-mentioned applications include in-vehicle interconnection applications, game applications, social applications, audio and video applications, live broadcast applications, e-commerce applications, application stores, browsers, etc.
[0071] Optionally, the switching display requirement from the first page to the second page may be implemented as at least one of the following:
[0072] The first one is that the vehicle-mounted terminal receives a page switching operation.
[0073] Illustratively, when the vehicle-mounted terminal receives a page switching operation from the user during display of the first page, it is determined that there is a demand for switching display, wherein the page switching operation indicates switching from the first page to the second page.
[0074] Optionally, the page switching operation is implemented as at least one of a control trigger operation, a gesture operation, a shortcut key operation, and a voice input operation.
[0075] In one example, when the page switching operation is implemented as a control trigger operation, illustratively, the vehicle terminal displays a page exit control in the first page, and in response to the vehicle terminal receiving a control trigger operation for the page exit control, it is determined that a page switching operation has been received.
[0076] In another example, when the page switching control is implemented as a gesture operation, illustratively, in response to the vehicle terminal receiving a preset gesture operation associated with the page switching operation, it is determined that the page switching operation is received. Optionally, the preset gesture operation can be implemented as a click operation, a long press operation, a sliding operation, an air gesture operation, etc.
[0077] In another example, when the page switching operation is implemented as a shortcut key operation, illustratively, in response to the vehicle terminal receiving a shortcut key trigger operation of a preset shortcut key bound to the page switching operation, it is determined that the page switching operation is received. Optionally, the above-mentioned preset shortcut key can be implemented as a physical button on the vehicle terminal, a physical button on an external input device connected to the vehicle terminal, etc.
[0078] In another example, when the page switching operation is implemented as a voice input operation, illustratively, in response to the vehicle-mounted terminal receiving the input voice, voice recognition is performed on the input voice, and in response to detecting keywords associated with the page switching operation in the input voice, it is determined that the page switching operation has been received. For example, when the vehicle-mounted terminal receives the user's input voice "return.", it is determined that the page switching operation from the first page to the second page (the previous level page) has been received.
[0079] In some embodiments, when the vehicle terminal receives a page switching operation, the vehicle terminal generates a page switching instruction based on the page switching operation, and the page switching instruction is used to indicate to the mobile terminal that the vehicle terminal has a display switching requirement from the first page to the second page, and the vehicle terminal sends the page switching instruction to the mobile terminal.
[0080] The second type is that the first page meets the automatic page switching condition.
[0081] Illustratively, when the vehicle-mounted terminal determines that the first page meets the automatic page switching condition during the display process of the first page, it is determined that there is a demand for switching the display.
[0082] Optionally, the automatic page switching condition of the first page includes at least one of the following:
[0083] 1. The page display time of the first page reaches the preset time threshold.
[0084] In some embodiments, the first page corresponds to a preset duration threshold to control the page display duration of the first page, wherein the above-mentioned page display duration is used to indicate the duration with the page opening time of the first page as the starting time and the current time as the ending time.
[0085] Illustratively, in response to the page display duration of the first page at the current moment reaching a preset duration threshold, it is determined that there is a demand for switching the display from the first page to the second page.
[0086] 2. The page content of the first page has been displayed.
[0087] In some embodiments, the page content in the first page is automatically displayed content, and when the vehicle-mounted terminal determines that the page content of the first page has been displayed, it determines that there is a need to switch the display from the first page to the second page. For example, the first page is a page for playing specified audio and video content, and when the specified audio and video content is played, the first page is automatically closed and jumped to the second page.
[0088] 3. The page content of the first page has been processed.
[0089] In some embodiments, the page content of the first page includes pending content, and when the vehicle terminal determines that the user has completed the pending content, it determines that there is a need to switch the display from the first page to the second page. For example, the first page is a page that provides a payment function, and when the vehicle terminal determines that the user has completed the payment, the first page is automatically closed and jumped to the second page.
[0090] 4. The page priority of the first page is lower than the page priority of the second page.
[0091] In some embodiments, the second page is a candidate page to be displayed. When the vehicle terminal detects that the page priority of the second page to be displayed is higher than the page priority of the first page, it is determined that there is a need to switch display from the first page to the second page.
[0092] In some embodiments, when the vehicle terminal determines that the first page meets the automatic page switching conditions, the vehicle terminal generates a page switching instruction, which is used to indicate to the mobile terminal that the vehicle terminal has a display switching requirement from the first page to the second page, and the vehicle terminal sends the page switching instruction to the mobile terminal.
[0093] In some embodiments, when the mobile terminal receives a page switching instruction sent by the vehicle terminal, it determines that the vehicle terminal has a display switching requirement from a first page to a second page, marks the first page, and obtains a page identifier corresponding to the first page.
[0094] In the embodiment of the present application, the page mark corresponding to the first page is used to uniquely identify the first page.
[0095] In some embodiments, a page list corresponding to the in-vehicle interconnection process is stored in the mobile terminal, and the page list is used to store page resources in the in-vehicle interconnection process. Optionally, the mobile terminal stores page resources of all pages used in the in-vehicle interconnection process in the page list in a specified order; or, the mobile terminal generates a corresponding page list for each displayed page to store the page resources corresponding to the page.
[0096] In some embodiments, when multiple pages share a page list, when the vehicle-mounted terminal has a switching display requirement to switch from a first page to a second page, the mobile terminal marks the first page in the page list to obtain a page identifier corresponding to the first page. In other embodiments, when each page corresponds to an independent page list, when the vehicle-mounted terminal has a switching display requirement to switch from a first page to a second page, the mobile terminal marks the page list corresponding to the first page to achieve marking of the page resources of the first page.
[0097] In some embodiments, the page list stores page identifiers and page resources of pages displayed by the vehicle terminal during vehicle-mounted interconnection. When the vehicle terminal has a display switching requirement from a first page to a second page, the mobile terminal queries the page identifier corresponding to the first page from the page list and records the page identifier of the first page.
[0098] In other embodiments, the page list stores page resources of pages displayed by the vehicle terminal during the vehicle-mounted interconnection process in the order in which the pages are displayed. When the vehicle terminal has a display switching demand from a first page to a second page, the mobile terminal determines the first page from the page list, generates a page identifier corresponding to the first page, and records the location information of the page resources of the first page in the page list.
[0099] Step 220: Load the page resource corresponding to the second page.
[0100] In an embodiment of the present application, the mobile terminal provides data logic processing support for the vehicle terminal display page during the vehicle-mounted interconnection process, that is, the page generation process of the second page is implemented by the mobile terminal.
[0101] In the embodiment of the present application, when the mobile terminal determines that the vehicle terminal has a switching display requirement from the first page to the second page, the page resource corresponding to the second page is loaded, wherein the page resource is used to support the vehicle terminal to display the second page.
[0102] In some embodiments, the page switching instruction includes a page identifier corresponding to the second page, and the mobile terminal loads a page resource corresponding to the second page according to the page identifier corresponding to the second page.
[0103] In other embodiments, the page switching instruction includes a page identifier of the first page and a page switching type, wherein the page switching type is used to indicate the switching type from the first page to the second page. The mobile terminal determines the page identifier of the second page based on the page identifier and the page switching type of the first page, and loads the page resources corresponding to the second page according to the page identifier corresponding to the second page.
[0104] Optionally, the page switching type includes a return type. When the page switching type is a return type, the second page is the upper level page of the first page. Therefore, the page identifier of the second page which is the upper level of the first page can be queried according to the page identifier of the first page; Optionally, the page switching type includes a forward type. When the page switching operation is a forward type, the second page is the lower level page of the first page. Therefore, the page identifier of the second page which is the lower level of the first page can be queried according to the page identifier of the first page; Optionally, the page switching type includes an exit type. When the page switching type is an exit type, the second page is a function system page of the in-vehicle interconnection function, and the page identifier corresponding to the function system page is obtained as the page identifier of the second page.
[0105] In some embodiments, the page resources of the second page include resources used to generate the second page. Optionally, the page resources of the second page include code data, image data, video data, audio data, text data, application programming interface (API) call data, configuration data, protocol data, component data, script data, etc.
[0106] Step 230 : When the first page meets the page release condition, release the memory resource occupied by the first page based on the page tag.
[0107] The page release condition is a condition for determining whether the memory resources occupied by the first page need to be released. Optionally, the page release condition can be implemented as at least one of the following:
[0108] The first one is to determine whether the page release condition is met based on the page type of the first page.
[0109] In an illustrative manner, the page type of the first page is obtained; if the page type belongs to the target page type, the memory resources occupied by the first page are released based on the page tag. That is, it is determined whether the memory resources occupied by the first page need to be released after exiting the first page based on the page type of the first page.
[0110] Optionally, the target page type includes at least one of the following:
[0111] 1. Random display type, wherein the page of random display type is used to display page content randomly generated when the page is started. In some embodiments, since the page content of the page of random display type is randomly generated when the page is started, when the page type of the first page is the random display type, the page content displayed on the first page before exiting the first page is different from the page content displayed when entering the first page next time after exiting the first page. It can be seen that there is no need to retain the cached data of the first page after exiting the first page, that is, when the page type of the first page is the random display type, the memory resources occupied by the first page are released based on the page tag.
[0112] Optionally, pages of the random display type include advertisement pages, random playlist pages, random video pages, etc.
[0113] 2. Instant game type, where the page of instant game type is used to provide instant game content. In some embodiments, the user can play the game application installed in the mobile terminal on the in-vehicle terminal through the interconnection between the mobile terminal and the in-vehicle terminal. When the game content provided by the game application is instant game content, since the game state of the instant game content does not need to be saved, the game data of the first page does not need to be retained after exiting the first page, that is, when the page type of the first page is the instant game type, the memory resources occupied by the first page are released based on the page tag.
[0114] 3. Operation collection type, where the page of operation collection type is used to collect input operation data. In some embodiments, the user can complete the operation collection on the vehicle terminal through the interconnection between the mobile terminal and the vehicle terminal. When it is determined that the operation collection is completed, the memory resources occupied by the first page can be released based on the page mark.
[0115] Optionally, pages of operation collection type include payment page, login page, download page, etc.
[0116] 4. Information pop-up window type, where the information pop-up window type page is used to provide prompt information display. In some embodiments, when the user uses the application on the vehicle terminal, there will be an information pop-up window type page for information prompts. When the user closes the information pop-up window type page and returns to the original page, or jumps to the landing page through the information pop-up window page, it means that the prompt information provided by the information pop-up window type page has been received by the user and there is no longer a display demand, that is, when the page type of the first page is the information pop-up window type, the memory resources occupied by the first page are released based on the page tag.
[0117] Optionally, pages of information pop-up type include system notification pages, application notification pages, activity push pages, advertising pages, etc.
[0118] The second method is to determine whether the page release condition is met based on the duration of the switch after the first page is exited.
[0119] In some embodiments, the first page corresponds to a preset time threshold for retaining its memory resources after it is exited. When the time after the first page is exited reaches the preset time threshold, the mobile terminal clears the memory resources occupied by the first page. In an illustrative example, the duration of switching from the first page to the second page is detected; when the duration of the switching reaches the preset time threshold, the memory resources occupied by the first page are released based on the page tag.
[0120] In some embodiments, in response to the mobile terminal receiving a page switching instruction sent by the vehicle-mounted terminal, the mobile terminal starts the clock corresponding to the first page, and records the switching duration after the first page is exited through the clock corresponding to the first page. In response to the switching duration recorded by the clock reaching a preset duration threshold, the memory resources occupied by the first page are released based on the page mark.
[0121] Optionally, the preset time threshold may be a fixed value preset by the system; or, the preset time threshold may be a specified value set by a user; or, the preset time threshold may be a dynamic value dynamically determined based on the first page.
[0122] In some embodiments, when the above-mentioned preset duration threshold is a dynamic value dynamically determined based on the first page, optionally, the preset duration threshold may be determined in at least one of the following ways:
[0123] 1. Determine a preset duration threshold based on the historical display duration of the first page.
[0124] In some embodiments, the historical display time corresponding to the first page before switching to the second page is obtained, and the historical display time is converted into a preset time threshold. The historical display time is positively correlated with the preset time threshold, that is, the longer the historical display time is, the higher the user's demand for the first page is, and therefore the probability of returning to the first page after switching to the second page is higher, so the release time of the memory resources of the first page is controlled with a higher preset time threshold.
[0125] Optionally, the historical display duration is mapped to a corresponding target duration range, a first relationship list between the duration range and the duration threshold is obtained, a target duration threshold corresponding to the target duration range is found from the first relationship list, and the target duration threshold is determined as a preset duration threshold.
[0126] Optionally, the historical display time is substituted into the first conversion function to obtain a corresponding preset time threshold, wherein the first conversion function is a preset function for converting the historical display time into a corresponding time threshold, and the converted preset time threshold is positively correlated with the input historical display time.
[0127] 2. Determine a preset time threshold based on the historical number of times the first page has been opened.
[0128] In some embodiments, the historical opening times of the first page obtained in a preset historical period are obtained, and the historical opening times are converted into a preset duration threshold. The historical opening times are positively correlated with the preset duration threshold, that is, the more historical opening times represent the higher the user's demand for the first page, and therefore the higher the probability of returning to the first page after switching to the second page, so the release time of the memory resources of the first page is controlled with a higher preset duration threshold.
[0129] Optionally, the preset historical period can be implemented as a period obtained by dividing the specified time forward with the switching moment from the first page to the second page as the end moment; or, the preset historical period can be implemented as a period obtained by dividing the specified time forward with the start moment of this in-vehicle interconnection as the start moment and the switching moment from the first page to the second page as the end moment.
[0130] Optionally, the historical number of startup times is mapped to a corresponding target number range, a second relationship list between the number range and the duration threshold is obtained, the target duration threshold corresponding to the target number range is found from the second relationship list, and the target duration threshold is determined as the preset duration threshold.
[0131] Optionally, the historical number of startup times is substituted into the second conversion function to obtain a corresponding preset duration threshold, wherein the second conversion function is a preset function for converting the historical number of startup times into a corresponding duration threshold, and the converted preset duration threshold is positively correlated with the input historical number of startup times.
[0132] The third method is to determine whether the first page satisfies the page release condition based on the load of the mobile terminal.
[0133] In some embodiments, when the vehicle terminal has a display switching demand from a first page to a second page, the mobile terminal records the first page into a historical exit page set, wherein the historical exit page set is used to record historical exit pages exited within a historical period.
[0134] Illustratively, load information of a mobile terminal is obtained, and when the load information reaches a preset load threshold, a historical exit page set is obtained, wherein the historical exit page set includes a first page, and when the first page is the page with the lowest page priority in the historical exit page set, memory resources occupied by the first page are released based on the page tag.
[0135] Optionally, the load information includes at least one of memory usage information, central processing unit (CPU) usage, network connection status, system process / thread status, device temperature, device voltage, and disk usage.
[0136] In one example, taking the load information including memory usage information as an example, when the memory usage of the mobile terminal reaches a preset usage threshold, a page with the lowest page priority is determined from the historical exit page set, and the content resources occupied by the page are released. For example, when the memory usage exceeds 80%, the page with the lowest page priority among the exited pages is released.
[0137] Optionally, the page priority may be determined based on at least one indicator of the total number of page openings, the total page dwell time, and the relevance of page content to driving.
[0138] In some embodiments, when it is determined that the vehicle-mounted terminal has a display switching requirement from a first page to a second page, the mobile terminal has marked the first page in the page list and recorded the page identifier corresponding to the first page. Then, when it is determined that the first page meets the page release conditions, the memory resources occupied by the first page are determined in the page list through the page identifier, and the memory resources occupied by the first page are released.
[0139] To sum up, in the in-vehicle interconnection scenario of a mobile terminal and a vehicle terminal, when the first page displayed on the vehicle terminal switches to the second page, the mobile terminal marks the exited first page and records the page mark of the first page. The mobile terminal loads the page resources of the second page to provide support for the vehicle terminal to display the second page, and releases the memory resources occupied by the first page in the mobile terminal when the exited first page meets the page release condition, so that the memory resources are released for the exited page of the vehicle terminal in the in-vehicle interconnection scenario, avoiding the situation where the mobile terminal occupies too much memory due to a long interconnection time or a large number of user operations between pages, reducing the load pressure of the mobile terminal, and ensuring the stability of the in-vehicle interconnection.
[0140] In some optional embodiments, the resource release of the first page and the resource loading of the second page are realized through a callback method. Figure 3 , which shows a flowchart of a method for processing memory resources provided by an exemplary embodiment of the present application, the method includes steps 310 to 330.
[0141] Step 310 , when the vehicle terminal has a display switching demand from a first page to a second page, the first page is marked by calling a first callback method to obtain a page identifier corresponding to the first page.
[0142] A vehicle-mounted terminal is a device installed in a vehicle and used to achieve connection and data exchange between the vehicle and external systems (such as vehicle networks, the Internet, mobile communication networks, etc.).
[0143] In an embodiment of the present application, the vehicle terminal includes a vehicle display, which is used to provide content display function to the user in the vehicle interconnection scenario.
[0144] Optionally, the device types of the mobile terminal include: smart phones, tablet computers, e-book readers, MP3 players, MP4 players, laptop computers, VR devices, AR devices, MR devices, handheld gaming devices, etc.
[0145] In an embodiment of the present application, a vehicle-mounted interconnected device interaction environment is established between the vehicle-mounted terminal and the mobile terminal through a communication connection.
[0146] In an embodiment of the present application, the first page can be implemented as a page provided by an application that supports the in-vehicle interconnection function; the second page can be implemented as a page provided by an application that supports the in-vehicle interconnection function, or, can be implemented as a system page provided by the in-vehicle terminal.
[0147] Optionally, the first page and the second page may be different pages of the same application, or the first page and the second page may be different pages provided by different applications.
[0148] Optionally, when the first page and the second page are different pages of the same application, the second page is implemented as an upper-level page of the first page; or, the second page is implemented as a lower-level page of the first page; or, the second page and the first page are pages of the same level.
[0149] Optionally, the above-mentioned applications include in-vehicle interconnection applications, game applications, social applications, audio and video applications, live broadcast applications, e-commerce applications, application stores, browsers, etc.
[0150] In the embodiment of the present application, the first callback method is used to trigger a resource release operation, that is, the first callback method is a method that can realize resource release.
[0151] Among them, callback method is an important concept in programming. It refers to a function passed as a parameter to another function, and is called and executed when a specific event occurs or a condition is met. The callback method mechanism allows the code logic to be separated, making the code more modular and maintainable. The callback method is usually implemented through a function pointer. In C language, callback can be implemented by defining a function pointer type and passing it as a parameter to another function. In languages such as Java and JavaScript, callback methods can also be implemented through interfaces, anonymous inner classes, and lambda expressions.
[0152] In some embodiments, the first callback method is implemented as a "templateDidDisappear" method, wherein "templateDidDisappear" is used to conditionally trigger object destruction or resource release operations, thereby ensuring that related memory is released after the page disappears.
[0153] In some embodiments, when the "templateDidDisappear" method implements resource release, the "templateDidDisappear" method may not return any value, that is, the return type is "void", and the first callback method is implemented as "(void)templateDidDisappear".
[0154] In an embodiment of the present application, when there is a demand for switching display from a first page to a second page in the vehicle terminal, the first page to be exited is marked by calling back the "templateDidDisappear" method.
[0155] Step 320: Load the page resource corresponding to the second page by calling the second callback method.
[0156] The above page resources are used to support the vehicle terminal to display the second page. In the embodiment of the present application, the mobile terminal provides data logic processing support for the vehicle terminal to display the page during the vehicle interconnection process, that is, the page generation process of the second page is implemented by the mobile terminal.
[0157] The second callback method is used to load resources to maintain the display of the page by the vehicle-mounted terminal, that is, the second callback method is a method that can realize resource loading.
[0158] In some embodiments, the second callback method is implemented as a "templateDidAppear" method, wherein the "templateDidAppear" method is used to ensure that necessary resources are recreated or loaded when the vehicle terminal displays the page to support normal display and function of the vehicle terminal page.
[0159] In some embodiments, when the "templateDidAppear" method implements resource loading, the "templateDidAppear" method may not return any value, that is, the return type is "void", and the second callback method is implemented as "(void)templateDidAppear".
[0160] In some embodiments, after the mobile terminal loads the page resources corresponding to the second page through the second callback method, the page resources are logically processed and encoded to obtain encoded data, and the above encoded data is sent to the vehicle terminal, wherein the vehicle terminal is used to decode and display the encoded data.
[0161] In some embodiments, the page resources of the second page include resources used to generate the second page. Optionally, the page resources of the second page include code data, image data, video data, audio data, text data, application programming interface call data, configuration data, protocol data, component data, script data, etc.
[0162] In some embodiments, the mobile terminal sends the coded data to the vehicle terminal via a wired connection with the vehicle terminal; or, the mobile terminal sends the coded data to the vehicle terminal via a wireless connection with the vehicle terminal. Optionally, the wired connection may be a connection method implemented by a data cable; optionally, the wireless connection may be a connection method implemented by a cellular network (e.g., 4G, 5G) or a short-range wireless connection technology (e.g., wireless fidelity technology, Bluetooth, ZigBee, near field communication, etc.).
[0163] Step 330 , when the first page meets the page release condition, calling the first callback method to release the memory resources occupied by the first page based on the page mark.
[0164] The page release condition is a condition for determining whether the memory resources occupied by the first page need to be released. Optionally, the page release condition can be implemented as at least one of the following:
[0165] The first method is to determine whether a page release condition is met based on the page type of the first page.
[0166] Illustratively, the page type of the first page is obtained; when the page type belongs to the target page type, the memory resources occupied by the first page are released based on the page tag.
[0167] Optionally, the target page type includes at least one of a random display type, an instant game type, an operation collection type, and an information pop-up window type.
[0168] The second method is to determine whether the page release condition is met based on the duration of the switch after the first page is exited.
[0169] Illustratively, the duration of switching from a first page to a second page is detected; when the duration of the switching reaches a preset duration threshold, the memory resources occupied by the first page are released based on the page mark.
[0170] The third method is to determine whether the first page satisfies the page release condition based on the load of the mobile terminal.
[0171] Illustratively, load information of a mobile terminal is obtained, and when the load information reaches a preset load threshold, a historical exit page set is obtained, wherein the historical exit page set includes a first page, and when the first page is the page with the lowest page priority in the historical exit page set, memory resources occupied by the first page are released based on the page tag.
[0172] In the embodiment of the present application, the page release condition is a trigger condition of the first callback method for releasing resources, and is also a condition for determining whether the memory resources occupied by the first page need to be released.
[0173] In some embodiments, the above-mentioned first callback method is implemented as a "templateDidDisappear" method, wherein the "templateDidDisappear" method marks the first page when it is determined that the vehicle terminal has a display switching requirement from the first page to the second page, and releases the memory resources occupied by the first page based on the page mark obtained by marking when it is determined that the first page meets the page release condition.
[0174] In some embodiments, when multiple pages share a page list, when the first page meets the page release condition, the mobile terminal clears the page resources of the first page stored in the page list according to the page tag of the first page, thereby releasing the memory resources occupied by the first page. In other embodiments, when each page corresponds to an independent page list, when the first page meets the page release condition, the mobile terminal finds the page list corresponding to the first page according to the page tag of the first page, clears the page resources of the first page stored in the page list corresponding to the first page, thereby releasing the memory resources occupied by the first page.
[0175] For example, please refer to Figure 4 , which shows a flowchart of the memory resource processing process provided by an exemplary embodiment of the present application, which includes the following steps: 401, detect user operation return; 402, the system calls back templateDidDisappear to mark the exited page; 403, the system calls back templateDidAppear; 404, detect whether the marked page should be released, if so, execute 405, if not, end; 405, update the list corresponding to the exited page to an empty list to release memory.
[0176] To sum up, in the in-vehicle interconnection scenario of a mobile terminal and a vehicle terminal, when the first page displayed on the vehicle terminal switches to the second page, the mobile terminal marks the exited first page and records the page mark of the first page. The mobile terminal loads the page resources of the second page to provide support for the vehicle terminal to display the second page, and releases the memory resources occupied by the first page in the mobile terminal when the exited first page meets the page release condition, so that the memory resources are released for the exited page of the vehicle terminal in the in-vehicle interconnection scenario, avoiding the situation where the mobile terminal occupies too much memory due to a long interconnection time or a large number of user operations between pages, reducing the load pressure of the mobile terminal, and ensuring the stability of the in-vehicle interconnection.
[0177] In an embodiment of the present application, the release of the first page will only be judged after the mobile terminal completes loading of the page resources of the second page. Therefore, it will not affect the rendering of normal pages and user interaction by the vehicle terminal. Memory recovery is only performed after the page is exited, avoiding memory leakage problems caused by system vulnerabilities (bugs).
[0178] In the embodiment of the present application, the "templateDidAppear" and "templateDidDisappear" callback methods are used to monitor the display and disappearance status of each page, and the monitoring of the page life cycle in the in-vehicle interconnection scenario is realized in an efficient manner, thereby improving the stability of the mobile terminal in the in-vehicle interconnection scenario when it provides data processing support for in-vehicle interconnection and runs for a long time, and reducing the risk of crash or performance degradation of the mobile terminal.
[0179] It should be noted that before collecting relevant data of users and during the process of collecting relevant data of users, this application can display a prompt interface, pop-up window or output voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining relevant data of users after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data of users are terminated, that is, the relevant data of users are not obtained. In other words, all user data collected by this application are collected with the consent and authorization of the user, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of relevant countries and regions.
[0180] Please refer to Figure 5 , which shows a structural block diagram of a memory resource processing device provided by an exemplary embodiment of the present application, the device includes the following modules:
[0181] The first callback module 510 is used to mark the first page and obtain a page identifier corresponding to the first page when there is a switching display requirement from the first page to the second page in the vehicle terminal, the vehicle terminal and the mobile terminal establish a communication connection relationship, and the vehicle terminal performs vehicle interconnection display based on the page provided by the mobile terminal;
[0182] A second callback module 520, used to load a page resource corresponding to the second page, wherein the page resource is used to support the display of the second page by the vehicle terminal;
[0183] The first callback module 510 is further configured to release the memory resources occupied by the first page based on the page tag when the first page meets a page release condition.
[0184] In some optional embodiments, the first callback module 510 is further used to mark the first page by calling a first callback method to obtain the page identifier corresponding to the first page, and the first callback method is used to trigger a resource release operation.
[0185] In some optional embodiments, the first callback module 510 is further configured to, when the first page satisfies a page release condition, call the first callback method to release the memory resource occupied by the first page based on the page tag.
[0186] In some optional embodiments, the first callback module 510 is further used to obtain the page type of the first page;
[0187] The first callback module 510 is further configured to release the memory resource occupied by the first page based on the page tag when the page type belongs to the target page type.
[0188] In some optional embodiments, the target page type includes at least one of the following:
[0189] Random display type, the page of the random display type is used to display the page content randomly generated when the page is started;
[0190] Instant game type, the page of the instant game type is used to provide instant game content;
[0191] Operation collection type, the page of the operation collection type is used to collect input operation data;
[0192] Information pop-up window type: the page of the information pop-up window type is used to provide prompt information display.
[0193] In some optional embodiments, the first callback module 510 is further used to detect the duration of switching from the first page to the second page;
[0194] The first callback module 510 is further configured to release the memory resources occupied by the first page based on the page mark when the duration of the switching reaches a preset duration threshold.
[0195] In some optional embodiments, the device further comprises:
[0196] An acquisition module (not shown in the figure), used to acquire load information of the mobile terminal;
[0197] The acquisition module is further used to acquire a historical exit page set when the load information reaches a preset load threshold, wherein the historical exit page set is used to record historical exit pages exited within a historical period, and the historical exit page set includes the first page;
[0198] The first callback module 510 is configured to release the memory resources occupied by the first page based on the page tag when the first page is the page with the lowest page priority in the historical exit page set.
[0199] In some optional embodiments, the second callback module 520 is further used to load the page resource corresponding to the second page by calling a second callback method, and the second callback method is used to load resources to maintain the display of the page by the vehicle terminal.
[0200] In some optional embodiments, the device further comprises:
[0201] A processing module (not shown in the figure), used for performing logical processing and encoding on the page resources to obtain encoded data;
[0202] The sending module (not shown in the figure) is used to send the encoded data to the vehicle-mounted terminal, and the vehicle-mounted terminal is used to decode and display the encoded data.
[0203] To sum up, in the in-vehicle interconnection scenario of a mobile terminal and a vehicle terminal, when the first page displayed on the vehicle terminal switches to the second page, the mobile terminal marks the exited first page and records the page mark of the first page. The mobile terminal loads the page resources of the second page to provide support for the vehicle terminal to display the second page, and releases the memory resources occupied by the first page in the mobile terminal when the exited first page meets the page release condition, so that the memory resources are released for the exited page of the vehicle terminal in the in-vehicle interconnection scenario, avoiding the situation where the mobile terminal occupies too much memory due to a long interconnection time or a large number of user operations between pages, reducing the load pressure of the mobile terminal, and ensuring the stability of the in-vehicle interconnection.
[0204] It should be noted that the memory resource processing device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the memory resource processing device provided in the above embodiment and the memory resource processing method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0205] Figure 6 The schematic diagram of the structure of a server provided by an exemplary embodiment of the present application is shown, which specifically includes the following structure.
[0206] The server 600 includes a central processing unit (CPU) 601, a system memory 604 including a random access memory (RAM) 602 and a read only memory (ROM) 603, and a system bus 605 connecting the system memory 604 and the central processing unit 601. The server 600 also includes a mass storage device 606 for storing an operating system 613, application programs 614, and other program modules 615.
[0207] The mass storage device 606 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605. The mass storage device 606 and its associated computer readable media provide non-volatile storage for the server 600. That is, the mass storage device 606 may include a computer readable medium (not shown) such as a hard disk or a compact disc read only memory (CD-ROM) drive.
[0208] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other solid-state memory technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 604 and mass storage device 606 can be collectively referred to as memory.
[0209] According to various embodiments of the present application, the server 600 can also be connected to a remote computer on the network through a network such as the Internet. That is, the server 600 can be connected to the network 612 through the network interface unit 611 connected to the system bus 605, or the network interface unit 611 can be used to connect to other types of networks or remote computer systems (not shown).
[0210] The above-mentioned memory also includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.
[0211] The embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein at least one instruction, at least one program, code set or instruction set is stored in the memory, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the detection method for application startup provided by the above-mentioned method embodiments. Optionally, the computer device can be a terminal or a server.
[0212] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the application startup detection method provided in the above-mentioned method embodiments.
[0213] The embodiments of the present application also provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the detection method for application startup described in any of the above embodiments.
[0214] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0215] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0216] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for processing memory resources, characterized in that: The method is executed by a mobile terminal, and the method includes: When the vehicle terminal has a switching display requirement from a first page to a second page, marking the first page, obtaining a page identifier corresponding to the first page, establishing a communication connection relationship between the vehicle terminal and the mobile terminal, and performing vehicle interconnection display based on the page provided by the mobile terminal; Loading a page resource corresponding to the second page, wherein the page resource is used to support the vehicle-mounted terminal to display the second page; When the first page meets a page release condition, memory resources occupied by the first page are released based on the page tag.
2. The method according to claim 1, characterized in that: The marking the first page to obtain a page identifier corresponding to the first page includes: The first page is marked by calling a first callback method to obtain the page identifier corresponding to the first page, and the first callback method is used to trigger a resource release operation.
3. The method according to claim 2, characterized in that The releasing the memory resources occupied by the first page based on the page mark when the first page meets the page release condition includes: When the first page meets the page release condition, the first callback method is called to release the memory resource occupied by the first page based on the page mark.
4. The method according to any one of claims 1 to 3, characterized in that: The releasing the memory resources occupied by the first page based on the page mark when the first page meets the page release condition includes: Obtaining the page type of the first page; In a case where the page type belongs to the target page type, the memory resource occupied by the first page is released based on the page tag.
5. The method according to claim 4, characterized in that The target page type includes at least one of the following: Random display type, the page of the random display type is used to display the page content randomly generated when the page is started; Instant game type, the page of the instant game type is used to provide instant game content; Operation collection type, the page of the operation collection type is used to collect input operation data; Information pop-up window type: the page of the information pop-up window type is used to provide prompt information display.
6. The method according to any one of claims 1 to 3, characterized in that: The releasing the memory resources occupied by the first page based on the page mark when the first page meets the page release condition includes: Detecting a duration of switching from the first page to the second page; When the duration of the switching reaches a preset duration threshold, the memory resources occupied by the first page are released based on the page mark.
7. The method according to any one of claims 1 to 3, characterized in that: The releasing the memory resources occupied by the first page based on the page mark when the first page meets the page release condition includes: Acquiring load information of the mobile terminal; When the load information reaches a preset load threshold, obtaining a historical exit page set, wherein the historical exit page set is used to record historical exit pages exited within a historical period, and the historical exit page set includes the first page; In a case where the first page is a page with the lowest page priority in the historical exit page set, memory resources occupied by the first page are released based on the page mark.
8. The method according to any one of claims 1 to 3, characterized in that: The loading of the page resource corresponding to the second page includes: The page resource corresponding to the second page is loaded by calling a second callback method, where the second callback method is used to load resources to maintain the display of the page by the vehicle-mounted terminal.
9. The method according to claim 8, characterized in that After loading the page resource corresponding to the second page by calling the second callback method, the method further includes: Performing logical processing and encoding on the page resources to obtain encoded data; The encoded data is sent to the vehicle-mounted terminal, and the vehicle-mounted terminal is used to decode and display the encoded data.
10. A memory resource processing device, characterized in that: The device comprises: A first callback module is used for marking the first page and obtaining a page identifier corresponding to the first page when there is a switching display requirement of the vehicle terminal from the first page to the second page, the vehicle terminal and the mobile terminal establish a communication connection relationship, and the vehicle terminal performs vehicle interconnection display based on the page provided by the mobile terminal; A second callback module, used to load a page resource corresponding to the second page, wherein the page resource is used to support the display of the second page by the vehicle terminal; The first callback module is further configured to release the memory resources occupied by the first page based on the page mark when the first page meets a page release condition.
11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the memory resource processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the program code is loaded and executed by a processor to implement the method for processing memory resources as described in any one of claims 1 to 9.
13. A computer program product, characterized in that It includes a computer program or an instruction, which, when executed by a processor, implements the method for processing memory resources as described in any one of claims 1 to 9.
Citation Information
Cited By
Page display method and device, electronic equipment and storage medium
CN120234080A
Interface management method and device, new energy automobile and storage medium
CN120653352A