CN110990021A - Software running method and device, main control board and frame type equipment - Google Patents

Software running method and device, main control board and frame type equipment Download PDF

Info

Publication number
CN110990021A
CN110990021A CN201911193996.1A CN201911193996A CN110990021A CN 110990021 A CN110990021 A CN 110990021A CN 201911193996 A CN201911193996 A CN 201911193996A CN 110990021 A CN110990021 A CN 110990021A
Authority
CN
China
Prior art keywords
software
product
product identifier
read
main control
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.)
Pending
Application number
CN201911193996.1A
Other languages
Chinese (zh)
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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911193996.1A priority Critical patent/CN110990021A/en
Publication of CN110990021A publication Critical patent/CN110990021A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

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

Abstract

The application provides a software running method and device, a main control board and frame type equipment. The method is applied to a main control board of frame type equipment, and comprises the following steps: when an operating system is started, acquiring a product identifier from a read compiled file, wherein the compiled file supports code logic of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies the product type of one software; reading a designated field matched with the product identifier from an EEPROM (electrically erasable programmable read-Only memory) associated with the main control board, wherein the designated field of the EEPROM stores the product identifier of software; acquiring relevant data of software operation according to the read specified field; the software is run according to the relevant data. A plurality of software codes generate a compiling file, so that the compiling time is saved, and the occupied space is reduced; the software can be quickly operated by matching the specified field with the product identifier in the compiled file; when software needs to be switched, the switching can be realized by modifying the designated field, the operation is convenient, and the switching efficiency is improved.

Description

