Method and device for controlling application program process and electronic equipment

By using space map table to parse access storage commands in embedded systems, determine the target storage address and perform operations, the problems of low debugging efficiency in the prior art and inability to cover all scenarios are solved, and more efficient application debugging and testing are achieved Coverage.

CN119473862APending Publication Date: 2025-02-18BEIJING TONGFANG MICROELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411610558.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art cannot cover all scenarios of applications, and the debugging efficiency is low, especially for applications that do not support online simulation debugging.

Method used

By introducing a spatial mapping table into the embedded system, the access storage commands sent by external devices are parsed, the target storage address is determined, and the operation to be accessed, including reading and writing data operations. This method allows access and modification to the internal storage area of ​​the application to control the application flow.

Benefits of technology

It improves the application's test coverage and debugging efficiency, and can test application functions in various scenarios, locate problems and debug them.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473862A_ABST
    Figure CN119473862A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of embedded systems, and discloses a method and device for controlling an application program flow and electronic device.The method comprises the steps that under the condition that an access storage command sent by external equipment is received, the access storage command is analyzed, and a to-be-accessed storage area and to-be-accessed operation are obtained; wherein the to-be-accessed storage area comprises a to-be-accessed storage name or a to-be-accessed storage address; based on the space mapping table, determining a target storage address according to the to-be-accessed storage name or the to-be-accessed storage address; wherein the space mapping table is used for storing names, addresses and access permissions of internal storage areas of the application programs; executing a to-be-accessed operation on the target storage address; and under the condition that the to-be-accessed operation is the write storage operation, modifying a storage value of the target storage address, and executing a corresponding application program control flow according to the modified storage value. The test of application program functions in various scenes is realized, and the test coverage rate and the debugging efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of embedded systems, for example, to a method and device for controlling application program flow, and an electronic device. Background Art

[0002] At present, embedded systems can use online simulation debugging, which uses a specific compiler and monitoring program to simulate and debug the application of the embedded system in combination with embedded hardware, so that the embedded system can execute the program in different operating modes such as single step and breakpoint, thereby helping developers locate and solve problems. In actual applications, some application software does not support online simulation debugging. Therefore, debugging of applications that do not support online simulation debugging is an urgent problem that needs to be solved.

[0003] In the related art, a method for debugging an application is disclosed, in which an external command is set for a variable in the application that needs to be accessed, and the corresponding variable in the application is accessed through the external command.

