Application switching method, computer equipment and computer readable storage medium

By recording application feature information in the OPENCPU communication module and releasing resources, application switching is achieved, and the problem of limited FLASH space is solved, and the service support capabilities and user experience of the module are improved.

CN119172333APending Publication Date: 2024-12-20FIBOCOM WIRELESS SOFTWARE INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411232974.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing communication modules based on OPENCPU scheme cannot achieve switching between different applications due to limited FLASH space, which limits their ability to support multiple services.

Method used

By recording its characteristic information when starting the application and calling the exit interface when switching instructions to release resources, freeing up FLASH space, covering new applications, and implementing application switching without requiring additional FLASH space.

Benefits of technology

It realizes that without adding FLASH space, the communication module can support switching of different applications, improving user experience and business support capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172333A_ABST
    Figure CN119172333A_ABST
Patent Text Reader

Abstract

The invention provides an application switching method, computer equipment and a computer readable storage medium. The application switching method is applied to a communication module running a first application, and the application switching method comprises the steps that when the first application is started, feature information of the first application is recorded, and the feature information comprises resource information allocated to the first application and task information corresponding to the first application; when an instruction for switching a second application is obtained, an exit interface of the first application is called, and the exit interface stops a task created by the first application and releases resources allocated to the first application according to the feature information; obtaining the second application, and covering a target FLASH area where the first application is located with the second application; and calling an entry function of the second application to start the second application. The communication module adopts the application switching method provided by the invention, so that switching of different applications can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an application switching method, a computer device, and a computer-readable storage medium. Background Art

[0002] In the related art, the communication module based on the OPENCPU (Open Central Processing Unit) solution runs the application in the following principle: first, a specific FLASH partition is configured for the application, and then the compiled application is burned into the FLASH partition. When the application startup instruction is obtained, the application can be automatically run, thereby realizing the service corresponding to the application. However, different services may need to be compiled into different applications, and the FLASH space is limited, which will cause the existing communication module based on the OPENCPU solution to only run a single application and cannot realize the switching of different applications. Summary of the invention

[0003] The present invention provides an application switching method, a computer device and a computer-readable storage medium. The communication module adopts the application switching method to achieve switching of different applications without increasing FLASH space, so that the communication module can support different services and improve the user experience.

[0004] In order to achieve the above-mentioned object, in a first aspect, the present invention provides an application switching method based on a real-time operating system, which is applied to a communication module running a first application, and the application switching method includes:

[0005] When starting the first application, recording characteristic information of the first application, the characteristic information including resource information allocated to the first application and task information corresponding to the first application;

[0006] When an instruction to switch to the second application is obtained, calling an exit interface of the first application, the exit interface stopping the task created by the first application and releasing the resources allocated to the first application according to the characteristic information;

[0007] Acquire the second application, and overwrite the target FLASH area where the first application is located with the second application; and

[0008] Call the entry function of the second application to start the second application.

[0009] In one embodiment, the communication module is connected to a host computer, and the host computer downloads the second application via a network download method, and obtaining the second application includes:

[0010] When the communication module obtains the instruction to switch the second application, the communication module generates a first feedback signal and sends the first feedback signal to the host computer. After obtaining the first feedback signal, the host computer sends the second application to the communication module.

[0011] In one embodiment, the host computer sends the second application to the communication module through an AT command.

[0012] In one embodiment, obtaining the second application includes:

[0013] When the communication module obtains the instruction to switch the second application, the communication module downloads the second application through network downloading.

[0014] In one embodiment, the communication module is connected to a host computer, and the host computer downloads the first application through a network download method. Before starting the first application, the application switching method further includes:

[0015] When an instruction to start the first application is obtained, a second feedback signal is generated and sent to the host computer. After obtaining the second feedback signal, the host computer sends the first application to the communication module, so that the communication module obtains the first application.

[0016] In one embodiment, the host computer sends the first application to the communication module through an AT command.

[0017] In one embodiment, before starting the first application, the application switching method further includes:

[0018] Downloading the first application through a network download method, so that the communication module obtains the first application;

[0019] Alternatively, the first application is pre-burned into the target FLASH area so that the communication module obtains the first application.

[0020] In one embodiment, the communication module is in OPENCPU development mode.

[0021] In a second aspect, the present invention provides a computer device, comprising:

[0022] a memory storing a computer program;

[0023] A processor is connected to the memory, and when the processor executes the computer program, the application switching method described in any of the above embodiments is implemented.

[0024] In a third aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the control method of the electronic device as described in any of the above embodiments.