Software running method and device, main control board and frame type equipment
Technical Field
The application relates to the technical field of software development, in particular to a software running method and device, a main control board and frame type equipment.
Background
In the related art, when a service using software on a frame device is used, the software needs to be compiled to generate a compiled file, and the compiled file is run to start the service using the software. And if the service using different software needs to be switched, recompiling to generate a new compiled file is needed. However, this requires a lot of compilation time, occupies a large memory space, and has low switching convenience.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a software running method, a device, a main control board and a frame type device.
According to a first aspect of the embodiments of the present application, there is provided a software running method applied to a main control board of a frame device, where the method includes:
when an operating system is started, acquiring a product identifier from a read compiled file, wherein the compiled file supports code logic of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies the product type of one software;
reading a designated field matched with the product identifier from an EEPROM (electrically erasable programmable read-Only memory) associated with the main control board, wherein the designated field of the EEPROM stores the product identifier of software;
acquiring relevant data of the software operation according to the read specified field;
and operating the software according to the related data.
In an exemplary embodiment, the method further comprises:
and if the EEPROM does not have the designated field matched with the product identifier, reading the designated field from a designated package file, wherein the package file stores the product identifier of the software according to a custom format.
In an exemplary embodiment, the location of the custom format is at a header of the package file.
In an exemplary embodiment, the method further comprises:
and when the product identification stored in the designated field of the EEPROM is modified, restarting an operating system to read the modified product identification from the EEPROM for software running.
In an exemplary embodiment, the method further comprises:
and when the product identification stored in the designated field of the EEPROM is damaged and the corresponding designated field in the package file is modified, restarting an operating system to read the modified product identification from the package file for software operation.
In an exemplary embodiment, the step of obtaining the relevant data of the software operation according to the read specified field comprises:
and the read designated field is transmitted to a global variable of a user state corresponding to the software, and then transmitted to a global variable of a kernel state where the operating system is located, so that the product type of the software is determined according to the product identifier of the software, and relevant data corresponding to the product type of the software is obtained.
According to a second aspect of embodiments of the present application, there is provided a software running apparatus, including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a product identifier from a read compiled file when an operating system is started, the compiled file supports code logic of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies the product type of one software;
the reading module is used for reading a specified field matched with the product identifier from an EEPROM (electrically erasable programmable read-only memory) associated with the main control board, and the specified field of the EEPROM stores the product identifier of software;
the second acquisition module is used for acquiring the relevant data of the software operation according to the read specified field;
and the running module is used for running the software according to the related data.
In an exemplary embodiment, the reading module is further configured to read the specified field from a specified package file if the specified field matching the product identifier does not exist in the EEPROM, and the package file stores the product identifier of one piece of software according to a custom format.
According to a third aspect of the embodiments of the present application, there is provided a main control board, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the software running method described in any of the above embodiments when executing the program.
According to a fourth aspect of the embodiments of the present application, there is provided a frame device, including a main control board and a line card, where the main control board is in communication connection with the line card, the line card is used to load a compiled file of a plurality of software, and the main control board is used to implement the steps of the software running method in any of the above embodiments.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the technical scheme, the code logic of a plurality of pieces of software which can be run by the frame type equipment is compiled into a compiled file, and the compiled file is provided with product identifiers of the plurality of pieces of software, wherein the product identifiers are used for describing the uniqueness of the product type of the piece of software. When the user determines that a piece of software is required to be operated and used at present, the product identifier of the software can be filled in a designated field in the EEPROM associated with the main control board of the boxed device. When an operating system is started, a main control board of the frame type device reads a compiled file to obtain product identifications of a plurality of pieces of software, matches the product identifications of the plurality of pieces of software with a specified field in a related EEPROM, and if the specified field is matched with one of the product identifications, obtains related data required by running of the corresponding software according to the specified field, and runs the software according to the related data. Because the code logic of the plurality of pieces of software of the frame type device is compiled through the compiler to generate one compiled file, a plurality of files do not need to be compiled, the compiling time can be greatly saved, and the occupied space of the compiled file is reduced. The user fills the product identification of the software required to be operated by the frame type equipment into the designated field of the EEPROM associated with the main control board, and after the product identification is matched with the product identification in the compiled file, the related data operation software can be obtained, so that the technical effect of quickly operating the software can be achieved; and when the software needs to be switched, a user can modify the designated field of the EEPROM, modify the designated field into the product identifier of the software to be switched, and run new software by acquiring related data after matching, so that the software switching is realized, recompilation is not required to be performed due to the need of switching the software, the switching operation is convenient, and the switching efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart illustrating a software running method according to an exemplary embodiment of the present application.
Fig. 2 is a flowchart illustrating another software running method according to an exemplary embodiment of the present application.
Fig. 3 is a block diagram illustrating a software operating apparatus according to an exemplary embodiment of the present application.
Fig. 4 is a block diagram of a main control board according to an exemplary embodiment of the present application
Fig. 5 is a block diagram illustrating a configuration of a block device according to an exemplary embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The following describes in detail a software operation method, apparatus, main control board, and frame device according to the present application with reference to the accompanying drawings. The features of the following examples and embodiments may be combined with each other without conflict.
Fig. 1 is a flowchart of a software running method shown in an exemplary embodiment of the present application, where the method may be applied to a main control board of a frame device, where the frame device may be a switch, a firewall device, and the like, and the present application is not limited specifically. The frame device generally includes a main control board and a line card, where the main control board is communicatively connected to the line card, the main control board is used to provide management and control functions of the frame device, and the line card may also be referred to as a service processing board and is used to provide services, and the software operating method of the present application may be applied to the main control board. As shown in fig. 1, the software running method includes the following steps 101 to 104:
step 101, when an operating system is started, obtaining a product identifier from a read compiled file, wherein the compiled file supports code logics of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies a product type of one of the software.
In step 101, when the main control board starts the operating system, the compiled file may be read by a boot program, and a plurality of software product identifiers included in the compiled file are obtained, where the compiled file supports code logics of a plurality of software, or the code logics of the plurality of software are compiled into one compiled file, and the compiled file corresponding to each software is identified by setting a product identifier in the compiled file, where the product identifier may be used to describe uniqueness of a product type of the software. The main control board starts the operating system, and the frame type device can be initialized through the bootstrap program.
And 102, reading a specified field matched with the product identifier from an EEPROM associated with the main control board, wherein the specified field of the EEPROM stores the product identifier of a piece of software.
Before step 102, the user may fill in a designated field in an EEPROM (Electrically erasable programmable Read Only Memory) associated with the main control board with a product identifier of the software to be run. In step 102, the main control board may read the EEPROM to obtain the designated field, and match the product identifiers of the plurality of pieces of software read from the compiled file, and if the designated field is successfully matched with one of the product identifiers, it indicates that the compiled file includes the compiled file of the piece of software that the user wants to run.
And 103, acquiring relevant data of the software operation according to the read specified field.
In step 103, relevant data of the software operation can be obtained according to the read specified field, so as to operate the software according to the relevant data. Specifically, the read specified field is transmitted to the global variable of the user state corresponding to the software, and then transmitted to the global variable of the kernel state where the operating system is located, so as to determine the product type of the software according to the product identifier of the software, and acquire the related data corresponding to the product type of the software, so that the software can be completely run.
And 104, operating the software according to the related data.
In step 104, the main control board may drive the corresponding hardware according to the global variable, initialize the hardware, and issue the corresponding configuration, thereby completing the operation of the software.
In the method provided by this embodiment, code logics of a plurality of pieces of software that the block device can run are compiled into one compiled file, and a product identifier of the plurality of pieces of software is set in the compiled file, where the product identifier is used to describe the uniqueness of a product type of the piece of software. When the user determines that a piece of software is required to be operated and used at present, the product identifier of the software can be filled in a designated field in the EEPROM associated with the main control board of the boxed device. When an operating system is started, a main control board of the frame type device reads a compiled file to obtain product identifications of a plurality of pieces of software, matches the product identifications of the plurality of pieces of software with a specified field in a related EEPROM, and if the specified field is matched with one of the product identifications, obtains related data required by running of the corresponding software according to the specified field, and runs the software according to the related data. Because the code logic of the plurality of pieces of software of the frame type device is compiled through the compiler to generate one compiled file, a plurality of files do not need to be compiled, the compiling time can be greatly saved, and the occupied space of the compiled file is reduced. The user fills the product identification of the software required to be operated by the frame type equipment into the designated field of the EEPROM associated with the main control board, and after the product identification is matched with the product identification in the compiled file, the related data operation software can be obtained, so that the technical effect of quickly operating the software can be achieved; and when the software needs to be switched, a user can modify the designated field of the EEPROM, modify the designated field into the product identifier of the software to be switched, and run new software by acquiring related data after matching, so that the software switching is realized, recompilation is not required to be performed due to the need of switching the software, the switching operation is convenient, and the switching efficiency is improved.
In an exemplary embodiment of the application, Cyclic Redundancy Check (CRC) is used to Check matching between the designated field and the product identifier, so that whether an error occurs can be detected, and data accuracy is improved.
In an exemplary embodiment of the application, if there is no designated field matching the product identifier in the EEPROM, the designated field is read from a designated package file, and the package file stores the product identifier of one software according to a custom format. The packing file is an executable file generated by packing the synthesized compiled file, and the product identification of the software to be operated is stored in the packing file according to a custom format. And if the specified field read from the EEPROM is not matched with the plurality of product identifications of the compiled file, reading the specified field in the specified packed file, and acquiring the product identification of the software to be operated through the specified field of the packed file. In an exemplary embodiment of the present application, the location of the custom format is in a header of the package file. That is to say, the product identifier of the software to be run is stored in the file header of the package file, and the main control board reads the specified field of the file header, so that the product identifier of the software to be run can be obtained.
An embodiment of reading the specified field of the EEPROM without matching the product identifier is described below with reference to fig. 2, and fig. 2 is a flowchart of another software running method shown in an exemplary embodiment of the present application. As shown in fig. 2, the software running method includes the following steps 201 to 205:
step 201, when starting an operating system, obtaining a product identifier from a read compiled file, where the compiled file supports code logic of a plurality of software and includes a plurality of product identifiers, and the product identifier uniquely identifies a product type of one of the software.
Step 202, reading a designated field from the EEPROM associated with the main control board, and determining whether the designated field matches the product identifier, wherein the designated field of the EEPROM stores a product identifier of software, and if the designated field matches the product identifier, step 204 is executed; otherwise, step 203 is executed.
Step 203, reading the designated field from a designated package file, wherein the package file stores a product identifier of software according to a custom format, and executing step 204.
And step 204, acquiring relevant data of the software operation according to the read specified field.
Step 205, operating the software according to the relevant data.
In the above method provided in the embodiment of fig. 2, when the main control board of the frame device starts the operating system, the main control board reads the compiled file to obtain the product identifiers of the plurality of included software, matches the obtained product identifiers of the plurality of software with the specified field in the associated EEPROM, and if the specified field is matched with one of the product identifiers, obtains the relevant data required by the corresponding software according to the specified field, and runs the software according to the relevant data; and if the specified field acquired from the EEPROM is not matched with the plurality of product identifications in the compiled file, acquiring the product identification of the software to be operated from the packed file, acquiring related data required by the operation of the corresponding software according to the product identification, and operating the software according to the related data. In this way, it is ensured that the software can be run.
In an exemplary embodiment of the present application, the software running method further includes: and when the product identification stored in the designated field of the EEPROM is modified, restarting an operating system to read the modified product identification from the EEPROM for software running. When the user needs to switch the software operated by the box type device, the stored product identification can be modified in the designated field of the main control board EEPROM. Therefore, after the main control board recognizes that the designated field of the EEPROM is modified, the operating system is restarted, the modified product identification is read, the corresponding relevant data required by the running of the software is obtained according to the modified product identification, and the software is run according to the relevant data, so that the software is switched.
In an exemplary embodiment of the present application, the software running method further includes: and when the product identification stored in the designated field of the EEPROM is damaged and the corresponding designated field in the package file is modified, restarting an operating system to read the modified product identification from the package file for software operation. It should be understood that the corruption of the product identification stored in the designated field of the EEPROM includes two cases: one case is that the product identification stored in the specified field of the EEPROM is modified, but the modified specified field does not match the product identifications of the plurality of pieces of software included in the compiled file; in another case, the product id stored in the designated field of the EEPROM is deleted and cannot be read and matched with the product ids of the plurality of pieces of software included in the compiled file. Therefore, whether the designated field corresponding to the read packed file is modified or not is adopted, if so, the operating system is restarted, and new software is operated according to the modified product identification read by the packed file, so that the software switching is realized.
In order that the present application may be more clearly understood, a specific application example is described below. One frame type device can run software A, software B and software C of different product types, wherein the main service of the software A is the shunting of large flow, the main service of the software B is the blocking of certain flow, and the main service of the software C is the attack of resisting various messages. Each software is assigned a product identification: the product identifier of the software A is 0xff000000, the product identifier of the software B is 0xff000001, the product identifier of the software C is 0xff000002, codes of the software A, B, C are compiled through a compiling link tool to generate a compiled file, and the compiled file further comprises the product identifier of the software A, B, C. And packaging the compiled file to generate a packaged file, wherein the file header of the packaged file can store the product identification of the software to be operated. The package file can be loaded into the memory card of the main control board through the bootstrap program.
The user can fill in the product identifier of the software to be operated in the specified field device _ type _ info of the EEPROM associated with the main control board, or fill in the product identifier of the software to be operated in the file header of the package file. For example, the product identification of software A is filled in 0xff 000000.
A user can operate the start frame type equipment, when an operating system is started, the main control board firstly obtains the product identification of the included software A, B, C from the read compiling file, reads whether the product identification stored in the specified field device _ type _ info is matched with the product identification obtained from the compiling file or not from the associated EEPROM and carries out CRC (cyclic redundancy check), and if the check is correct, the product identification is stored at 0xff 000000; and if the error is checked, calling a fread function to read the file header of the packaging file, and acquiring the product identifier 0xff 000000. The product identifier 0xff000000 is assigned to the global variable of the user state of the software A, and then the global variable of the user state is assigned to the global variable of the kernel state, so that the whole frame type device is ensured to obtain the product identifier of the software A to be operated, obtain related data of the software A to be operated, operate the software A according to the related data, and perform configuration and initialization, thereby being capable of using the high-flow shunting service of the software A.
When a user needs to switch software, a product identifier and a file header of a package file can be modified in a specified field device _ type _ info of an EEPROM associated with a main control board, for example, the product identifier 0xff000000 of software A in the EEPROM is modified to be 0xff000002 of software C, an operating system is restarted, the specified field is read from the associated EEPROM and subjected to matching verification, the verification is correct, and the product identifier 0xff000002 is stored; if the read specified field device _ type _ info is not 0xff000002, or the user deletes the original 0xff000000 and does not fill in a new product identifier, calling a fread function to read the file header of the package file to obtain the product identifier 0xff 000002. The product identifier 0xff000002 is assigned to the global variable of the user state of the software C, and then the global variable of the user state is assigned to the global variable of the kernel state, so that the whole frame type device is ensured to obtain the product identifier of the software C to be operated, obtain the related data of the software C to be operated, operate the software C according to the related data, and perform configuration and initialization, thereby using the service of the software C for resisting message attack.
Fig. 3 is a block diagram illustrating a software running apparatus according to an exemplary embodiment of the present disclosure. As shown in fig. 3, the apparatus 30 includes:
a first obtaining module 310, configured to obtain a product identifier from a read compiled file when an operating system is started, where the compiled file supports code logic of a plurality of pieces of software and includes a plurality of product identifiers, and the product identifier uniquely identifies a product type of one piece of software;
a reading module 320, configured to read a specified field matching the product identifier from an EEPROM associated with the main control board, where the specified field of the EEPROM stores a product identifier of software;
a second obtaining module 330, configured to obtain, according to the read specified field, relevant data of the software operation;
an operation module 340, configured to operate the software according to the relevant data.
In an exemplary embodiment of the application, the reading module is further configured to, if there is no specified field matching the product identifier in the EEPROM, read the specified field from a specified package file, where the package file stores a product identifier of software according to a custom format.
In an exemplary embodiment of the present application, the location of the custom format is in a header of the package file.
In an exemplary embodiment of the present application, the apparatus further includes:
and the starting module is used for restarting the operating system after the product identifier stored in the designated field of the EEPROM is modified so as to read the modified product identifier from the EEPROM for software running.
In an exemplary embodiment of the application, the starting module is further configured to restart the operating system when the product identifier stored in the designated field of the EEPROM is damaged and the corresponding designated field in the package file is modified, so as to read the modified product identifier from the package file and execute software operation.
In an exemplary embodiment of the application, the second obtaining module is specifically configured to transmit the read specified field to a global variable of a user state corresponding to the software, and then to transmit the read specified field to a global variable of a kernel state where the operating system is located, so as to determine a product type of the software according to a product identifier of the software, and obtain related data corresponding to the product type of the software. The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
Fig. 4 is a block diagram of a structure of a main control board according to an exemplary embodiment of the present disclosure. As shown in fig. 4, the main control board 40 includes:
a processor;
a memory for storing a computer program executable by the processor;
wherein execution of the computer program by the processor effects the steps of:
when an operating system is started, acquiring a product identifier from a read compiled file, wherein the compiled file supports code logic of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies the product type of one software;
reading a designated field matched with the product identifier from an EEPROM (electrically erasable programmable read-Only memory) associated with the main control board, wherein the designated field of the EEPROM stores the product identifier of software;
acquiring relevant data of the software operation according to the read specified field;
and operating the software according to the related data.
The present application further provides a frame device, and fig. 5 is a block diagram illustrating a structure of the frame device according to an exemplary embodiment of the present application. As shown in fig. 5, the frame device 50 includes a main control board 510 and a line card 520, the main control board 510 is communicatively connected to the line card 520, the line card 520 is configured to load a compiled file of a plurality of software, and the main control board 510 is configured to implement the following steps:
when an operating system is started, acquiring a product identifier from a read compiled file, wherein the compiled file supports code logic of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies the product type of one software;
reading a designated field matched with the product identifier from an EEPROM (electrically erasable programmable read-Only memory) associated with the main control board, wherein the designated field of the EEPROM stores the product identifier of software;
acquiring relevant data of the software operation according to the read specified field;
and operating the software according to the related data.
The present application further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
when an operating system is started, acquiring a product identifier from a read compiled file, wherein the compiled file supports code logic of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies the product type of one software;
reading a designated field matched with the product identifier from an EEPROM (electrically erasable programmable read-Only memory) associated with the main control board, wherein the designated field of the EEPROM stores the product identifier of software;
acquiring relevant data of the software operation according to the read specified field;
and operating the software according to the related data.
Embodiments of the present application may take the form of a computer program product embodied on one or more readable media having program code embodied therein, including but not limited to disk storage, CD-ROM, optical storage, and the like. Computer-usable readable media, which include both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer readable media include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), erasable programmable read only memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A software running method is characterized in that the method is applied to a main control board of a frame type device, and comprises the following steps:
when an operating system is started, acquiring a product identifier from a read compiled file, wherein the compiled file supports code logic of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies the product type of one software;
reading a designated field matched with the product identifier from an EEPROM (electrically erasable programmable read-Only memory) associated with the main control board, wherein the designated field of the EEPROM stores the product identifier of software;
acquiring relevant data of the software operation according to the read specified field;
and operating the software according to the related data.
2. The software running method according to claim 1, further comprising:
and if the EEPROM does not have the designated field matched with the product identifier, reading the designated field from a designated package file, wherein the package file stores the product identifier of the software according to a custom format.
3. The software running method of claim 2, wherein the location of the custom format is in a header of the package file.
4. A method of operating software according to any one of claims 1 to 3, characterised in that the method further comprises:
and when the product identification stored in the designated field of the EEPROM is modified, restarting an operating system to read the modified product identification from the EEPROM for software running.
5. The software running method according to claim 2 or 3, wherein the method further comprises:
and when the product identification stored in the designated field of the EEPROM is damaged and the corresponding designated field in the package file is modified, restarting an operating system to read the modified product identification from the package file for software operation.
6. The method for operating software according to claim 1, wherein the step of obtaining the data related to the software operation according to the read specified field comprises:
and the read designated field is transmitted to a global variable of a user state corresponding to the software, and then transmitted to a global variable of a kernel state where the operating system is located, so that the product type of the software is determined according to the product identifier of the software, and relevant data corresponding to the product type of the software is obtained.
7. A software running apparatus, characterized in that the apparatus comprises:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a product identifier from a read compiled file when an operating system is started, the compiled file supports code logic of a plurality of software and comprises a plurality of product identifiers, and the product identifier uniquely identifies the product type of one software;
the reading module is used for reading a specified field matched with the product identifier from an EEPROM (electrically erasable programmable read-only memory) associated with the main control board, and the specified field of the EEPROM stores the product identifier of software;
the second acquisition module is used for acquiring the relevant data of the software operation according to the read specified field;
and the running module is used for running the software according to the related data.
8. The software running device of claim 7, wherein the reading module is further configured to read the specified field from a specified package file if the specified field matching the product identifier does not exist in the EEPROM, and the package file stores the product identifier of the software in a custom format.
9. A main control board comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the software execution method of any one of claims 1 to 6 when executing the program.
10. A frame device, comprising a main control board and a line card, wherein the main control board is communicatively connected to the line card, and the line card is configured to load a compiled file of a plurality of software, and the main control board is configured to implement the steps of the software running method according to any one of claims 1 to 6.
CN201911193996.1A 2019-11-28 2019-11-28 Software running method and device, main control board and frame type equipment Pending CN110990021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911193996.1A CN110990021A (en) 2019-11-28 2019-11-28 Software running method and device, main control board and frame type equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911193996.1A CN110990021A (en) 2019-11-28 2019-11-28 Software running method and device, main control board and frame type equipment

Publications (1)

Publication Number Publication Date
CN110990021A true CN110990021A (en) 2020-04-10

Family

ID=70087861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911193996.1A Pending CN110990021A (en) 2019-11-28 2019-11-28 Software running method and device, main control board and frame type equipment

Country Status (1)

Country Link
CN (1) CN110990021A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114978A (en) * 2020-08-20 2020-12-22 厦门汉印电子技术有限公司 Electronic scale data updating method, device, equipment and readable storage medium
CN112350771A (en) * 2020-11-27 2021-02-09 国家计算机网络与信息安全管理中心 Main control board soft start processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309687A (en) * 2012-03-09 2013-09-18 联想(北京)有限公司 Electronic equipment and application program starting method thereof
CN104298533A (en) * 2014-11-06 2015-01-21 北京奇虎科技有限公司 Method, device and equipment for customizing software installation package
CN105786499A (en) * 2016-02-25 2016-07-20 汉柏科技有限公司 Software packaging method and system
CN106537332A (en) * 2014-06-13 2017-03-22 查尔斯斯塔克德拉珀实验室公司 Systems and methods for software analytics
CN107729083A (en) * 2014-04-30 2018-02-23 华为技术有限公司 The method and embedded device of a kind of load driver program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309687A (en) * 2012-03-09 2013-09-18 联想(北京)有限公司 Electronic equipment and application program starting method thereof
CN107729083A (en) * 2014-04-30 2018-02-23 华为技术有限公司 The method and embedded device of a kind of load driver program
CN106537332A (en) * 2014-06-13 2017-03-22 查尔斯斯塔克德拉珀实验室公司 Systems and methods for software analytics
CN104298533A (en) * 2014-11-06 2015-01-21 北京奇虎科技有限公司 Method, device and equipment for customizing software installation package
CN105786499A (en) * 2016-02-25 2016-07-20 汉柏科技有限公司 Software packaging method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114978A (en) * 2020-08-20 2020-12-22 厦门汉印电子技术有限公司 Electronic scale data updating method, device, equipment and readable storage medium
CN112350771A (en) * 2020-11-27 2021-02-09 国家计算机网络与信息安全管理中心 Main control board soft start processing method and device