[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:

[0005] Although the related technology can access the variables in the application and debug them, it cannot cover all scenarios of the application and the debugging efficiency is low.

[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0008] The embodiments of the present disclosure provide a method and device, and an electronic device for controlling an application program flow, thereby improving the test coverage and debugging efficiency of the application program.

[0009] In some embodiments, a method for controlling an application process includes: upon receiving a storage access command sent by an external device, parsing the storage access command to obtain a storage area to be accessed and an operation to be accessed; wherein the storage area to be accessed includes a storage name to be accessed or a storage address to be accessed; based on a space mapping table, determining a target storage address according to the storage name to be accessed or the storage address to be accessed; wherein the space mapping table is used to store the name, address, size and access rights of the internal storage area of ​​the application; performing the operation to be accessed on the target storage address; when the operation to be accessed is a write storage operation, modifying the storage value of the target storage address, and executing the corresponding application control process according to the modified storage value.

[0010] Optionally, based on the space mapping table, according to the storage name to be accessed or the storage address to be accessed, the target storage address is determined, including: matching the storage name to be accessed or the storage address to be accessed with the space mapping table to determine the target storage address; and verifying the target storage address.

[0011] Optionally, the storage name to be accessed or the storage address to be accessed is matched with the space mapping table to determine the target storage address, including: when the storage name to be accessed successfully matches the name of the application's internal storage area in the space mapping table, determining the address corresponding to the successfully matched name in the space mapping table as the target storage address; or, when the storage address to be accessed successfully matches the address of the application's internal storage area in the space mapping table, determining the successfully matched address in the space mapping table as the target storage address.

[0012] Optionally, the storage access command also includes an access start address and an access length; the target storage address is verified, including: determining the access address segment based on the access start address and the access length; judging whether the access address segment is within the address range of the target storage address, if so, the address legitimacy check passes; judging whether the access address segment satisfies the access permissions in the space mapping table, if so, the permission check passes.

[0013] Optionally, verifying the target storage address further includes: obtaining a security authentication message of a storage access command; and verifying the security authentication message.

[0014] Optionally, the access operation includes a read data operation and a write data operation, and performing the access operation on the target storage address includes: reading the storage data of the target storage address, or writing the data to be written to the target storage address; after the access operation is completed, returning a success response.

[0015] Optionally, the corresponding application control process is executed according to the modified storage value, including one or more of the following: when the modified storage value is a message queue, signal, mailbox or event in a multi-tasking system, the scheduling task is suspended or resumed; when the modified storage value is a human-machine interface storage, a predetermined human-machine interface is displayed; when the modified storage value is a variable controlled by a loop, the number of executions of the loop is controlled or the loop is exited; when the modified storage value is a function pointer, the expected specified function function is called to run and enter a predetermined application branch; when the modified storage value is a register configuration value, the interface function register configuration value is modified.

[0016] Optionally, the method for controlling the application flow further includes: tracking the application execution process after executing the application control flow; and locating the problem of the application according to the tracking result of the application execution process.

[0017] In some embodiments, the apparatus for controlling an application flow includes a processor and a memory storing program instructions, and the processor is configured to execute the above-mentioned method for controlling an application flow when running the program instructions.

[0018] In some embodiments, the electronic device includes: an electronic device body; and the device for controlling application program flow as described above, which is installed in the electronic device body.

[0019] The method, device, and electronic device for controlling application program flow provided by the embodiments of the present disclosure can achieve the following technical effects:

[0020] In the embodiment of the present disclosure, the target storage address corresponding to the storage area to be accessed in the storage access command can be found according to the space mapping table, and the access to the internal storage of the application can be achieved by executing the operation to be accessed on the target storage address. Compared with the related art that cannot cover all scenarios of the application, in the embodiment of the present disclosure, the space mapping table is used to store the name and address of the internal storage area of ​​the application. Therefore, when the operation to be accessed is a write data operation, the storage value of the target storage address is modified, and the corresponding application control process is executed according to the modified storage value, so that the debugger can locate the problem of the application according to the execution process and the expected process, and debug the application, so that the application functions in various scenarios can be tested, the test coverage is improved, and the debugging efficiency is improved.

[0021] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:

[0023] Figure 1 is a schematic diagram of a method for controlling an application program flow provided by an embodiment of the present disclosure;

[0024] Figure 2 is a schematic diagram of another method for controlling an application process provided by an embodiment of the present disclosure;

[0025] Figure 3 is a schematic diagram of another method for controlling an application process provided by an embodiment of the present disclosure;

[0026] Figure 4 is a schematic diagram of a specific application of a method for controlling an application program flow provided by an embodiment of the present disclosure;

[0027] Figure 5 is a schematic diagram of a specific application of another method for controlling an application program flow provided by an embodiment of the present disclosure;

[0028] Figure 6 It is a schematic diagram of a device for controlling an application process provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0030] The terms "first", "second", etc. in the technical solutions described in this application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the disclosed embodiments described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0031] Unless otherwise stated, the term "plurality" means two or more.

[0032] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0033] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0034] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.

[0035] Combination Figure 1 As shown, the embodiment of the present disclosure provides a method for controlling an application process, the execution subject of the method may be a processor, and the method includes:

[0036] S001, when receiving a storage access command sent by an external device, the processor parses the storage access command to obtain a storage area to be accessed and an operation to be accessed; wherein the storage area to be accessed includes a storage name to be accessed or a storage address to be accessed.

[0037] S002, the processor determines a target storage address based on a space mapping table and according to a storage name to be accessed or a storage address to be accessed; wherein the space mapping table is used to store the name, address and access permission of the storage area inside the application.

[0038] S003, the processor performs a pending access operation on the target storage address.

[0039] S004, when the access operation is a write storage operation, the processor modifies the storage value of the target storage address and executes the corresponding application control flow according to the modified storage value.

[0040] In the disclosed embodiment, the target storage address corresponding to the storage area to be accessed in the storage access command can be found according to the space mapping table, and the access to the internal storage of the application can be achieved by executing the operation to be accessed on the target storage address. The space mapping table is used to store the name and address of the internal storage area of ​​the application. Therefore, when the operation to be accessed is a write data operation, the storage value of the target storage address is modified, and the corresponding application control process is executed according to the modified storage value, so that the debugger can locate the problem of the application according to the execution process and the expected process, and debug the application, so that the application functions in various scenarios can be tested, the test coverage is improved, and the debugging efficiency is improved.

