CN107665125B - Method and device for executing operation instruction - Google Patents
Method and device for executing operation instruction Download PDFInfo
- Publication number
- CN107665125B CN107665125B CN201610620973.4A CN201610620973A CN107665125B CN 107665125 B CN107665125 B CN 107665125B CN 201610620973 A CN201610620973 A CN 201610620973A CN 107665125 B CN107665125 B CN 107665125B
- Authority
- CN
- China
- Prior art keywords
- instruction
- page
- memory
- target
- switching
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/3004—Arrangements for executing specific machine instructions to perform operations on memory
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Stored Programmes (AREA)
Abstract
The disclosure relates to a method and a device for executing an operation instruction, and belongs to the technical field of information. The method comprises the following steps: storing a first instruction page in a memory to a memory space of a micro control unit; extracting an operation instruction to be executed from a first instruction page of a memory space; executing the extracted operation instruction; the memory is used for storing at least one instruction page, each instruction page comprises at least one operation instruction and a page switching instruction positioned after the at least one operation instruction, and the page switching instruction is used for indicating switching to any other instruction page. According to the method and the device, the operating instructions are stored in the memory in pages, one instruction page is stored in the memory space of the micro control unit every time, the occupation of excessive memory space can be avoided, the influence on the normal operation of the electronic equipment is avoided, the limitation of the memory space capacity is also avoided, a plurality of operating instructions can be stored in the memory, the condition that some operating instructions are discarded is avoided, and the normal operation of the operating instructions is ensured.
Description
Technical Field
The present disclosure relates to the field of information technology, and more particularly, to a method and apparatus for executing an operation instruction.
Background
The functions provided by the electronic device need to be implemented by executing corresponding operation instructions, and the performance of the electronic device is closely affected by the execution condition of the operation instructions.
Generally, when an electronic device receives an operation instruction to be executed, the operation instruction is stored in a memory space of a micro control unit, one operation instruction is extracted from the memory space of the micro control unit at a time, and the extracted operation instruction is executed. However, the number of the operation instructions is limited by the capacity of the memory space of the micro control unit, once the operation instructions are too much, the memory space is excessively occupied, which affects the normal operation of the electronic device, and even when the memory space is not enough to store the operation instructions, the electronic device discards the redundant operation instructions, so that the operation instructions cannot be executed.
Disclosure of Invention
In order to solve the problems in the related art, the present disclosure provides a method and an apparatus for executing an operation instruction. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method of executing an operation instruction, the method including:
storing a first instruction page in a memory to a memory space of a micro control unit;
extracting an operation instruction to be executed from the first instruction page of the memory space;
executing the extracted operation instruction;
the memory is used for storing at least one instruction page, each instruction page comprises at least one operation instruction and a page switching instruction located after the at least one operation instruction, and the page switching instruction is used for indicating switching to any other instruction page.
In one possible implementation, the method further includes:
after executing the operation instructions in the first instruction page, extracting the page switching instruction from the first instruction page;
extracting a target instruction page of the page switching instruction from the memory;
and deleting the first instruction page in the memory space, and storing the target instruction page to the memory space.
In another possible implementation manner, the method further includes:
when an operation instruction is received, adding the received operation instruction to the current last instruction page of the memory.
In another possible implementation manner, the method further includes:
when the number of the operation instructions in a second instruction page of the memory reaches a preset number, adding a page switching instruction after a plurality of operation instructions in the second instruction page;
and creating a new third instruction page, and setting a target instruction page of a page switching instruction of the second instruction page as the third instruction page.
In another possible implementation manner, the method further includes:
receiving a target change request for a page switching instruction of the second instruction page;
and changing a target instruction page of the page switching instruction of the second instruction page into the instruction page indicated by the target change request.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for executing an operation instruction, the apparatus including:
the storage module is used for storing a first instruction page in the storage to a memory space of the micro control unit;
the instruction extracting module is used for extracting an operation instruction to be executed from the first instruction page of the memory space;
the execution module is used for executing the extracted operation instruction;
the memory is used for storing at least one instruction page, each instruction page comprises at least one operation instruction and a page switching instruction located after the at least one operation instruction, and the page switching instruction is used for indicating switching to any other instruction page.
In one possible implementation, the apparatus further includes:
the instruction extracting module is used for extracting the page switching instruction from the first instruction page after the operation instruction in the first instruction page is executed;
an instruction page extracting module, configured to extract a target instruction page of the page switching instruction from the memory;
the storage module is configured to delete the first instruction page in the memory space, and store the target instruction page in the memory space.
In another possible implementation manner, the apparatus further includes:
and the adding module is used for adding the received operation instruction to the current last instruction page of the memory when the operation instruction is received.
In another possible implementation manner, the apparatus further includes:
the adding module is used for adding a page switching instruction after a plurality of operation instructions in a second instruction page of the memory when the number of the operation instructions in the second instruction page reaches a preset number;
a creating module for creating a new third instruction page;
and the setting module is used for setting a target instruction page of the page switching instruction of the second instruction page as the third instruction page.
In another possible implementation manner, the apparatus further includes:
a request receiving module, configured to receive a target change request for a page switching instruction of the second instruction page;
and the changing module is used for changing the target instruction page of the page switching instruction of the second instruction page into the instruction page indicated by the target changing request.
According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for executing an operation instruction, the apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
storing a first instruction page in the memory to a memory space of a micro control unit;
extracting an operation instruction to be executed from the first instruction page of the memory space;
executing the extracted operation instruction;
the memory is used for storing at least one instruction page, each instruction page comprises at least one operation instruction and a page switching instruction located after the at least one operation instruction, and the page switching instruction is used for indicating switching to any other instruction page.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the method and the apparatus provided in this embodiment, the first instruction page in the memory is stored in the memory space of the mcu, the operation instruction to be executed is extracted from the first instruction page in the memory space, and the extracted operation instruction is executed. By storing the operation instructions in the memory in pages, one instruction page is stored in the memory space every time, and the rest instruction pages are still stored in the memory, so that the phenomenon that the memory space of the micro control unit is too much occupied is avoided, the influence on the normal operation of the electronic equipment is avoided, the limitation of the capacity of the memory space is also eliminated, a plurality of operation instructions can be stored in the memory, the phenomenon that some operation instructions are discarded is avoided, and the normal operation of the operation instructions is ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method of executing an operational instruction in accordance with an exemplary embodiment;
FIG. 2-1 is a flow diagram illustrating a method of executing an operational instruction in accordance with an exemplary embodiment;
FIG. 2-2 is a schematic diagram illustrating an instruction page in accordance with an illustrative embodiment;
FIG. 3 is a block diagram illustrating an apparatus to execute operational instructions in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating an apparatus to execute operational instructions in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating an apparatus to execute operational instructions in accordance with an exemplary embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, the present disclosure is described in further detail below with reference to the embodiments and the accompanying drawings. The exemplary embodiments and descriptions of the present disclosure are provided herein for illustration of the present disclosure, but not for limitation of the present disclosure.
The embodiments of the present disclosure provide a method and an apparatus for executing an operation instruction, and the following describes the present disclosure in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method for executing an operation instruction according to an exemplary embodiment, where the method for executing the operation instruction is used in an electronic device, as shown in fig. 1, and includes the following steps:
in step 101, a first instruction page in the memory is stored in a memory space of the mcu.
In step 102, an operation instruction to be executed is fetched from the first instruction page of the memory space.
In step 103, the extracted operation instruction is executed.
The memory is used for storing at least one instruction page, each instruction page comprises at least one operation instruction and a page switching instruction positioned after the at least one operation instruction, and the page switching instruction is used for indicating switching to any other instruction page.
In the method provided in this embodiment, the first instruction page in the memory is stored in the memory space of the mcu, the operation instruction to be executed is extracted from the first instruction page in the memory space, and the extracted operation instruction is executed. By storing the operation instructions in the memory in pages, one instruction page is stored in the memory space every time, and the rest instruction pages are still stored in the memory, so that the phenomenon that the excessive memory space of the micro control unit is occupied is avoided, the influence on the normal operation of the electronic equipment is avoided, the limitation of the capacity of the memory space is also eliminated, a plurality of operation instructions can be stored in the memory, the phenomenon that some operation instructions are discarded is avoided, and the normal operation of the operation instructions is ensured.
In one possible implementation, the method further includes:
after executing the operation instruction in the first instruction page, extracting the page switching instruction from the first instruction page;
extracting a target instruction page of the page switching instruction from the memory;
deleting the first instruction page in the memory space, and storing the target instruction page to the memory space.
By adding the page switching instruction in the instruction page, the next instruction page can be continuously extracted after the operation instruction in the previous instruction page is executed, and the operation instruction in the next instruction page is executed, so that the continuous execution of the operation instructions of multiple pages is realized, and the normal execution of the operation instruction is ensured.
In another possible implementation manner, the method further includes:
when an operation instruction is received, the received operation instruction is added to the current last instruction page of the memory.
By adding the received operation instruction to the current last instruction page of the memory, the received operation instruction is continuously stored in the memory in a paging mode, each instruction page is conveniently and sequentially stored in the memory space, and the phenomenon that excessive memory space is occupied is avoided.
In another possible implementation manner, the method further includes:
when the number of the operation instructions in the second instruction page of the memory reaches a preset number, adding a page switching instruction after a plurality of operation instructions in the second instruction page;
and creating a new third instruction page, and setting the target instruction page of the page switching instruction of the second instruction page as the third instruction page.
The next instruction page is created when the number of the operation instructions in the instruction page reaches the preset number, and the page switching instruction points to the next instruction page, so that the number of the operation instructions in the instruction page is not more than the preset number, and the excessive memory space is avoided being occupied.
In another possible implementation manner, the method further includes:
receiving a target change request of a page switching instruction of the second instruction page;
and changing the target instruction page of the page switching instruction of the second instruction page into the instruction page indicated by the target change request.
By changing the target instruction page of the page switching instruction, the next instruction page of each instruction page can be flexibly changed, the control on the order of the instruction pages is realized, and the flexibility and the orderliness are improved.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 2-1 is a flow chart illustrating a method of executing an operation instruction according to an exemplary embodiment, where the method of executing an operation instruction is used in an electronic device, as shown in fig. 2-1, and includes the following steps:
in step 201, the electronic device stores a first instruction page in the memory to a memory space of the mcu.
In this embodiment, the electronic device may be a computer, a mobile phone, a personal computer, an electronic toy, and other types of devices, which is not limited in this embodiment.
The electronic device is configured with a memory, and the memory may be any module with a storage function, such as a Flash memory, except for the micro control unit, on the electronic device.
The memory is used for storing at least one instruction page, each instruction page comprises at least one operation instruction and a page switching instruction positioned after the at least one operation instruction, and the page switching instruction is used for indicating switching to any other instruction page. That is, a plurality of operation instructions are stored in a plurality of instruction pages, and switching from one instruction page to another instruction page is realized by a switch page instruction, and the order of the instruction pages in the memory is arranged in order according to the instruction of the switch page instruction.
Referring to fig. 2-2, N instruction pages in the memory may be as shown in fig. 2-2, each instruction page includes M operation instructions, and the last instruction of each instruction page is a page-switching instruction, which may point to another other instruction page.
The operation instruction may be a voice recognition instruction, an image processing instruction, an audio playing instruction, and other various types of instructions, and the operation instruction is not limited in this embodiment. Moreover, for different types of operation instructions, the different types of operation instructions may be stored together in an instruction page, and the electronic device executes the operation instructions according to the order of the operation instructions in the instruction page, or the different types of operation instructions are distinguished and stored in different instruction pages, so that the electronic device executes the different types of operation instructions separately.
In this embodiment, taking the first instruction page as the current first instruction page of the memory as an example, when the electronic device has executed all the operation instructions in the current memory space and needs to execute a new operation instruction, the current first instruction page, that is, the first instruction page, is extracted from the memory, and the extracted instruction page is stored in the memory space of the micro control unit. At this time, in order to save the space of the memory, the first instruction page may be deleted from the memory.
In step 202, the electronic device extracts an operation instruction to be executed from a first instruction page in the memory space, and executes the extracted operation instruction.
After the first instruction page is stored in the memory space, the electronic device extracts one operation instruction from the first instruction page in the memory space each time and executes the extracted operation instruction.
The first instruction page may include a plurality of operation instructions, and the operation instructions may be arranged in sequence, so that the electronic device extracts a first operation instruction that is not currently executed from the first instruction page of the memory space each time, and implements a corresponding function. And after the operation instruction is executed, executing the next operation instruction. The operation instructions in the first instruction page may be sorted in the order from morning to evening in the receiving time or sorted in the order from high to low in the priority, and the sorting manner is not limited in this embodiment.
In step 203, after the electronic device executes all the operation instructions of the first instruction page, the electronic device extracts a page switching instruction located after the operation instruction from the first instruction page, and determines a target instruction page of the page switching instruction.
The electronic device extracts the instructions from the first instruction page in sequence, and then extracts the page switching instruction located after the operation instruction when all the operation instructions of the first instruction page are extracted and executed and then extracts the instruction from the first instruction page again, and at this time, the electronic device determines a target instruction page of the page switching instruction, that is, an instruction page pointed by the page switching instruction.
In step 204, the electronic device extracts a target instruction page of the page switching instruction from the memory, deletes the first instruction page in the memory space, stores the target instruction page in the memory space, and continues to execute the operation instruction in the target instruction page.
After determining a target instruction page of the page switching instruction, the target instruction page being an instruction page pointed by the first instruction page, the electronic device extracts the target instruction page from the memory to replace the first instruction page in the memory space, and at this time, only the target instruction page is stored in the memory space, thereby ensuring that only one instruction page is stored in the memory space at a time. Then, the electronic device continues to execute the operation instruction in the target instruction page, and the specific execution process is similar to step 202, and is not repeated here.
Referring to fig. 2-2, if the target instruction page of the page switching instruction of the page 1 is the page 2, after the electronic device executes the M operation instructions of the page 1, the page 2 is extracted into the memory space according to the target instruction page of the page switching instruction, and the M operation instructions of the page 2 are continuously executed.
It should be noted that, the above-mentioned steps 201 and 204 are only described for the process of executing the operation instruction, and actually, in the process of executing the operation instruction, the electronic device may also receive a new operation instruction, and needs to store the new operation instruction. Thus, the method may further comprise at least one or more of the following steps 1 to 4:
1. when the electronic equipment receives the operation instruction, the received operation instruction is added to the current last instruction page of the memory.
The memory comprises a plurality of instruction pages, each instruction page comprises one or more operation instructions, and in order to ensure the orderliness of the operation instructions, each time the electronic equipment receives a new operation instruction, the operation instruction is added to the last instruction page in the memory, so that the received operation instructions are sequentially arranged.
2. When the number of the operation instructions in the second instruction page reaches a preset number, the electronic device adds a page switching instruction after the operation instructions in the second instruction page, creates a new third instruction page, and sets a target instruction page of the page switching instruction in the second instruction page as the third instruction page.
Taking a second instruction page in a memory as an example, when the second instruction page is the last instruction page in the memory, as the electronic device continuously receives operation instructions, the operation instructions in the second instruction page are more and more, and the occupied space is more and more, if the occupied space of the second instruction page is too much, the second instruction page is subsequently extracted to the memory space, the memory space is excessively occupied, therefore, in the process of adding operation instructions in the second instruction page, the electronic device judges whether the number of operation instructions in the second instruction page reaches a preset number, when determining that the number of operation instructions in the second instruction page reaches the preset number, the electronic device stops adding operation instructions into the second instruction page, but adds a page switching instruction after the operation instructions in the second instruction page, and creates another third instruction page, and setting the target instruction page of the page switching instruction of the second instruction page as the third instruction page, namely, the page switching instruction of the second instruction page points to the third instruction page, wherein the third instruction page becomes the last instruction page of the memory, and when the electronic equipment receives a new operation instruction, the received operation instruction is added to the third instruction page.
The preset number may be set by the electronic device as default for each instruction page, and the preset number of each instruction page may be equal or unequal, which is not limited in this embodiment.
After the electronic device creates the third instruction page, the storage address of the first operation instruction of the third instruction page may be added to the page switching instruction of the second instruction page, so that the target instruction page of the page switching instruction of the second instruction page is set as the third instruction page, and the subsequent electronic device can find the target instruction page according to the address in the page switching instruction.
By adding a switching page instruction and setting a target instruction page, the instruction page can be conveniently expanded, and switching between instruction pages is realized.
3. The electronic equipment receives a target change request of the page switching instruction of the second instruction page, and changes the target instruction page of the page switching instruction of the second instruction page into the instruction page indicated by the target change request.
Taking the current target instruction page of the second instruction page as a third instruction page as an example, when the target instruction page of the second instruction page needs to be modified, a target modification request for the page switching instruction of the second instruction page may be triggered, where the target modification request also carries the modified instruction page, and when the electronic device receives the target modification request, the target instruction page of the page switching instruction of the second instruction page is modified to the instruction page indicated by the target modification request.
The step of changing the target instruction page may be performed only when the second instruction page is located in the memory, and may not be performed again when the second instruction page is fetched into the memory space, so as to prevent the normal operation of the memory space from being affected. Alternatively, the step of changing the target instruction page may also be performed when the second instruction page has been extracted into the memory space, which is not limited in this embodiment.
4. And the electronic equipment receives an instruction editing request for the second instruction page and edits the second instruction page according to the editing request.
For example, if the instruction editing request is to delete an operation instruction in the second instruction page, the electronic device deletes the operation instruction indicated by the instruction editing request from the second instruction page. Or, if the instruction editing request is to modify an operation in the second instruction page, the electronic device modifies the operation instruction according to the instruction editing request. The instruction editing request may be multiple types of editing requests, and the embodiment does not limit the type of the instruction editing request.
The step of editing the operation instruction may be performed only when the second instruction page is located in the memory, and may not be performed again when the second instruction page is fetched into the memory space, so as to prevent the normal operation of the memory space from being affected. Alternatively, when the second instruction page has been extracted into the memory space, the step of editing the operation instruction may also be executed to edit the unexecuted operation instruction, which is not limited in this embodiment.
It should be added that, this embodiment is only described by taking an electronic device as an execution subject, and actually, each step may be executed by any module with Processing capability in the electronic device, such as a Central Processing Unit (CPU), a micro control Unit, and the like, which is not limited in this embodiment.
At present, the electronic equipment has limited number of operation instructions which can be executed, only a fixed number of operation instructions can be identified, once the operation instructions are set, the operation instructions are difficult to realize no matter the operation instructions are modified or increased or decreased, the self resources of the memory space are limited, and if the operation instructions are excessive, the load of program operation is too heavy, and the corresponding functions of the memory are influenced.
The operation instructions are stored in the memory in a paging mode, only one instruction page is extracted into the memory space of the micro control unit, fewer memory space resources are utilized, the number of the operation instructions is not limited, and the instructions can be changed or modified according to requirements.
In the method provided in this embodiment, the first instruction page in the memory is stored in the memory space of the mcu, the operation instruction to be executed is extracted from the first instruction page in the memory space, and the extracted operation instruction is executed. By storing the operation instructions in the memory in pages, one instruction page is stored in the memory space every time, and the rest instruction pages are still stored in the memory, so that the phenomenon that the excessive memory space of the micro control unit is occupied is avoided, the influence on the normal operation of the electronic equipment is avoided, the limitation of the capacity of the memory space is also eliminated, a plurality of operation instructions can be stored in the memory, the condition that some operation instructions are discarded is avoided, the normal operation of the operation instructions is ensured, and the processing performance is optimized. And the operation instruction or the page switching instruction can be flexibly changed or edited, so that the updating is convenient and quick, and the flexibility is improved.
FIG. 3 is a block diagram illustrating an apparatus to execute operational instructions in accordance with an exemplary embodiment. Referring to fig. 3, the apparatus includes a storage module 301, an instruction fetch module 302, and an execution module 303.
A storage module 301, configured to store a first instruction page in a memory to a memory space of a micro control unit;
an instruction extracting module 302, configured to extract an operation instruction to be executed from the first instruction page in the memory space;
an execution module 303, configured to execute the extracted operation instruction;
the memory is used for storing at least one instruction page, each instruction page comprises at least one operation instruction and a page switching instruction positioned after the at least one operation instruction, and the page switching instruction is used for indicating switching to any other instruction page.
Referring to fig. 4, in one possible implementation, the apparatus further includes:
the instruction extracting module 302 is configured to extract the page switching instruction from the first instruction page after the operation instruction in the first instruction page is executed;
an instruction page extracting module 304, configured to extract a target instruction page of the page switching instruction from the memory;
the storage module 301 is configured to delete the first instruction page in the memory space, and store the target instruction page in the memory space.
In another possible implementation manner, the apparatus further includes:
the adding module 305 is configured to, when an operation instruction is received, add the received operation instruction to the current last instruction page of the memory.
In another possible implementation manner, the apparatus further includes:
an adding module 305, configured to add a page switching instruction after a plurality of operation instructions in a second instruction page of the memory when the number of operation instructions in the second instruction page has reached a preset number;
a creating module 306 for creating a new third instruction page;
a setting module 307, configured to set a target instruction page of the page switching instruction of the second instruction page as the third instruction page.
In another possible implementation manner, the apparatus further includes:
a request receiving module 308, configured to receive a target change request for a page switch instruction of the second instruction page;
a changing module 309, configured to change the target instruction page of the page switching instruction of the second instruction page to the instruction page indicated by the target change request.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
It should be noted that: in the device for executing an operation instruction provided in the above embodiment, when the operation instruction is executed, only the division of each functional module is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the electronic device may be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for executing an operation instruction and the method for executing an operation instruction provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
FIG. 5 is a block diagram illustrating an apparatus 500 to execute operational instructions in accordance with an example embodiment. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the apparatus 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the apparatus 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of executing operational instructions, the method comprising:
storing a first instruction page in a memory to a memory space of a micro control unit;
extracting an operation instruction to be executed from the first instruction page of the memory space;
executing the extracted operation instruction;
the memory is used for storing at least one instruction page, each instruction page comprises at least one operation instruction and a page switching instruction positioned after the at least one operation instruction, and the page switching instruction is used for indicating switching to any other instruction page.
In one possible implementation, the method further includes:
after executing the operation instructions in the first instruction page, extracting a page switching instruction from the first instruction page;
extracting a target instruction page of the page switching instruction from the memory;
deleting the first instruction page in the memory space, and storing the target instruction page to the memory space.
In another possible implementation manner, the method further includes:
when an operation instruction is received, the received operation instruction is added to the current last instruction page of the memory.
In another possible implementation manner, the method further includes:
when the number of the operation instructions in the second instruction page of the memory reaches a preset number, adding a page switching instruction after a plurality of operation instructions in the second instruction page;
and creating a new third instruction page, and setting the target instruction page of the page switching instruction of the second instruction page as the third instruction page.
In another possible implementation manner, the method further includes:
receiving a target change request of a page switching instruction of the second instruction page;
and changing the target instruction page of the page switching instruction of the second instruction page into the instruction page indicated by the target change request.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (11)
1. A method of executing an operation instruction, the method comprising:
storing a first instruction page in a memory to a memory space of a micro control unit, wherein the rest instruction pages are still stored in the memory, and the first instruction page is one of the instruction pages in the memory;
extracting an operation instruction to be executed from the first instruction page of the memory space;
executing the extracted operation instruction;
the memory is configured to store at least one instruction page, where each instruction page includes at least one operation instruction and a page switching instruction located after the at least one operation instruction, where the page switching instruction is used to instruct switching to a target instruction page, and the target instruction page is any one of other instruction pages.
2. The method of claim 1, further comprising:
after executing the operation instructions in the first instruction page, extracting the page switching instruction from the first instruction page;
extracting a target instruction page of the page switching instruction from the memory;
and deleting the first instruction page in the memory space, and storing the target instruction page to the memory space.
3. The method of claim 1, further comprising:
when an operation instruction is received, adding the received operation instruction to the current last instruction page of the memory.
4. The method of claim 1, further comprising:
when the number of the operation instructions in a second instruction page of the memory reaches a preset number, adding a page switching instruction after a plurality of operation instructions in the second instruction page;
and creating a new third instruction page, and setting a target instruction page of a page switching instruction of the second instruction page as the third instruction page.
5. The method of claim 4, further comprising:
receiving a target change request for a page switching instruction of the second instruction page;
and changing a target instruction page of the page switching instruction of the second instruction page into the instruction page indicated by the target change request.
6. An apparatus for executing an operation instruction, the apparatus comprising:
the storage module is used for storing a first instruction page in a storage to a memory space of the micro control unit, and the rest instruction pages are still stored in the storage, wherein the first instruction page is one of the instruction pages in the storage;
the instruction extracting module is used for extracting an operation instruction to be executed from the first instruction page of the memory space;
the execution module is used for executing the extracted operation instruction;
the memory is configured to store at least one instruction page, where each instruction page includes at least one operation instruction and a page switching instruction located after the at least one operation instruction, where the page switching instruction is used to instruct switching to a target instruction page, and the target instruction page is any one of other instruction pages.
7. The apparatus of claim 6, further comprising:
the instruction extracting module is used for extracting the page switching instruction from the first instruction page after the operation instruction in the first instruction page is executed;
an instruction page extracting module, configured to extract a target instruction page of the page switching instruction from the memory;
the storage module is configured to delete the first instruction page in the memory space, and store the target instruction page in the memory space.
8. The apparatus of claim 6, further comprising:
and the adding module is used for adding the received operation instruction to the current last instruction page of the memory when the operation instruction is received.
9. The apparatus of claim 6, further comprising:
the adding module is used for adding a page switching instruction after a plurality of operation instructions in a second instruction page of the memory when the number of the operation instructions in the second instruction page reaches a preset number;
a creating module for creating a new third instruction page;
and the setting module is used for setting a target instruction page of the page switching instruction of the second instruction page as the third instruction page.
10. The apparatus of claim 9, further comprising:
a request receiving module, configured to receive a target change request for a page switching instruction of the second instruction page;
and the changing module is used for changing the target instruction page of the page switching instruction of the second instruction page into the instruction page indicated by the target changing request.
11. An apparatus for executing an operation instruction, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
storing a first instruction page in the memory to a memory space of a micro control unit, wherein the rest instruction pages are still stored in the memory, and the first instruction page is one of the instruction pages in the memory;
extracting an operation instruction to be executed from the first instruction page of the memory space;
executing the extracted operation instruction;
the memory is configured to store at least one instruction page, where each instruction page includes at least one operation instruction and a page switching instruction located after the at least one operation instruction, where the page switching instruction is used to instruct switching to a target instruction page, and the target instruction page is any one of other instruction pages.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610620973.4A CN107665125B (en) | 2016-07-29 | 2016-07-29 | Method and device for executing operation instruction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610620973.4A CN107665125B (en) | 2016-07-29 | 2016-07-29 | Method and device for executing operation instruction |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107665125A CN107665125A (en) | 2018-02-06 |
CN107665125B true CN107665125B (en) | 2021-03-09 |
Family
ID=61121908
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610620973.4A Active CN107665125B (en) | 2016-07-29 | 2016-07-29 | Method and device for executing operation instruction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107665125B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1270348A (en) * | 1998-10-21 | 2000-10-18 | 富士通株式会社 | Dynamic optimizing target code translator for structure simulation and translating method |
CN103513958A (en) * | 2012-06-27 | 2014-01-15 | 上海芯豪微电子有限公司 | High-performance instruction caching system and method |
CN104424129A (en) * | 2013-08-19 | 2015-03-18 | 上海芯豪微电子有限公司 | Cache system and method based on read buffer of instructions |
CN104793921A (en) * | 2015-04-29 | 2015-07-22 | 深圳芯邦科技股份有限公司 | Instruction branch prediction method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140041026A1 (en) * | 2012-08-01 | 2014-02-06 | SIFTEO, Inc. | Hybrid Virtual Machine |
-
2016
- 2016-07-29 CN CN201610620973.4A patent/CN107665125B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1270348A (en) * | 1998-10-21 | 2000-10-18 | 富士通株式会社 | Dynamic optimizing target code translator for structure simulation and translating method |
CN103513958A (en) * | 2012-06-27 | 2014-01-15 | 上海芯豪微电子有限公司 | High-performance instruction caching system and method |
CN104424129A (en) * | 2013-08-19 | 2015-03-18 | 上海芯豪微电子有限公司 | Cache system and method based on read buffer of instructions |
CN104793921A (en) * | 2015-04-29 | 2015-07-22 | 深圳芯邦科技股份有限公司 | Instruction branch prediction method and system |
Also Published As
Publication number | Publication date |
---|---|
CN107665125A (en) | 2018-02-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107037949B (en) | Split screen display method and device | |
CN109683714B (en) | Multimedia resource management method, device and storage medium | |
CN107608561B (en) | Touch screen control method and device | |
CN105204846A (en) | Method for displaying video picture in multi-user video, device and terminal equipment | |
CN104834665A (en) | Target picture acquiring method and device | |
CN105338409A (en) | Network video pre-loading method and device | |
CN105912450B (en) | Application state information display method and device | |
CN106033397B (en) | Memory buffer area adjusting method, device and terminal | |
CN105426386A (en) | File synchronization method and apparatus, and terminal device | |
RU2645282C2 (en) | Method and device for calling via cloud-cards | |
CN110262692B (en) | Touch screen scanning method, device and medium | |
CN107885571B (en) | Display page control method and device | |
CN110968364A (en) | Method and device for adding shortcut plug-in and intelligent equipment | |
CN107729098B (en) | User interface display method and device | |
CN111258952B (en) | Data storage control method, device and storage medium | |
CN108804684B (en) | Data processing method and device | |
US20240045583A1 (en) | Page display method, electronic device and storage medium | |
CN106447747B (en) | Image processing method and device | |
US9854559B2 (en) | Method and device for pushing user information | |
CN107885464B (en) | Data storage method, device and computer readable storage medium | |
CN112307229A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
CN113360708B (en) | Video playing method and device, electronic equipment and storage medium | |
CN107665125B (en) | Method and device for executing operation instruction | |
CN104317480B (en) | Character keys display methods, device and terminal | |
CN113692067A (en) | Device connection method, device and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |