CN108196906B - User instruction processing method and embedded device - Google Patents

User instruction processing method and embedded device Download PDF

Info

Publication number
CN108196906B
CN108196906B CN201711466395.4A CN201711466395A CN108196906B CN 108196906 B CN108196906 B CN 108196906B CN 201711466395 A CN201711466395 A CN 201711466395A CN 108196906 B CN108196906 B CN 108196906B
Authority
CN
China
Prior art keywords
user instruction
bootloader
user
command
embedded device
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.)
Expired - Fee Related
Application number
CN201711466395.4A
Other languages
Chinese (zh)
Other versions
CN108196906A (en
Inventor
边庆宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Comba Network Systems Co Ltd
Original Assignee
Comba Telecom Systems China Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Comba Telecom Systems China Ltd filed Critical Comba Telecom Systems China Ltd
Priority to CN201711466395.4A priority Critical patent/CN108196906B/en
Publication of CN108196906A publication Critical patent/CN108196906A/en
Application granted granted Critical
Publication of CN108196906B publication Critical patent/CN108196906B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7803System on board, i.e. computer system on one or more PCB, e.g. motherboards, daughterboards or blades

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a user instruction processing method and embedded equipment, which are used for solving the technical problem that the operation process of realizing a user-defined bootloader function of the embedded equipment is complex in the prior art. The user instruction processing method comprises the steps of obtaining a first user instruction which is input by a user through a user instruction window of a bootloader program module, wherein the first user instruction is a programmable instruction of a user-defined bootloader function; analyzing the first user instruction to obtain a bootloader functional parameter and a plurality of command codes; the bootloader function parameter is used for indicating the command execution format of each command code in the plurality of command codes; and executing a plurality of command codes based on the bootloader function parameters to realize the self-defined bootloader function.

Description

User instruction processing method and embedded device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a user instruction processing method and an embedded device.
Background
When a traditional embedded system starts a kernel file system image, a special bootloader is usually used for realizing the startup and loading, namely, a startup interface command is usually given in a bootloader program code, and a kernel can be guided to start and enter a file system according to set startup parameters so as to finish the startup and loading work of the kernel file system image.
With the development of embedded technology, embedded systems have been widely used in various fields of society. Some product application occasions require the equipment to have high reliability, and if the equipment is required to be capable of recovering the mirror image under the condition that the main mirror image is abnormally damaged; for another example, the device is required to enter the system after being started, that is, before entering the system, the bootloader state may be determined according to the device running characteristics such as the peripheral state and then enter the system, so that new requirements are provided for the bootloader software function of the embedded device image.
In view of the above situation, a method for modifying software function codes is commonly adopted in the prior art, that is, by modifying bootloader codes, some processed function codes are added before the bootloader executes the boot operation of the embedded system, and then the boot loading work of the image is executed, so as to complete the boot loading work of the kernel file system image. For example, modifying the bootloader code to enable the modified bootloader code to perform image recovery when the main image is abnormally damaged, or enabling the modified bootloader code to perform some judgment processing according to the device running characteristics such as the peripheral state and the like before entering the system after being started and then entering the system. Therefore, each time a user needs the bootloader to realize a function, the user needs to modify the bootloader code, and the operation process is complex.
In summary, there is a technical problem in the prior art that an operation process of an embedded device for implementing a user-defined bootloader function is complicated.
Disclosure of Invention
The embodiment of the invention provides a user instruction processing method and embedded equipment, which are used for solving the technical problem that the operation process of the embedded equipment for realizing the user-defined bootloader function is complex in the prior art.
In a first aspect, an embodiment of the present invention provides a user instruction processing method, which is applied to an embedded device, where the embedded device includes a bootloader program module, and the method includes: acquiring a first user instruction input by a user through a user instruction window of the bootloader program module, wherein the first user instruction is a programmable instruction of a bootloader function defined by the user; analyzing the first user instruction to obtain a bootloader functional parameter and a plurality of command codes; wherein the bootloader function parameter is used for indicating a command execution format of each command code in the plurality of command codes; and executing the command codes based on the bootloader function parameters to realize the self-defined bootloader function.
Optionally, after obtaining a first user instruction entered by a user through a user instruction window of the bootloader program module, the method includes: performing character conversion on the first user instruction to obtain a second user instruction after character conversion; encrypting the second user instruction based on a preset encryption rule to obtain an encrypted third user instruction; storing the third user instruction.
Optionally, the storing the third user instruction includes: and storing the third user instruction in a preset path file of the bootloader program module or a preset FLASH memory FLASH partition.
Optionally, the analyzing the first user instruction to obtain a bootloader function parameter and a plurality of command codes includes: decrypting the third user instruction based on a preset decryption rule corresponding to the preset encryption rule to obtain the second user instruction; and analyzing the second user instruction to obtain a bootloader functional parameter and a plurality of command codes.
Optionally, the executing the plurality of command codes based on the bootloader function parameter includes: executing a first command code in the plurality of command codes based on the bootloader function parameter to obtain an execution result; if the execution result accords with a preset result, executing a second command code after the first command code in the command codes; otherwise, re-executing the first command code or abandoning the execution of the first command code; and the preset result is an expected result corresponding to the user-defined bootloader function of the first user instruction.
In a second aspect, an embodiment of the present invention provides an embedded device, including: starting and loading a bootloader program module; the acquisition module is used for acquiring a first user instruction which is input by a user through a user instruction window of the bootloader program module, wherein the first user instruction is a programmable instruction which is used by the user for customizing a bootloader function; the analysis module is used for analyzing the first user instruction to obtain a bootloader functional parameter and a plurality of command codes; wherein the bootloader function parameter is used for indicating a command execution format of each command code in the plurality of command codes; and the execution module is used for executing the command codes based on the bootloader function parameters so as to realize the self-defined bootloader function.
Optionally, the embedded device includes: the conversion module is used for performing character conversion on a first user instruction after the first user instruction input by a user through a user instruction window of the bootloader program module is obtained, and obtaining a second user instruction after the character conversion; the encryption module is used for encrypting the second user instruction based on a preset encryption rule to obtain an encrypted third user instruction; and the storage module is used for storing the third user instruction.
Optionally, the storage module is configured to: and storing the third user instruction in a preset path file of the bootloader program module or a preset FLASH memory FLASH partition.
Optionally, the parsing module is configured to: decrypting the third user instruction based on a preset decryption rule corresponding to the preset encryption rule to obtain the second user instruction; and analyzing the second user instruction to obtain a bootloader functional parameter and a plurality of command codes.
Optionally, the execution module is configured to: executing a first command code in the plurality of command codes based on the bootloader function parameter to obtain an execution result; if the execution result accords with a preset result, executing a second command code after the first command code in the command codes; otherwise, re-executing the first command code or abandoning the execution of the first command code; and the preset result is an expected result corresponding to the user-defined bootloader function of the first user instruction.
In a third aspect, an embodiment of the present invention provides a computer apparatus, including a processor, configured to implement the method according to the first aspect when executing a computer program stored in a memory.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions which, when executed on a computer, cause the computer to perform the method according to the first aspect.
One or more of the above technical solutions have the following technical effects or advantages:
first, in the user instruction processing method provided by the embodiment of the present invention, the embedded device obtains a first user instruction entered by a user through a user instruction window of the bootloader program module, where the first user instruction is a programmable instruction of a bootloader function defined by the user, and then the embedded device parses the first user instruction to obtain a bootloader functional parameter and a plurality of command codes, where the bootloader functional parameter is used to indicate a command execution format of each command code in the plurality of command codes, and the embedded device executes the plurality of command codes according to the bootloader functional parameter, so as to implement the user-defined bootloader function. In other words, in the embodiment of the present invention, if a user wants to implement a certain function in the bootloader state, the user-defined bootloader function can be implemented as long as the first user instruction corresponding to the function is entered through the user instruction window of the bootloader program module, and the bootloader does not need to be modified more, so that the technical problem that the operation process of implementing the user-defined bootloader function by the embedded device in the prior art is complicated is solved, and the working efficiency is improved.
Secondly, in the embodiment of the invention, the bootloader program module comprises the user instruction window, and the user can input the user instruction of the user-defined through the user instruction window, so that if the user wants to realize a certain function in the bootloader state, only the user instruction of the corresponding function needs to be input through the user instruction window, and the bootloader program itself does not need to be changed. The method can quickly realize the variable function customized starting requirements of the user, meet the requirements of various starting scenes, and further ensure the independence of the bootloader, namely centralize the difference of product functions into one configuration partition or file of the bootloader for embodying, and is favorable for the unified management of the bootloader software version.
Thirdly, in the embodiment of the invention, after the embedded device acquires the first user instruction, the first user instruction is subjected to character conversion, then the second user instruction subjected to character conversion is acquired, and then the second user instruction is encrypted and stored by the embedded device based on the preset encryption rule, so that the data on the hardware storage medium cannot be stolen by means of reverse development to reveal the data, and meanwhile, the startup logic of the input is prevented from being maliciously tampered, and the safety of the data in the embedded device is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a user instruction processing method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an embedded device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
Some terms in the embodiments of the present invention are explained below to be understood by those skilled in the art.
In an embedded operating system, a bootloader program is usually started and loaded before an operating system kernel runs, and the bootloader program can be used for initializing a hardware device of an embedded device, establishing a memory space mapping diagram and the like, so that the software and hardware environment of the system of the embedded device can be in a proper state, and a correct running environment is prepared for subsequently calling the operating system kernel.
In the embodiment of the present invention, the embedded device may be provided with a user instruction window, such as a user instruction interface module, where the user instruction window may be located on the bootloader program module, or may also be located on any other module of the embedded device, and is used to enter a user-defined user instruction for instructing the bootloader program module to implement a user-defined bootloader function.
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Example one
Referring to fig. 1, the user instruction processing method provided in the embodiment of the present invention is applied to an embedded device, where the embedded device may include a bootloader program module, and an implementation process of the user instruction processing method may be described as follows:
s100: acquiring a first user instruction input by a user through a user instruction window of a bootloader program module, wherein the first user instruction is a programmable instruction of a bootloader function defined by the user;
s200: analyzing the first user instruction to obtain a bootloader functional parameter and a plurality of command codes; the bootloader function parameter is used for indicating the command execution format of each command code in the plurality of command codes;
s300: and executing a plurality of command codes based on the bootloader function parameters to realize the self-defined bootloader function.
In S100, the embedded device may obtain a first user instruction entered by a user through a user instruction window of the bootloader program module, where the entered first user instruction may be one user instruction or multiple user instructions.
When the embedded device only acquires one user instruction, the embedded device can analyze the user instruction, namely, the subsequent processing process of the first user instruction is started; when the embedded device obtains a plurality of user instructions, the embedded device may edit the plurality of user instructions into a script instruction, and then perform operations such as parsing on the script instruction.
The first user instruction may be a programmable instruction of a bootloader function defined by a user, where the programmable instruction may be an instruction that the embedded device may perform a series of operations such as logic fetching, data reading, compiling, and executing.
In practical application, assuming that a user needs to realize the bootloader function of the main image recovery in the bootloader state, the user can enter a first user instruction corresponding to the bootloader function of the main image recovery through a user instruction window of a bootloader program module; or, if the user needs the embedded device in the bootloader state, and can perform some logic judgment processing according to the running characteristics of the embedded device such as the peripheral state and then enter the system, the user can enter the first user instruction corresponding to the bootloader function judgment processing through the user instruction window of the bootloader program module; or, if the user temporarily determines that the bootloader program module needs to make a judgment for some specific events, such as General Purpose Input/Output (GPIO) tags, then strategically and actively perform selective switching of the images to switch to an environment in which the images can be run, and the user may also enter a first user instruction corresponding to the bootloader function through a user instruction window of the bootloader program module.
In other words, in the embodiment of the present invention, if a user wants to implement a certain function in the bootloader state, the user-defined bootloader function can be implemented only by entering the first user instruction corresponding to the function through the user instruction window of the bootloader program module, which solves the technical problem in the prior art that the operation process of implementing the user-defined bootloader function by the embedded device is complicated, and improves the working efficiency.
Optionally, after acquiring a first user instruction input by a user through a user instruction window of the bootloader program module, the embedded device may further perform character conversion on the first user instruction to obtain a second user instruction after the character conversion, and then the embedded device may encrypt the second user instruction based on a preset encryption rule to obtain an encrypted third user instruction, and store the third user instruction.
The first user instruction acquired by the embedded device may be an instruction in the form of a character string, and if the embedded device directly stores the first user instruction in the form of the character string, the instruction storage pressure of the embedded device may be increased. Therefore, in order to save the storage space of the embedded device or reduce the instruction storage pressure of the embedded device, after the embedded device obtains the first user instruction, the first user instruction may be subjected to character conversion, that is, the first user instruction in the form of a character string may be converted into the second user instruction in the form of a character, and the character form may be an array, a structure, or the like.
For example, if the first user instruction is "Add 1, 2", where "Add" is an addition operation, after the first user instruction is character-converted, the second user instruction may be "a, parameter 1, parameter 2", where "a" in the second user instruction may be an operation code, and the subsequent embedded device may perform operations such as storing "a, parameter 1, parameter 2". Of course, this example is merely illustrative and not intended to limit embodiments of the present invention.
Therefore, after the embedded device obtains the second user instruction after the character conversion, the second user instruction can be encrypted according to the preset encryption rule, and the encrypted third user instruction is obtained, so that the data on the hardware storage medium can not be stolen and leaked through a reverse development method.
In practical applications, the preset Encryption rule may be a preset Encryption algorithm, such as a Data Encryption Standard (DES), a Triple Data Encryption Standard (3 DES), and other symmetric Encryption algorithm algorithms; alternatively, as with asymmetric encryption algorithms, the encryption and decryption use different keys, usually two keys, "public key" and "private key"; or it may be a user-defined encryption algorithm. The process of encrypting the second user instruction by using the encryption algorithm may refer to the prior art, and is not described in detail in the embodiments of the present invention.
The embedded device may store the encrypted third user instruction, and specific storage manners may include, but are not limited to, the following two cases:
in the first case, the embedded device may store the encrypted third user instruction in a preset path file of the bootloader program module, where the preset path file may be automatically selected by the bootloader program module or may be self-defined by the user through the embedded device, and the like.
And in the second case, because part of bootloader program modules have no concept of files, in this case, the embedded device can store the encrypted third user instruction into the specified FLASH memory FLASH partition position.
After acquiring the first user instruction, the embedded device may enter S200, that is, the embedded device analyzes the first user instruction to obtain a bootloader function parameter and a plurality of command codes, where the bootloader function parameter may be used to indicate a command execution format of each command code in the plurality of command codes.
In the embodiment of the present invention, the command code may be a program code executable by the embedded device, and the bootloader function parameter may indicate a command execution format of the command code, such as a command execution format of mathematical operation, logical operation, relational operation, miscellaneous operation, and the like.
The mathematical operation may include operation rules such as addition, subtraction, multiplication, division, etc., the logical operation may include logical relationship operation rules such as and, or, and, not, etc., the relationship operation may include operation rules such as sequence, loop, condition, etc., and the miscellaneous operation may include special operation rules such as delay, jump, etc.
In practical applications, the command execution format of the command code indicated by the bootloader function parameter may include one or more of the above operations, and the embodiments of the present invention are not limited as the case may be.
Optionally, the analyzing, by the embedded device, the first user instruction to obtain the bootloader function parameter and the plurality of command codes may include:
if the embedded device encrypts the second user instruction after the character conversion according to the preset encryption rule to obtain the encrypted third user instruction, when the embedded device analyzes the user instruction, the embedded device may decrypt the encrypted third user instruction according to the preset decryption rule corresponding to the preset encryption rule to obtain the second user instruction.
The way in which the embedded device decrypts the encrypted third user instruction may include, but is not limited to, the following:
first, if the preset encryption rule adopted by the embedded device is a symmetric encryption algorithm to encrypt the third user command, the embedded device may adopt the preset decryption rule consistent with the preset encryption rule when decrypting the third user command, and if the embedded device adopts the DES encryption, the DES is also adopted when decrypting.
Secondly, if the preset encryption rule adopted by the embedded device is an asymmetric encryption algorithm, the embedded device encrypts the third user instruction by using a 'public key', and the embedded device decrypts the third user instruction by using a 'private key' corresponding to the 'public key'; third, the user can use the self-defined encryption algorithm to encrypt and decrypt the third user command. The embodiment of the present invention is not limited specifically to which encryption and decryption method is adopted.
The embedded device obtains a second user instruction after decrypting the third user instruction, and then the embedded device can analyze the second user instruction to obtain the bootloader functional parameter and the plurality of command codes.
Optionally, the executing, by the embedded device, the multiple command codes based on the bootloader function parameter may include:
executing a first command code in the plurality of command codes based on the bootloader function parameter to obtain an execution result;
if the execution result accords with the preset result, executing a second command code after the first command code in the plurality of command codes; otherwise, re-executing the first command code or giving up executing the first command code; the preset result is an expected result corresponding to the user-defined bootloader function of the first user instruction.
For example, it is assumed that the embedded device obtains a first command code after parsing the user instruction, and the bootloader function parameters corresponding to the first command code include mathematical operations, miscellaneous operations, and the like, and the expected result of executing the first command code is "input"; the bootloader function parameters corresponding to the second command code include logical operation, relational operation, etc., and the expected result of executing the second command code is "read data", etc.
Therefore, after the embedded device obtains the plurality of command codes through analysis, the embedded device can sequentially execute the plurality of command codes based on the bootloader function parameters, and realize functions that a user wants to realize, such as functions of recovering a main image and the like. If the embedded device executes the first command code, the execution process may sequentially perform mathematical operations, miscellaneous operations, and the like, and then may obtain an execution result, and if the execution result is "input", the embedded device executes the next command code, i.e., the second command code.
If the execution result is not in accordance with the expectation, assuming that the execution result is "output", obviously, the execution result is not in accordance with the "input" of the expectation result, at this time, the embedded device may judge the correctness of the first command code, that is, enter an arbitration stage, for example, the embedded device may arbitrarily input data, if the display error is detected, that is, the data cannot be input, the first command code may have an error, and at this time, the embedded device may give up executing the first command code; otherwise, if the data can be input, it indicates that the first command code may be correct, and the embedded device may re-execute the first command code.
Example two
Based on the same inventive concept, please refer to fig. 2, an embedded device 20 provided in the embodiment of the present invention includes a bootloader program module 21, an obtaining module 22, an analyzing module 23, and an executing module 24.
The obtaining module 22 is configured to obtain a first user instruction entered by a user through a user instruction window of the bootloader program module, where the first user instruction is a programmable instruction of a bootloader function defined by the user; the analysis module 23 is configured to analyze the first user instruction to obtain a bootloader function parameter and a plurality of command codes; wherein the bootloader function parameter is used for indicating a command execution format of each command code in the plurality of command codes; and the execution module 24 is configured to execute the plurality of command codes based on the bootloader function parameter, so as to implement the customized bootloader function.
Optionally, the embedded device 20 includes: the conversion module is used for performing character conversion on a first user instruction after the first user instruction input by a user through a user instruction window of the bootloader program module is obtained, and obtaining a second user instruction after the character conversion; the encryption module is used for encrypting the second user instruction based on a preset encryption rule to obtain an encrypted third user instruction; and the storage module is used for storing the third user instruction.
Optionally, the storage module is configured to: and storing the third user instruction in a preset path file of the bootloader program module or a preset FLASH memory FLASH partition.
Optionally, the parsing module 23 is configured to: decrypting the third user instruction based on a preset decryption rule corresponding to the preset encryption rule to obtain the second user instruction; and analyzing the second user instruction to obtain a bootloader functional parameter and a plurality of command codes.
Optionally, the executing module 24 is configured to: executing a first command code in the plurality of command codes based on the bootloader function parameter to obtain an execution result; if the execution result accords with a preset result, executing a second command code after the first command code in the command codes; otherwise, re-executing the first command code or abandoning the execution of the first command code; and the preset result is an expected result corresponding to the user-defined bootloader function of the first user instruction.
EXAMPLE III
Based on the same inventive concept, an embodiment of the present invention further provides a computer apparatus, please refer to fig. 3, where the computer apparatus includes a processor 31 and a memory 32, where the processor 31 is configured to implement the steps of the user instruction processing method provided in the embodiment of the present invention when executing the computer program stored in the memory 32.
Optionally, the processor 31 may specifically be a central processing unit, an Application Specific Integrated Circuit (ASIC), one or more Integrated circuits for controlling program execution, a hardware Circuit developed by using a Field Programmable Gate Array (FPGA), or a baseband processor.
Optionally, the processor 31 may include at least one processing core.
Optionally, the electronic device further includes a Memory 32, and the Memory 32 may include a Read Only Memory (ROM), a Random Access Memory (RAM), and a disk Memory. The memory 32 is used for storing data required by the processor 31 in operation. The number of the memory 32 is one or more.
Example four
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the steps of the user instruction processing method provided in the embodiment of the present invention may be implemented.
In the embodiment of the present invention, it should be understood that the disclosed user instruction processing method and embedded device may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical or other form.
The functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be an independent physical module.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device, such as a personal computer, a server, or a network device, or a Processor (Processor), to execute all or part of the steps of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used to describe the technical solutions of the present invention in detail, but the above embodiments are only used to help understanding the method of the embodiments of the present invention, and should not be construed as limiting the embodiments of the present invention. Variations or substitutions that may be readily apparent to one skilled in the art are intended to be included within the scope of the embodiments of the present invention.

Claims (8)

1. A user instruction processing method is applied to an embedded device, and is characterized in that the embedded device comprises a bootloader program module, and the method comprises the following steps:
acquiring a first user instruction input by a user through a user instruction window of the bootloader program module, wherein the first user instruction is a programmable instruction of a bootloader function defined by the user;
performing character conversion on the first user instruction to obtain a second user instruction after character conversion;
encrypting the second user instruction based on a preset encryption rule to obtain an encrypted third user instruction;
storing the third user instruction;
decrypting the third user instruction based on a preset decryption rule corresponding to the preset encryption rule to obtain the second user instruction;
analyzing the second user instruction to obtain a bootloader functional parameter and a plurality of command codes; the bootloader function parameter is used for indicating a command execution format of each command code in the plurality of command codes, and the command codes are program codes executable by the embedded device;
and executing the command codes based on the bootloader function parameters to realize the self-defined bootloader function.
2. The method of claim 1, wherein said storing said third user instruction comprises:
and storing the third user instruction in a preset path file of the bootloader program module or a preset FLASH memory FLASH partition.
3. The method of any of claims 1-2, wherein said executing the plurality of command codes based on the bootloader function parameter comprises:
executing a first command code in the plurality of command codes based on the bootloader function parameter to obtain an execution result;
if the execution result accords with a preset result, executing a second command code after the first command code in the command codes; otherwise, re-executing the first command code or abandoning the execution of the first command code; and the preset result is an expected result corresponding to the user-defined bootloader function of the first user instruction.
4. An embedded device, comprising:
starting and loading a bootloader program module;
the acquisition module is used for acquiring a first user instruction which is input by a user through a user instruction window of the bootloader program module, wherein the first user instruction is a programmable instruction of a bootloader function defined by the user;
the conversion module is used for performing character conversion on a first user instruction after the first user instruction input by a user through a user instruction window of the bootloader program module is obtained, and obtaining a second user instruction after the character conversion;
the encryption module is used for encrypting the second user instruction based on a preset encryption rule to obtain an encrypted third user instruction;
the storage module is used for storing the third user instruction;
the analysis module is used for decrypting the third user instruction based on a preset decryption rule corresponding to the preset encryption rule to obtain the second user instruction;
analyzing the second user instruction to obtain a bootloader functional parameter and a plurality of command codes; the bootloader function parameter is used for indicating a command execution format of each command code in the plurality of command codes, and the command codes are program codes executable by the embedded device;
and the execution module is used for executing the command codes based on the bootloader function parameters so as to realize the self-defined bootloader function.
5. The embedded device of claim 4, wherein the storage module is to:
and storing the third user instruction in a preset path file of the bootloader program module or a preset FLASH memory FLASH partition.
6. The embedded device of any one of claims 4-5, wherein the execution module is to:
executing a first command code in the plurality of command codes based on the bootloader function parameter to obtain an execution result;
if the execution result accords with a preset result, executing a second command code after the first command code in the command codes; otherwise, re-executing the first command code or abandoning the execution of the first command code; and the preset result is an expected result corresponding to the user-defined bootloader function of the first user instruction.
7. A computer arrangement, characterized in that the computer arrangement comprises a processor for implementing the method according to any of claims 1-3 when executing a computer program stored in a memory.
8. A computer-readable storage medium having stored thereon computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-3.
CN201711466395.4A 2017-12-28 2017-12-28 User instruction processing method and embedded device Expired - Fee Related CN108196906B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711466395.4A CN108196906B (en) 2017-12-28 2017-12-28 User instruction processing method and embedded device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711466395.4A CN108196906B (en) 2017-12-28 2017-12-28 User instruction processing method and embedded device

Publications (2)

Publication Number Publication Date
CN108196906A CN108196906A (en) 2018-06-22
CN108196906B true CN108196906B (en) 2021-06-22

Family

ID=62585825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711466395.4A Expired - Fee Related CN108196906B (en) 2017-12-28 2017-12-28 User instruction processing method and embedded device

Country Status (1)

Country Link
CN (1) CN108196906B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111694574B (en) * 2020-06-12 2023-11-14 北京百度网讯科技有限公司 Method, device, equipment and storage medium for processing instruction codes
CN113821230A (en) * 2020-06-18 2021-12-21 神州龙芯智能科技有限公司 System firmware updating mode design of embedded system
CN117608548B (en) * 2023-10-30 2024-09-17 北京领航智联物联网科技有限公司 Automatic generation method and system for driving instructions of Internet of things equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256482A (en) * 2007-12-19 2008-09-03 深圳市同洲电子股份有限公司 Development system and method for built-in application program
CN102819431A (en) * 2012-07-10 2012-12-12 上海华勤通讯技术有限公司 Setting method of logical orders, calling method of application program and mobile terminal
TW201428628A (en) * 2013-01-14 2014-07-16 Acer Inc Method and device for generating functional modules implemented for IPMI commands
CN104391726A (en) * 2014-12-12 2015-03-04 四川华拓光通信股份有限公司 SFP (Small Form-Factor Pluggable) optical module upgrading method based on Bootloader
CN107368333A (en) * 2017-07-20 2017-11-21 福建瑞恒信息科技股份有限公司 Wearable device collocation method and system and configuration system based on graphical programming

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024930A1 (en) * 2011-07-20 2013-01-24 Michael Steil Executing Functions of a Secure Program in Unprivileged Mode
US20140068239A1 (en) * 2012-08-28 2014-03-06 Han-Sheng YANG Method for booting icon lockout

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256482A (en) * 2007-12-19 2008-09-03 深圳市同洲电子股份有限公司 Development system and method for built-in application program
CN102819431A (en) * 2012-07-10 2012-12-12 上海华勤通讯技术有限公司 Setting method of logical orders, calling method of application program and mobile terminal
TW201428628A (en) * 2013-01-14 2014-07-16 Acer Inc Method and device for generating functional modules implemented for IPMI commands
CN104391726A (en) * 2014-12-12 2015-03-04 四川华拓光通信股份有限公司 SFP (Small Form-Factor Pluggable) optical module upgrading method based on Bootloader
CN107368333A (en) * 2017-07-20 2017-11-21 福建瑞恒信息科技股份有限公司 Wearable device collocation method and system and configuration system based on graphical programming

Also Published As

Publication number Publication date
CN108196906A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
CN108196906B (en) User instruction processing method and embedded device
US11775269B2 (en) Generating a synchronous digital circuit from a source code construct defining a function call
WO2021164462A1 (en) Data encryption method, data decryption method, computer device, and medium
CN113302616A (en) Generating synchronous digital circuits from source code constructs mapped to circuit implementations
US11347519B2 (en) Systems and methods for detecting short-term changes to BIOS setup
WO2020006911A1 (en) Hybrid app interface calling method and device, and computer-readable storage medium
CN112565026A (en) Test frame generation method, device and equipment
WO2018153064A1 (en) Data processing method, terminal and non-volatile readable storage medium
CN117786726A (en) Source code file processing method and device, electronic equipment and storage medium
US10705981B2 (en) Method and apparatus for data storage service
US11995451B2 (en) Resource permission processing method and apparatus, storage medium, and chip
CN111767552B (en) Plug-in flash memory management method, MCU, electronic equipment and readable storage medium
CN111767553B (en) Data encryption and decryption method, MCU, electronic equipment and readable storage medium
CN110908644B (en) Configuration method and device of state node, computer equipment and storage medium
CN110955415A (en) Method for adapting projection multi-platform service
CN114595047A (en) Batch task processing method and device
CN114356290A (en) Data processing method and device and computer readable storage medium
CN113741949A (en) Method, device and equipment for generating application program installation package and storage medium
US20150121336A1 (en) Screen-oriented computing program refactoring
CN116974922B (en) Performance analysis method, device, equipment and storage medium of deep learning model
KR101196748B1 (en) Data backup method in mobile telecommunication terminal equipment
CN113742299B (en) File compression and decompression method and file compression and decompression device
US20240061658A1 (en) Method and system for creating application user interface within integrated development environment
CN114091075B (en) Password input method and device, storage medium and electronic equipment
CN110430175B (en) Encryption protocol implanting method, device and equipment based on AC35 platform

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
TA01 Transfer of patent application right

Effective date of registration: 20200108

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant after: COMBA TELECOM SYSTEMS (CHINA) Ltd.

Address before: 510663 Luogang District Science City, Guangzhou, Shenzhou Road, No. 10, Guangdong

Applicant before: COMBA TELECOM SYSTEMS (CHINA) Ltd.

Applicant before: COMBA TELECOM SYSTEMS (GUANGZHOU) Ltd.

Applicant before: COMBA TELECOM TECHNOLOGY (GUANGZHOU) Ltd.

Applicant before: TIANJIN COMBA TELECOM SYSTEMS Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Patentee after: Jingxin Network System Co.,Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Patentee before: COMBA TELECOM SYSTEMS (CHINA) Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210622

CF01 Termination of patent right due to non-payment of annual fee