[0041] Optionally, the storage access command includes storage characteristics, access rights, access rules, access start address, access length, and other commonly agreed parameters.

[0042] The access storage command is a request sent by an external device or system to an application, including multiple key parameters. Among them, the characteristics of the storage include the type, name or identifier of the storage, and the type of data stored, which helps the application identify and locate a specific storage area. Access rights define the access level of the external entity executing the command to the specified storage area, such as read-only, write-only, or read-write. Access rights ensure the security of the data and prevent unauthorized modification or access. Access rules define the conditions or constraints that must be followed when accessing storage. For example, it may be stipulated that certain data can only be accessed within a specific time window, or that access must follow a specific order or pattern. The access start address specifies the starting position of the data block to be accessed, which is usually used for low-level programming or direct memory access, where data is stored at a specific memory address. The access length specifies the size or length of the data block to be accessed, which can be the number of bytes, bits, or other units, depending on the type of data stored and the architecture of the system. Other commonly agreed parameters include cryptographic signatures, timestamps, session identifiers, etc. used to verify the validity of commands. These parameters help ensure the integrity of commands and the reliability of their sources to prevent tampering and replay attacks.

[0043] Combination Figure 2 As shown, the embodiment of the present disclosure provides another method for controlling an application process, including:

[0044] S101: The processor obtains a storage access command sent by an external device.

[0045] S102, the processor determines whether the access storage command is an access internal storage command, if so, executes S103, if not, executes S112.

[0046] S103: The processor parses the storage access command to obtain the storage area to be accessed and the operation to be accessed.

[0047] S104, the processor determines whether the storage area to be accessed matches the storage name to be accessed, and if so, executes S105, otherwise executes S113.

[0048] S105: The processor determines a target storage address based on the space mapping table and the storage name to be accessed.

[0049] S106, the processor determines whether the address legitimacy check of the target storage address has passed, if the check has passed, execute S107, if not, execute S115.

[0050] S107, the processor determines whether the permission check of the target storage address passes, if the check passes, executes S108, if not, executes S115.

[0051] S108: The processor performs a pending access operation on the target storage address.

[0052] S109: After the access operation is completed, the processor returns a success response.

[0053] S110, when the access operation is a write storage operation, the processor modifies the storage value of the target storage address and executes the corresponding application control flow according to the modified storage value.

[0054] S111, the processor ends the external access operation of the application.

[0055] S112: The processor executes other processes corresponding to the access storage command.

[0056] S113, the processor determines whether the storage area to be accessed matches the storage address to be accessed, and if so, executes S114, and if not, executes S115.

[0057] S114, the processor determines the target storage address based on the space mapping table and the storage address to be accessed, and executes S106.

[0058] S115, the processor determines that the internal access to the storage fails, and returns a failure response.

[0059] Optionally, based on the space mapping table, according to the storage name to be accessed or the storage address to be accessed, the target storage address is determined, including: matching the storage name to be accessed or the storage address to be accessed with the space mapping table to determine the target storage address; and verifying the target storage address.

[0060] In this embodiment, the space mapping table is stored inside the application, and multiple memory storage attributes are stored. The memory storage attributes include storage name, storage space, storage type and access rights. Memory storage includes variables, structures, single members of structures, memory block storage, data members, member functions or variable pointers. Memory storage can occupy one byte or more bytes of space. The access rights of memory storage are divided into read-only, write-only, read-write or no access allowed. Read-write permissions satisfy the permissions of separate read and write at the same time. The read-write permissions in the access rights can be closed or opened according to the product stage. Read-write permissions are set in the development and debugging stage of the application. When the application is released, some memory access rights need to be closed for the safety or reliability of the application. The access mode of memory storage is divided into byte alignment (8 bits), half-word alignment (16 bits) or word alignment (32 bits), and it is necessary to access according to the specified alignment mode. The name, address and access rights of all storage areas inside the application are stored in the space mapping table, and the name of the storage area is unique under the premise of pre-agreement with external visitors. Therefore, when a storage access command is received, the storage name to be accessed or the storage address to be accessed in the storage access command can be matched with the space mapping table, so as to determine the target storage address in the space mapping table.