Similar Documents

Publication Publication Date Title
CN107506221B (en) Application program upgrading method, device and equipment
CN107608757B (en) Container-based isolation processing method and related equipment
CN112131099B (en) Version upgrading test method and device
CN107102944B (en) Analysis method and device for calling function
CN109710317B (en) System starting method and device, electronic equipment and storage medium
US20180059978A1 (en) Virtual disk expansion method and apparatus
CN107392018B (en) Application program shelling method and device
CN110990021A (en) Software running method and device, main control board and frame type equipment
CN109614265A (en) The double copies system and its configuration starting method of intelligent inertial navigation sensor-based system
CN110716845A (en) Method for reading log information of Android system
CN111104158A (en) Software packaging method and device, computer equipment and storage medium
CN104216771A (en) Restarting method and device for software program
CN112835587A (en) Compiling integration method and device
CN110471828B (en) Operating system testing method, device and equipment thereof
CN111625225A (en) Program specified data output method and device
CN114358936A (en) Intelligent contract operation method based on micro-service block chain
CN112657196A (en) Resource updating method and device, computer equipment and readable storage medium
CN114371852B (en) Compiling method and device
CN106469102B (en) Software regeneration method and device in Java Virtual Machine
CN116700840B (en) File execution method, device, electronic equipment and readable storage medium
CN115858012B (en) Program variable configuration method, device, electronic equipment and storage medium
CN116303067B (en) Testing method, device, equipment and medium based on cloud testing platform
CN109446091B (en) Business entity object testing method and device
CN114281396A (en) Deployment method and device of application system resources and computer readable storage medium
CN116679961A (en) Program upgrading method and device and electronic equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410