[0025] In the application switching method, computer device and computer-readable storage medium provided by the present invention, the application switching method records the characteristic information corresponding to the startup of the first application, and calls the exit interface of the first application when the instruction to switch to the second application is obtained, so that the exit interface stops the task created by the first application according to the characteristic information and releases the resources allocated to the first application, so that the communication module can free up the corresponding FLASH space and module resources for starting the second application. In this way, after acquiring the second application, the second application can cover the target FLASH area where the first application is located, and no additional FLASH space is required. When the entry function of the second application is called, the second application can be started to realize the switching between the first application and the second application. In other words, the communication module adopts the application switching method of the present invention, which can realize the switching of different applications without increasing the FLASH space, so that the communication module can support different services and improve the user experience.

[0026] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for use in the implementation mode will be briefly introduced below. Obviously, the drawings described below are some implementation modes of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 The present invention provides a flowchart of a method for switching applications based on a real-time operating system. DETAILED DESCRIPTION

[0029] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0030] It should be noted that in the description of the present invention, the terms "first", "second", "third", etc. are used to distinguish different objects rather than to describe a specific order, and therefore cannot be understood as a limitation on the present application. In addition, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through other elements, or the internal connection of two elements; it can be a communication connection or an electrical connection, wherein both communication connection and electrical connection also include direct connection or indirect connection through other elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances.

[0031] See below Figure 1 , Figure 1 A flowchart of an application switching method based on a real-time operating system provided in an embodiment of the present invention. The application switching method is applied to a communication module running a first application, wherein the communication module can be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, and a NB-IOT communication module.

[0032] like Figure 1 As shown, in an embodiment of the present invention, the specific steps of the application switching method may include:

[0033] Step S1, when starting the first application, record the characteristic information of the first application, the characteristic information includes resource information allocated to the first application and task information corresponding to the first application. Similar to when the existing communication module starts an application, the resource information allocated to the first application includes RAM storage space, semaphore, timer, etc., which will not be described in detail.

[0034] Step S2: when an instruction to switch to the second application is obtained, the exit interface of the first application is called, and the exit interface stops the task created by the first application and releases the resources allocated to the first application according to the characteristic information.

[0035] It is not difficult to understand that the exit interface of the first application is actually a string of codes, and the exit interfaces corresponding to applications for implementing different businesses are different codes, and the specific content of the application's exit interface is existing technology, so it will not be repeated.

[0036] Step S3, obtaining the second application, and overwriting the target FLASH area where the first application is located with the second application. In the embodiment of the present invention, the communication module can obtain the second application in multiple ways, and the second application is different from the first application and is used to implement different terminal services.

[0037] Step S4, calling the entry function of the second application to start the second application. Similar to the exit interface of the first application, the entry function of the second application is actually a string of code (different from the exit interface). Similarly, the entry functions corresponding to applications for implementing different services are different codes. The specific content of the entry function of the application is the prior art, so it will not be described in detail.

[0038] In combination with the above steps S1 to S4, the application switching method provided in the embodiment of the present invention records the characteristic information corresponding to the startup of the first application, and calls the exit interface of the first application when the instruction to switch to the second application is obtained, so that the exit interface stops the task created by the first application according to the characteristic information and releases the resources allocated to the first application. This can enable the communication module to free up the corresponding FLASH space and module resources for starting the second application. In this way, after acquiring the second application, the second application can cover the target FLASH area where the first application is located, without the need for additional FLASH space. When the entry function of the second application is called, the second application can be started to realize the switching between the first application and the second application. In other words, the communication module adopts the application switching method of the present invention to realize the switching of different applications without increasing the FLASH space, so that the communication module can support different services and improve the user experience.

[0039] Preferably, in an embodiment of the present invention, the communication module is an OPENCPU development mode, so that the communication module can serve as a data transmission module to receive and send communication data, and can also serve as an MCU to process data. In this way, the user can remotely edit the application of the communication module, thereby changing the business type corresponding to the application and expanding the scope of business that the communication module can realize. The overall operation is fast, convenient and low-cost.

[0040] Optionally, in some embodiments of the present invention, the communication module may be connected to a host computer, and the host computer has downloaded the second application in advance through a network download method (not limited to FTP method, 5G network download method), and the acquisition of the second application in step S3 includes: when the communication module obtains the instruction to switch the second application, the communication module generates a first feedback signal and sends the first feedback signal to the host computer, and the host computer sends the second application to the communication module after obtaining the first feedback signal. Among them, the first feedback signal can be but is not limited to a voltage signal, a current signal, etc. Preferably, in one embodiment, the host computer sends the second application to the communication module through an AT command, which can greatly simplify the hardware design and software development costs of the module product.

[0041] Also optionally, in some other embodiments of the present invention, the acquisition of the second application in step S3 includes: when the communication module acquires the instruction to switch the second application, the communication module downloads the second application via a network download method (not limited to an FTP method or a 5G network download method). That is, in this embodiment, the communication module can directly download the second application via a network download method, thereby eliminating the need to connect to the host computer.