[0061] Optionally, the storage name to be accessed or the storage address to be accessed is matched with the space mapping table to determine the target storage address, including: when the storage name to be accessed successfully matches the name of the application's internal storage area in the space mapping table, determining the address corresponding to the successfully matched name in the space mapping table as the target storage address; or, when the storage address to be accessed successfully matches the address of the application's internal storage area in the space mapping table, determining the successfully matched address in the space mapping table as the target storage address.

[0062] In this embodiment, it can be determined whether the parameter of the access storage command is matched according to the storage name to be accessed or the storage address to be accessed. If the matching is performed according to the storage name to be accessed, it is necessary to first determine the name of the storage area with the same storage name as the storage name to be accessed in the space mapping table, and then determine the address corresponding to the name as the target storage address. If the matching is performed according to the storage address to be accessed, the address of the storage area with the same storage address to be accessed is directly determined in the space mapping table as the target storage address.

[0063] Optionally, the storage access command also includes an access start address and an access length; the target storage address is verified, including: determining the access address segment based on the access start address and the access length; judging whether the access address segment is within the address range of the target storage address, if so, the address legitimacy check passes; judging whether the access address segment satisfies the access permissions in the space mapping table, if so, the permission check passes.

[0064] In this embodiment, after determining the target storage area, the target storage area needs to be verified. According to the access start address and access length in the access storage command, the access address segment corresponding to the access storage command can be determined, and then the access address segment is verified for legitimacy and permission to ensure that the space to be accessed is within the address range of the target storage address and meets the access permission to prevent cross-border access.

[0065] Optionally, verifying the target storage address further includes: obtaining a security authentication message of a storage access command; and verifying the security authentication message.

[0066] In this embodiment, the access permission can also increase the verification access, and determine that the access storage command has been security authenticated by both parties through the security authentication message in the access storage command. In addition, the access storage command can be encrypted for transmission, and the access storage command is encrypted with the encryption key agreed upon by the handshake between the two parties before being transmitted. The receiving party decrypts the access storage command according to the predetermined key before using it.

[0067] Optionally, the access operation includes a read data operation and a write data operation, and performing the access operation on the target storage address includes: reading the storage data of the target storage address, or writing the data to be written to the target storage address; after the access operation is completed, returning a success response.

[0068] In this embodiment, a corresponding data read operation or data write operation is performed according to the operation to be accessed, and after the operation to be accessed is completed, a success response is returned to continue to execute subsequent steps.

[0069] Optionally, the corresponding application control process is executed according to the modified storage value, including one or more of the following: when the modified storage value is a message queue, signal, mailbox or event in a multi-tasking system, the scheduling task is suspended or resumed; when the modified storage value is a human-machine interface storage, a predetermined human-machine interface is displayed; when the modified storage value is a variable controlled by a loop, the number of executions of the loop is controlled or the loop is exited; when the modified storage value is a function pointer, the expected specified function function is called to run and enter a predetermined application branch; when the modified storage value is a register configuration value, the interface function register configuration value is modified.

[0070] In this embodiment, for a multi-task system, taking a message queue as an example, a message queue can be sent to another task in one task, for example, another task is scheduled to run. After another task receives the message, the operating system performs task scheduling, runs the task waiting for the message queue, and suspends the current task. For signal events in a multi-task system, the operating system is triggered to perform task scheduling, runs the task waiting for the signal, and suspends the current task. For events in a multi-task system, taking the tick clock of the system as an example, the operating system is triggered to perform task scheduling, and runs tasks with high priority or timer arrival. In addition, in the case where the modified storage value is stored in the human-machine interface, a preset sound and light prompt can be executed to display a predetermined human-machine interface. In the case where the modified storage value is a variable controlled by a certain loop, the number of loop executions can be controlled or the loop can be exited. In the case where the modified storage value is a function pointer, the function function specified by the expected operation can be called to enter the predetermined application branch. In the case where the modified storage value is a register configuration value, the interface function register configuration value is modified, such as the baud rate configuration register in the asynchronous serial port peripheral function register, and the baud rate configuration register is modified to modify the baud rate of the communication interface.

[0071] Optionally, the method for controlling the application process also includes: after executing the application control process, tracking the application execution process; locating the problem of the application according to the tracking result of the application execution process, and debugging the application.

[0072] Combination Figure 3 As shown, the embodiment of the present disclosure provides another method for controlling an application process, including:

[0073] S201, when receiving a storage access command sent by an external device, the processor parses the storage access command to obtain a storage area to be accessed and an operation to be accessed; wherein the storage area to be accessed includes a storage name to be accessed or a storage address to be accessed.

