Embedded system login authentication presetting method, server, equipment and medium
By obtaining and independently managing its exclusive identity information before the embedded system leaves the factory, the cumbersome problem of frequently modifying code in embedded system development is solved, and development efficiency and password security are improved.
Patent Information
- Application Number
- CN202411268006.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-27
AI Technical Summary
In embedded system development, the default login account and password are usually simple and universal, causing developers to frequently modify code and compile, increasing the workload and increasing the possibility of errors.
Reduce developer workload and improve security by obtaining its exclusive identity information before it leaves the factory and making it independent of code, and injecting it into source code only at compile time to generate system images.
It reduces the workload of developers, reduces the possibility of errors caused by code modification, and ensures the security of passwords through dark text transmission.
Smart Images

Figure CN119201128A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of embedded system development, and in particular relates to a presetting method, system, equipment and medium for embedded system login authentication. Background Art
[0002] When developing and testing embedded systems, a default login account and password are generally required to facilitate R&D personnel to operate the embedded system. The usual practice is to hard-code the login account and password directly in the code, and then compile according to the code to generate the image required by the corresponding embedded system. However, the default login account and password are generally simple and universal, so the login account and password need to be modified when the embedded system leaves the factory. This requires developers to re-modify and submit the code, and then recompile it, which is extremely cumbersome and increases the workload of developers. Summary of the invention
[0003] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a pre-setting method for embedded system login authentication, which can keep the identity information of the embedded system login authentication independent of the code and inject it into the source code to generate a system image only when compilation is required, thereby facilitating developers to modify the login account and password of the embedded system, greatly reducing the unnecessary workload of developers, and correspondingly reducing the possibility of errors caused by continuous code modification.
[0004] To achieve the above-mentioned purpose and other related purposes, the present invention provides a pre-setting method for embedded system login authentication, comprising: before the embedded system leaves the factory, for each embedded system, obtaining its exclusive identity information and compiled code file for login authentication; injecting the exclusive identity information into the code file for compilation, and generating a system image of the embedded system so as to be independent of other embedded systems.
[0005] According to a specific embodiment of the present invention, the step of obtaining the exclusive identity information for logging into the embedded system includes: obtaining the exclusive identity information through inter-process communication; wherein the exclusive identity information includes a login account and / or password.
[0006] According to a specific embodiment of the present invention, the step of obtaining the exclusive identity information for logging into the embedded system includes: obtaining the exclusive identity information from a compilation environment variable; wherein the exclusive identity information includes a login account and / or password.
[0007] According to a specific embodiment of the present invention, the exclusive identity information is injected into the code file for compilation, and the step of generating a system image of the embedded system includes: when the exclusive identity information includes a login account and a password, decrypting the password in the exclusive identity information to obtain the password plaintext; injecting the login account and password plaintext into the code file to assign the login account and password plaintext to the corresponding blank parameters in the code file; compiling the assigned code file into binary code to calculate and generate the system image of the embedded system.
[0008] A presetting method for embedded system login authentication comprises: obtaining input instructions for each embedded system before the embedded system leaves the factory; obtaining a data packet corresponding to the embedded system from a preset storage location according to the input instructions, and parsing the data packet to obtain exclusive identity information for the embedded system login authentication; transmitting the exclusive identity information to a compilation process through an inter-process communication method or by configuring it as a compilation environment variable, so that the system image of the embedded system can be compiled and generated according to the exclusive identity information for the embedded system login authentication and a compiled code file.
[0009] According to a specific embodiment of the present invention, the data packet is generated according to the following steps and sent to a preset storage location: the data packet is generated by encrypting and packaging according to the exclusive identity information preset by the embedded system.
[0010] According to a specific embodiment of the present invention, based on the exclusive identity information pre-set by the embedded system, the steps of encrypting and packaging to generate the data packet include: when the exclusive identity information includes a login account and a password, encrypting the password to convert it into ciphertext; encrypting and packaging the login account and the encrypted password to generate the data packet.
[0011] A server for compiling an embedded system comprises: a sending process for obtaining a data packet corresponding to an embedded system from a preset storage location, parsing the data packet to obtain exclusive identity information for login authentication of the embedded system, and transmitting the exclusive identity information to the compiling process through an inter-process communication mode or by configuring it into a compiling environment variable; a compiling process for receiving the exclusive identity information for login authentication of the embedded system sent by the sending process, or extracting the exclusive identity information for login authentication of the embedded system from the compiling environment variable, and obtaining a code file compiled by the embedded system, and injecting the exclusive identity information into the code file for compilation, so as to generate a system image of the embedded system independent of other embedded systems.
[0012] An electronic device includes a processor, wherein the processor is coupled to a memory, and the memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the above-mentioned method is implemented.
[0013] A computer-readable storage medium includes a program. When the program is run on a computer, the computer is enabled to execute the method described above.
[0014] The present invention provides a presetting method for login authentication of an embedded system, which can make the login account and password of the embedded system independent of the source code written by the developer, and does not need to be hard-coded into the code, but is placed in a designated storage location by a fixed department group or staff, so that when the login account and password need to be changed, a new login account and password can be obtained from the designated storage location, injected into the original code file and recompiled, and the code does not need to be modified again, which reduces the workload of the personnel. At the same time, the password of the login account is set to be transmitted in ciphertext form, so as to ensure that the plaintext password cannot be seen during the entire transmission process, thereby ensuring the security of the data information. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flowchart of a specific embodiment of a presetting method for embedded system login authentication provided by the present invention;
[0016] Figure 2 A flowchart of another specific embodiment of a presetting method for embedded system login authentication provided by the present invention;
[0017] Figure 3 The present invention provides a structural block diagram of a specific embodiment of an electronic device. DETAILED DESCRIPTION
[0018] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0019] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0020] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0021] Example 1
[0022] See also Figure 1 As shown, a presetting method for embedded system login authentication includes:
[0023] Step S110, before the embedded system leaves the factory, an input instruction is obtained for each embedded system.
[0024] Step S120, obtaining a data packet corresponding to the embedded system from a preset storage location according to the input instruction, and parsing the data packet to obtain exclusive identity information for login authentication of the embedded system.
[0025] It is understandable that when developing an embedded system, it is generally necessary to set a corresponding account and password as the system's default login identity information for developers to operate the embedded system. Therefore, the existing technical solution is for developers to hard-code the account and password into the code and then compile it into the embedded system and its system image. In addition, in order to facilitate the operation of developers, the default login account and password are usually relatively simple, universal, and basically known to most developers.
[0026] Accordingly, when the embedded system leaves the factory, the login account and password need to be reset, so that the embedded systems shipped out of the factory are independent of each other, thereby ensuring that the login account and password of the embedded system are not simple or general information, and finally sold to users. In this regard, if the login account and password of the embedded system need to be modified again, the developer needs to modify the source code of the embedded system again, and the code modification work is more complicated and the workload is high, which seriously increases the workload of the developer. At the same time, modifying the source code also increases the possibility of error, which in turn leads to errors in the compilation process, and it is necessary to modify or test again, so as to fall into a negative cycle.
[0027] Furthermore, in actual applications, since embedded system development, testing, expansion and other projects are relatively heavy, enterprises usually divide multiple departments and groups to perform different functions to complete embedded system development, testing, expansion and other projects. For example, R&D team, testing team, security team, etc. Therefore, in actual work, when compiling an embedded system image, the software development team generally develops and provides the corresponding source code so that the CICD (Continuous Integration, Continuous Delivery, Continuous Deployment) team can compile and generate the system image of the embedded system.
[0028] Therefore, in this embodiment, in order to avoid the need to re-modify a whole set of source codes when modifying or replacing the login account and password of the embedded system, the login account and password of the embedded system, that is, the identity information of the embedded system login authentication, are separated from the code development used to compile the embedded system, and can be managed by other department groups. When the login account and password need to be modified or replaced, they can be directly provided to the CICD group for compilation. The software development group no longer needs to modify the code again. The computer device only needs to inject the login account and password into the code to complete the compilation when compiling the system image of the embedded system.
[0029] For example, the security group can specifically set or change the embedded system login account and password, and package the set embedded system login account and password and place them in a public network disk or shared document. The CICD group can directly download the embedded system login account and password from it, and then compile it according to the source code submitted by the software development group. When the login account and password need to be changed, the security group can directly repackage and upload it to the public network disk or shared document. The software development group no longer needs to modify the code. The CICD group can directly recompile the system image of the embedded system based on the new login account and password and the original source code.
[0030] It can be seen that compared with the software development team re-modifying the code, the security team only needs to re-provide the login account and password data package, which greatly reduces the workload of personnel. The CICD team can then inject the login account and password into the code and recompile it, which can also effectively avoid the possibility of errors in code modification.
[0031] Of course, the above is only a brief description of the technical effects of this solution using the functions of different department groups as an example. It can be understood that this solution specifically uses the computer equipment in the CICD group as the execution subject to execute steps S110 and S120. Specifically, in actual applications, the compilation of the code is completed in the server, and a sending process can be created in the server accordingly, which is used to pull the data packet from the specified storage location when receiving the staff input that requires recompilation or related instructions, and parse the data packet accordingly to obtain the exclusive identity information of the embedded system login authentication, that is, the corresponding login account and / or password. As for the data packet, it can be uploaded to the specified storage location by other department groups, and there are no excessive restrictions on this.
[0032] It should be noted here that in actual applications, corresponding instructions are usually issued synchronously to all embedded systems to recompile in order to modify or replace the login account and password. In order to ensure the mutual independence between the system images of the embedded systems finally compiled, each embedded system may correspond to an exclusive login account and password. In this regard, the sending process may pull a data packet corresponding to an embedded system from a specified storage location to parse and obtain its corresponding exclusive login account and password. For example, each embedded system and its corresponding data packet may be associated in the form of a number. When an embedded system numbered X needs to be recompiled, a data packet numbered X may be downloaded from the storage location. Alternatively, the data packet contains the login account and password of all embedded systems, which may also be associated in the form of a number. Without making too many restrictions on this, the modifications and embellishments made to the embodiments of the present invention by those skilled in the art without departing from the spirit of the present invention still fall within the scope of the invention application of the present invention.
[0033] It should also be noted that the embedded system development process mentioned above, that is, before the embedded system leaves the factory, includes both the primary development of the embedded system, for example, if the developer of the embedded system needs to modify the login account and password during development, the login account and password can be separated from the code file according to the above method, and the system image of the embedded system can be recompiled by obtaining the new login account and password and the code file; it also includes the secondary testing or expansion of the embedded system, for example, after the manufacturer purchases the embedded system from the developer of the embedded system, it further expands the business functions of the embedded system, and the corresponding tests, etc., and finally processes and packages the embedded system for further sale, and the login account and password can also be separated from the code file according to the above method, and the system image of the embedded system can be recompiled by obtaining the new login account and password and the code file. In practical applications, for example, when an automobile manufacturer develops an intelligent vehicle system, it can purchase the original embedded system from the developer of the embedded system, and further develop the embedded system in the vehicle field to adapt it to the intelligent vehicle system. Therefore, no matter it is the first or second development of the embedded system, it can be applied to the preset method of embedded system login authentication of the present application. The modifications and improvements made to the embodiments of the present invention by those skilled in the art without departing from the spirit of the present invention still fall within the scope of the invention application patent of the present invention.
[0034] Step S130, passing the exclusive identity information to the compilation process through inter-process communication or configuring it as a compilation environment variable, so that it can compile and generate the system image of the embedded system according to the exclusive identity information of the embedded system login authentication and the compiled code file.
[0035] In this embodiment, the above steps S110, 120, and 130 are all executed by a sending process in the computer device. However, since the compilation requires the creation of an additional compilation process, after obtaining the exclusive identity information of the embedded system login authentication, it is also necessary to send it to the compilation process to recompile the system image of the embedded system.
[0036] Therefore, a transmission method is required to enable the compilation process to obtain the exclusive identity information of the embedded system login authentication. In this regard, two preferred implementation schemes are provided. One is to send through IPC (Inter-Process Communication), that is, the sending process communicates with the compilation process and transmits the exclusive identity information of the embedded system login authentication to the compilation process; the other is to configure the exclusive identity information of the embedded system login authentication in the compilation environment variable, so that the compilation process can identify the exclusive identity information of the embedded system login authentication from the environment variable.
[0037] It can be understood that when the sending process and the compiling process are created in the same server, the sending process can send the exclusive identity information through IPC and configure the exclusive identity information in the environment variables. However, when the sending process and the compiling process are created in different servers, even if the sending process configures the exclusive identity information of the embedded system login authentication in the environment variables, the compiling process cannot recognize and obtain the environment variables in another server, so the exclusive identity information of the embedded system login authentication can only be sent to the compiling process through IPC so that it can recompile the system image.
[0038] Of course, how the sending process passes the exclusive identity information of the embedded system login authentication to the compiling process is not limited to the above two solutions, and no excessive restrictions are made on this. For example, the sending process and the compiling process can also be created as a general process, without the need to pass the login account and password of the embedded system. After obtaining the data packet and parsing the exclusive identity information of the embedded system login authentication, the compilation can be performed directly. Without departing from the spirit of the present invention, the modifications and embellishments made to the embodiments of the present invention by those skilled in the art still fall within the scope of the invention application of the present invention.
[0039] In addition, since the exclusive identity information includes the login account and password, in order to ensure its security, the password can be converted into ciphertext for transmission. Based on the above, the security group can specifically set or change the login account and password, and package the set embedded system login account and password and place them in a public network disk or shared document. Accordingly, before packaging the embedded system login account and password, the password can be encrypted to convert it into ciphertext. At the same time, since the packaged data packet needs to be uploaded to a public network disk or shared document, the data packet can also be encrypted, that is, the login account and the encrypted password are encrypted and packaged to generate a data packet to further enhance security.
[0040] It should also be noted that the identity information of the embedded system login authentication mentioned in this application, namely the login account and password, is mainly configured in the system image to identify whether the account and password entered by the user are accurate. Therefore, there is a certain demand for the security of the login account and password. Especially in practical applications, due to the different work functions of each department group, the login account and password may need to be transmitted and circulated between multiple department groups. If the password is transmitted in plain text, it will seriously undermine the security of the data. In this regard, in an encrypted form, only the staff of the security group know the embedded system login account and password. By building an automated process in the server to obtain the embedded system login account and password and compiling them, the security of the data information is guaranteed.
[0041] It should be noted that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0042] Example 2
[0043] See also Figure 2 As shown, the embodiment of the present application also provides a presetting method for embedded system login authentication, including:
[0044] Step S210, before the embedded system leaves the factory, for each embedded system, obtain its exclusive identity information for login authentication and compiled code files.
[0045] Step S220, injecting the exclusive identity information into the code file for compilation, and generating a system image of the embedded system to be independent of other embedded systems.
[0046] It is understandable that the method mentioned in this embodiment is executed by the compiling process accordingly, and after the sending process obtains the exclusive identity information of the embedded system login authentication, that is, the login account and password, it needs to be sent to the compiling process to recompile the system image of the embedded system. To this end, it can be sent through IPC (Inter-Process Communication), that is, the sending process communicates with the compiling process and transmits the login account and password to the compiling process; or the login account and password of the embedded system are configured in the compiling environment variables, that is, the sending process configures the login account and password of the embedded system in the compiling environment variables, so that the compiling process can identify the login account and password of the embedded system from the environment variables.
[0047] It should be noted here that when the sending process and the compiling process are created in the same server, the compiling process can receive the login account and password sent by the sending process through IPC, and can also extract the login account and password from the compilation environment variables; but when the compiling process and the sending process are located in different servers, the compiling process can only receive the embedded system login account and password sent by the sending process through IPC.
[0048] Of course, how the compilation process obtains the exclusive identity information of the embedded system login authentication is not limited to the above two solutions. It can be adjusted according to the actual situation. It only enables the sending process to pass the exclusive identity information of the embedded system login authentication to the compilation process in one way, and the compilation process can obtain it accordingly. There are no excessive restrictions on this. The modifications and embellishments made to the embodiments of the present invention by technical personnel in this field without departing from the spirit of the present invention still fall within the scope of the invention patent application of the present invention.
[0049] It should also be added that in order to ensure that the factory-exported embedded systems can be independent of each other, each embedded system needs to replace its corresponding exclusive identity information. Then, the compilation process can obtain the exclusive identity information of all embedded system login authentications in a unified manner when obtaining the exclusive identity information of the embedded system login authentication. If the code files of all embedded systems are consistent, different exclusive identity information can be injected into the code files respectively, thereby generating different system images of embedded systems; if the code files of all embedded systems are inconsistent, for example, the corresponding code files can be identified according to the numbers or identifiers of the exclusive identity information, and injected into them, thereby generating different system images of embedded systems. Of course, the exclusive identity information transmitted by the sending process can also be received in sequence, and injected into the corresponding code files in sequence for compilation, thereby completing the modification of all embedded system login accounts and passwords. There is no excessive restriction on this. The modifications and embellishments made to the embodiments of the present invention by those skilled in the art without departing from the spirit of the present invention still fall within the scope of the invention patent application of the present invention.
[0050] The code file has been prepared in advance before the login account and password are changed, and is stored in a designated database. The compilation process only needs to be re-downloaded. For example, the staff of the software development team submits it to a designated database after writing and testing, so that the code file for compilation of the embedded system can be automatically pulled or downloaded from the database. There are no excessive restrictions on this. The modifications and improvements made to the embodiments of the present invention by those skilled in the art without departing from the spirit of the present invention still fall within the scope of the invention patent application of the present invention.
[0051] Further, in order to protect the security information of the data, the password may be transmitted in the form of ciphertext. After the compilation process obtains the exclusive identity information of the embedded system login authentication, that is, the login account and password, it is necessary to convert the encrypted password into plain text and then compile it. Finally, the login account and the decrypted password are injected into the code file to compile and generate the system image of the embedded system. It can be understood here that in this embodiment, the login account and password are independent of the code file, and the corresponding position in the code file can be configured as a blank parameter in advance, so that when compiling the embedded system, only the login account and password need to be assigned to the blank parameters in the code file, and then the assigned code file is compiled into binary code to generate the system image of the embedded system. Therefore, after changing the login account and password, it is only necessary to re-assign the code file, and there is no need to re-modify a whole set of code files, and the assignment process is automatically performed by the compilation process, avoiding unnecessary manpower loss.
[0052] It should be noted that the exclusive identity information mentioned in this application may include a login account and / or a password. For example, you only need to change the password without changing the login account. The system image of the embedded system can also be recompiled according to the above method. The specific adjustments can be made according to actual needs. There is no restriction on this, and it all falls within the scope of protection of this application.
[0053] It should be noted that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0054] Example 3
[0055] An embodiment of the present application further provides a server for compiling an embedded system, comprising:
[0056] The sending process is used to obtain the data packet corresponding to the embedded system from a preset storage location, and parse the data packet to obtain the exclusive identity information of the embedded system login authentication, and pass the exclusive identity information to the compilation process through inter-process communication or by configuring it as a compilation environment variable.
[0057] The compilation process is used to receive the exclusive identity information of the embedded system login authentication sent by the sending process, or to extract the exclusive identity information of the embedded system login authentication from the compilation environment variables, and to obtain the code file compiled by the embedded system, and inject the exclusive identity information into the code file for compilation, so as to generate a system image of the embedded system independent of other embedded systems.
[0058] It is understandable that the sending process and the editing process can also be created in different servers, which can be adjusted according to actual needs.
[0059] It should be noted that the server for compiling the embedded system provided in the above embodiment and the preset method for embedded system login authentication provided in the above embodiments 1 and 2 belong to the same concept, and the sending process and compiling capital therein are used to execute the methods described in the above embodiments 1 and 2, and the specific methods have been described in detail in the above embodiments and will not be repeated here.
[0060] Example 4
[0061] See also Figure 3 As shown, an embodiment of the present application further provides an electronic device, comprising a memory 2, a processor 1, and a program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the program.
[0062] Among them, the memory includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory can be an internal storage unit of an electronic device in some embodiments, such as a mobile hard disk of the electronic device. The memory can also be an external storage device of an electronic device in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory can also include both an internal storage unit of the electronic device and an external storage device. The memory can be used not only to store application software and various types of data installed in the electronic device, but also to temporarily store data that has been output or is to be output.
[0063] In some embodiments, the processor may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory, and calling data stored in the memory.
[0064] The processor executes the operating system of the electronic device and various installed application programs. The processor executes the application programs to implement the steps in the above method embodiment.
[0065] Exemplarily, the program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of program instruction segments capable of completing specific functions, which are used to describe the execution process of the program in the electronic device.
[0066] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to perform part of the functions of the methods of various embodiments of the present invention.
[0067] In summary, the present invention provides a presetting method for embedded system login authentication, which can make the login account and password of the embedded system independent of the source code written by the developer, without being hard-coded into the code, but placed in a designated storage location by a fixed department group or staff, so that when the login account and password need to be changed, the new login account and password can be obtained from the designated storage location, injected into the original code file and recompiled, and the code does not need to be modified again, which reduces the workload of the personnel. At the same time, the password of the login account is set to be transmitted in ciphertext, which ensures that the plaintext password cannot be seen during the entire transmission process, thereby ensuring the security of the data information.
[0068] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A presetting method for embedded system login authentication, characterized in that: include: Before the embedded system leaves the factory, obtain the exclusive identity information and compiled code files for login authentication of each embedded system; The exclusive identity information is injected into the code file for compilation to generate a system image of the embedded system so as to be independent of other embedded systems.
2. The presetting method for embedded system login authentication according to claim 1, characterized in that: The steps of obtaining the exclusive identity information for logging into the embedded system include: Acquiring the exclusive identity information through inter-process communication; The exclusive identity information includes a login account and / or a password.
3. The presetting method for embedded system login authentication according to claim 1, characterized in that: The steps of obtaining the exclusive identity information for logging into the embedded system include: Obtaining the exclusive identity information from a compilation environment variable; The exclusive identity information includes a login account and / or a password.
4. The presetting method for embedded system login authentication according to claim 2 or 3, characterized in that: The steps of injecting the exclusive identity information into the code file for compilation to generate a system image of the embedded system include: When the exclusive identity information includes a login account and a password, decrypting the password in the exclusive identity information to obtain a plain text of the password; Inject the login account and password in plain text into the code file to assign the login account and password in plain text to the corresponding blank parameters in the code file; The assigned code file is compiled into binary code to generate a system image of the embedded system.
5. A presetting method for embedded system login authentication, characterized in that: include: Before the embedded system leaves the factory, obtain input instructions for each embedded system; Obtaining a data packet corresponding to the embedded system from a preset storage location according to an input instruction, and parsing the data packet to obtain exclusive identity information for login authentication of the embedded system; The exclusive identity information is transmitted to the compilation process through inter-process communication or configured as a compilation environment variable, so that the system image of the embedded system can be compiled based on the exclusive identity information of the embedded system login authentication and the compiled code file.
6. The presetting method for embedded system login authentication according to claim 5, characterized in that: The data packet is generated according to the following steps and sent to a preset storage location: The data packet is generated by encrypting and packaging according to the exclusive identity information preset by the embedded system.
7. The presetting method for embedded system login authentication according to claim 6, characterized in that: The steps of encrypting and packaging the data packet to generate the data packet according to the exclusive identity information preset by the embedded system include: When the exclusive identity information includes a login account and a password, encrypting the password to convert it into ciphertext; The login account and the encrypted password are encrypted and packaged to generate the data packet.
8. A server for compiling an embedded system, characterized in that: include: The sending process is used to obtain a data packet corresponding to the embedded system from a preset storage location, parse the data packet to obtain exclusive identity information for login authentication of the embedded system, and transmit the exclusive identity information to the compiling process through an inter-process communication method or by configuring it as a compiling environment variable; The compilation process is used to receive the exclusive identity information of the embedded system login authentication sent by the sending process, or to extract the exclusive identity information of the embedded system login authentication from the compilation environment variables, and to obtain the code file compiled by the embedded system, and inject the exclusive identity information into the code file for compilation, so as to generate a system image of the embedded system independent of other embedded systems.
9. An electronic device, characterized in that: The method comprises a processor, wherein the processor is coupled to a memory, wherein the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The invention comprises a program, which, when being executed on a computer, causes the computer to execute the method according to any one of claims 1 to 7.