[0042] It is not difficult to understand that in the embodiments of the present invention, no matter whether the communication module obtains the second application from the host computer that has pre-downloaded the second application, or directly downloads the second application, it is not necessary to pre-burn the second application in its own FLASH space, which can reduce the occupancy of the FLASH space.

[0043] In an embodiment of the present invention, before starting the first application, the communication module also needs to obtain the first application first. Similar to the second application, the first application can also be obtained in different ways. Specifically, in some embodiments of the present invention, when the communication module is connected to the aforementioned host computer, the host computer downloads the first application through network download, and before starting the first application, the application switching method also includes: when the instruction to start the first application is obtained, a second feedback signal is generated and the second feedback signal is sent to the host computer, and the host computer sends the first application to the communication module after obtaining the second feedback signal, so that the communication module obtains the first application. Preferably, in one embodiment, the host computer sends the first application to the communication module through an AT instruction, which can also greatly simplify the hardware design and software development costs of the module product. Among them, the second feedback signal can also be, but not limited to, a voltage signal, a current signal, etc.

[0044] Also optionally, in some other embodiments of the present invention, before starting the first application, the application switching method further includes: downloading the first application via network download so that the communication module obtains the first application.

[0045] In an embodiment of the present invention, no matter whether the communication module obtains the first application from the host computer that has pre-downloaded the first application, or directly downloads the first application, it is not necessary to pre-burn the first application in its own FLASH space (i.e., the target FLASH area), which can also reduce the occupancy of the FLASH space.

[0046] Different from the second application, in some other embodiments of the present invention, before starting the first application, the application switching method further includes: pre-burning the first application to the target FLASH area so that the communication module obtains the first application. In other words, the first application can also be directly pre-burned to the target FLASH area corresponding to the first application.

[0047] In summary, in the embodiments of the present invention, the first application and the second application can have different acquisition methods, which improves the applicability flexibility of the application switching method.

[0048] Furthermore, an embodiment of the present invention provides a computer device, including a memory and a processor, and the memory stores a computer program, and when the processor executes the computer program, the corresponding steps of the application switching method described in any of the above embodiments are implemented. For more details, please refer to the aforementioned related content, which will not be repeated here.

[0049] Furthermore, an embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the corresponding steps of the control method of the electronic device described in any of the above embodiments are implemented. For more details, please refer to the aforementioned related content and will not be repeated here.

[0050] It will be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through the computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.

[0051] It should be noted that any reference to memory, storage, database or other media used in the embodiments of the present invention includes non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory, and random access memory (RAM) is available in various forms, including but not limited to static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0052] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0053] In the description of this specification, the description with reference to the terms "embodiment", "specific embodiment", "example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0054] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A method for application switching based on a real-time operating system, characterized in that: Applied to a communication module running a first application, the application switching method includes: When starting the first application, recording characteristic information of the first application, the characteristic information including resource information allocated to the first application and task information corresponding to the first application; When an instruction to switch to the second application is obtained, calling an exit interface of the first application, the exit interface stopping the task created by the first application and releasing the resources allocated to the first application according to the characteristic information; Acquire the second application, and overwrite the target FLASH area where the first application is located with the second application; and Call the entry function of the second application to start the second application.

2. The application switching method according to claim 1, characterized in that: The communication module is connected to a host computer, and the host computer downloads the second application through a network download method. The obtaining of the second application includes: When the communication module obtains the instruction to switch the second application, the communication module generates a first feedback signal and sends the first feedback signal to the host computer. After obtaining the first feedback signal, the host computer sends the second application to the communication module.

3. The application switching method according to claim 2, characterized in that: The host computer sends the second application to the communication module through an AT command.

4. The application switching method according to claim 1, wherein: The obtaining the second application comprises: When the communication module obtains the instruction to switch the second application, the communication module downloads the second application through network downloading.

5. The application switching method according to any one of claims 1 to 4, characterized in that: The communication module is connected to a host computer, and the host computer downloads the first application through a network download method. Before starting the first application, the application switching method further includes: When an instruction to start the first application is obtained, a second feedback signal is generated and sent to the host computer. After obtaining the second feedback signal, the host computer sends the first application to the communication module, so that the communication module obtains the first application.

6. The application switching method according to claim 5, characterized in that: The host computer sends the first application to the communication module through an AT command.

7. The application switching method according to any one of claims 1 to 4, characterized in that: Before starting the first application, the application switching method further includes: Downloading the first application through a network download method, so that the communication module obtains the first application; Alternatively, the first application is pre-burned into the target FLASH area so that the communication module obtains the first application.

8. The application switching method according to claim 1, characterized in that: The communication module is in OPENCPU development mode.

9. A computer device, characterized in that: include: a memory storing a computer program; A processor is connected to the memory, and when the processor executes the computer program, the application switching method according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the application switching method according to any one of claims 1 to 8 is implemented.