[0074] S202, the processor determines a target storage address based on a space mapping table and according to a storage name to be accessed or a storage address to be accessed; wherein the space mapping table is used to store the name, address and access permission of the internal storage area of ​​the application.

[0075] S203: The processor performs a pending access operation on the target storage address.

[0076] S204: When the operation to be accessed is a write storage operation, the processor modifies the storage value of the target storage address and executes the corresponding application control flow according to the modified storage value.

[0077] S205, after executing the application control flow, the processor tracks the application execution process.

[0078] S206: The processor locates the problem of the application program according to the tracking result of the application program execution process, and debugs the application program.

[0079] In this embodiment, when tracking, debugging or testing an application, the execution process of the application can be tracked by externally modifying the commands stored inside the application, thereby determining whether its execution process is consistent with expectations, and then quickly locating the problem of the application, and debugging the application, thereby improving testing efficiency.

[0080] The method for controlling the application process provided by the embodiment of the present disclosure is further described below with two specific embodiments.

[0081] In an optional embodiment, the internal storage of the application is accessed externally to realize the control screen display "welcome". The space mapping table in the application contains the "dispbuf" storage area name, the storage address is 0x2001_0000, the address space is 0x1000, and has read and write permissions. Figure 4 As shown, the implementation steps of this embodiment include:

[0082] S301: The processor receives a storage access command, where the storage access command includes the following parameters: “n”+“dispbuf”+“welcome”.

[0083] S302: The processor determines that the storage access command is an internal storage access command.

[0084] S303: The processor parses the storage access command and obtains parameter information of the storage access command.

[0085] S304, the processor determines, according to the parameter "n", whether the access storage command matches the storage name to be accessed.

[0086] S305: The processor successfully matches the parameter “dispbuf” with the storage area name “dispbuf” in the space mapping table.

[0087] S306: The processor determines the storage address 0x2001_0000 corresponding to the storage area name “dispbuf” in the space mapping table.

[0088] S307, the processor determines that the address validity check has passed based on the 8-byte length of the parameter "welcome" and the address space 0x1000 of "dispbuf".

[0089] S308: The processor determines whether the permission check has passed based on the read and write permissions of "dispbuf".

[0090] S309, the processor executes a write data access operation and writes "welcome" to 0x2001_0000 to 0x2001_1007.

[0091] S310: The processor returns a response indicating that the storage access is successful.

[0092] S311, the processor controls the application to refresh the display periodically according to the modified storage value, and displays "welcome" on the screen.

[0093] S312: The processor ends the external access operation of the application program.

[0094] In another optional embodiment, the internal storage of the application is accessed externally to implement the function call "usb_main", and the function pointer of "run_main" is assigned to the address of "usb_main". The pointer address of "run_main" is 0x2400_0080, the address space is 0x0004, and it has read and write permissions, while the value of "usb_main" is the entry address 0x001A4C4 for executing the USB test program. Figure 5 As shown, the implementation steps of this embodiment include:

[0095] S401, the processor receives a storage access command, the storage access command includes the following parameters: "A" + "0x2400_0080" + "0x001A4C4".

[0096] S402: The processor determines that the storage access command is an internal storage access command.

[0097] S403: The processor parses the storage access command and obtains parameter information of the storage access command.

[0098] S404: The processor determines, based on the parameter “A”, that the storage access command does not match the storage name to be accessed.

[0099] S405, the processor determines, based on the parameter "A", whether the access storage command matches the storage address to be accessed.

[0100] S406: The processor determines the storage address 0x2400_0080 corresponding to the parameter “0x2400_0080” in the space mapping table.

[0101] S407, the processor determines that the address validity check has passed based on the pointer address 0x2400_0080 of "run_main" and the address space 0x0004.

[0102] S408: The processor determines whether the permission check has passed based on the read and write permissions of "run_main".

[0103] S409, the processor executes a write data access operation and writes "0x001A4C4" to the address "0x2400_0080".

[0104] S410: The processor returns a response indicating that the storage access is successful.

[0105] S411, the processor controls the application to call usb_main according to the modified storage value.

[0106] S412: The processor ends the external access operation of the application program.

[0107] Combination Figure 6 As shown, the embodiment of the present disclosure provides a device 300 for controlling an application flow, including a processor 500 and a memory 501. Optionally, the device may also include a communication interface 502 and a bus 503. The processor 500, the communication interface 502, and the memory 501 may communicate with each other through the bus 503. The communication interface 502 may be used for information transmission. The processor 500 may call the logic instructions in the memory 101 to execute the method for controlling the application flow of the above embodiment.

[0108] In addition, the logic instructions in the memory 501 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0109] The memory 501 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 500 executes functional applications and data processing by running the program instructions / modules stored in the memory 501, that is, implements the method for controlling the application process in the above-mentioned embodiment.

[0110] The memory 501 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 501 may include a high-speed random access memory and may also include a non-volatile memory.

[0111] The embodiments of the present disclosure provide an electronic device, comprising: an electronic device body, and the above-mentioned device for controlling the application flow. The device for controlling the application flow is installed in the electronic device body. The installation relationship described here is not limited to placement inside the electronic device, but also includes installation connections with other components of the electronic device, including but not limited to physical connections, electrical connections or signal transmission connections, etc. Those skilled in the art can understand that the device for controlling the application flow can be adapted to a feasible electronic device body, thereby realizing other feasible embodiments.

[0112] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above method for controlling an application program flow.

[0113] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0114] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the technical solutions recorded in this application. As used in the technical solutions recorded in this application, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0115] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0116] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0117] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for controlling an application process, characterized in that include: When receiving a storage access command sent by an external device, parsing the storage access command to obtain a storage area to be accessed and an operation to be accessed; wherein the storage area to be accessed includes a storage name to be accessed or a storage address to be accessed; Based on the space mapping table, the target storage address is determined according to the storage name to be accessed or the storage address to be accessed; wherein the space mapping table is used to store the name, address and access permission of the storage area inside the application; Execute the access operation to the target storage address; In the case where the operation to be accessed is a write storage operation, the storage value of the target storage address is modified, and the corresponding application control flow is executed according to the modified storage value.

2. The method according to claim 1, characterized in that: Based on the space mapping table, according to the storage name to be accessed or the storage address to be accessed, the target storage address is determined, including: Matching the storage name to be accessed or the storage address to be accessed with the space mapping table to determine the target storage address; Verify the target storage address.

3. The method according to claim 2, characterized in that Match the storage name or storage address to be accessed with the space mapping table to determine the target storage address, including: In the case where the storage name to be accessed successfully matches the name of the internal storage area of ​​the application in the space mapping table, determining the address corresponding to the successfully matched name in the space mapping table as the target storage address; or, When the storage address to be accessed successfully matches the address of the application internal storage area in the space mapping table, the successfully matched address in the space mapping table is determined as the target storage address.

4. The method according to claim 2, characterized in that: The access storage command also includes an access start address and an access length; Verify the target storage address, including: Determine the access address segment according to the access start address and access length; Determine whether the access address segment is within the address range of the target storage address. If so, the address legitimacy check passes; Determine whether the access address segment satisfies the access permissions in the space mapping table. If so, the permission check passes.

5. The method according to claim 4, characterized in that Verify the target storage address, also include: Get the security authentication message for accessing the storage command; Verify the security authentication message.

6. The method according to claim 1, characterized in that The pending access operations include read data operations and write data operations. The pending access operations are performed on the target storage address, including: According to the data read operation, the storage data of the target storage address is read; or, According to the data writing operation, the data to be written is written into the target storage address; After the access operation is completed, a successful response is returned.

7. The method according to claim 1, characterized in that Execute the corresponding application control process according to the modified storage value, including one or more of the following: In the case where the modified storage value is a message queue, signal, mailbox, or event in a multitasking system, the scheduling task is suspended or resumed; In case the modified storage value is stored in the human-machine interface, a predetermined human-machine interface is displayed; When the modified storage value is a loop control variable, control the number of loop executions or exit the loop; When the modified storage value is a function pointer, the expected specified function is called and executed to enter a predetermined application branch; In the case where the modified storage value is the register configuration value, the interface function register configuration value is modified.

8. The method according to any one of claims 1 to 7, characterized in that: Also includes: After executing the application control flow, track the application execution process; Based on the tracking results of the application execution process, locate the application problems and debug the application.

9. A device for controlling an application program flow, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the method for controlling an application flow according to any one of claims 1 to 8 when running the program instructions.

10. An electronic device, characterized in that: include: Electronic device body; The device for controlling application flow as described in claim 9 is installed in the electronic device body.