Control method and equipment of automation system based on pre-start execution environment and storage medium
Through the automated system of the pre-boot execution environment, the terminal device automatically obtains and installs the image code and its configuration file, solving the problem of incorrect installation caused by manual image selection and achieving efficient system installation.
Patent Information
- Application Number
- CN202510659491.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-26
AI Technical Summary
In the prior art, when installing a shipping system on an electronic product production line, manual installation is required by selecting images from a large number of lists. This is prone to incorrect installation and configuration mismatches, resulting in low system installation efficiency.
Through an automated system based on the pre-boot execution environment, the terminal device obtains and installs the startup software package sent by the server, loads the image code written in the image version information file, obtains and loads the corresponding configuration file, generates installation parameters, and automatically executes the system installation process of the image version.
Improves the efficiency of system installation, avoids incorrect installation and configuration mismatch caused by manual image selection, and ensures the accuracy and efficiency of the installation process.
Smart Images

Figure CN120704699A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a control method, device, and storage medium for an automation system based on a pre-boot execution environment. Background Art
[0002] In modern manufacturing, especially on the production lines of electronic products, automation and efficiency are crucial. In related technologies, image codes are printed on labels and attached to products. When installing the shipping system, the system relies on manual selection of images from a large list for installation. This is prone to incorrect installation and configuration mismatches, resulting in inefficient system installation.
[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide a control method, device and storage medium for an automated system based on a pre-boot execution environment, aiming to solve the technical problem that when installing a shipped system, manual selection of images from a large number of lists is required, which is prone to incorrect installation and configuration mismatch, resulting in low system installation efficiency.
[0005] To achieve the above objectives, the present application proposes a control method for an automation system based on a pre-boot execution environment, the method comprising:
[0006] The terminal device obtains and installs the startup software package sent by the server according to the startup instruction;
[0007] Based on the read request triggered by the startup software package, load the image code written into the file with the image version information;
[0008] According to the mirror code, obtain and load the configuration file corresponding to the mirror code from the server, and generate installation parameters corresponding to the mirror code;
[0009] According to the installation parameters, the system installation process of the image version is executed in combination with the image version information written into the file.
[0010] In one embodiment, in response to a test instruction triggered by the terminal device, test image version information corresponding to the test image code is obtained from the manufacturing execution system and written into a file;
[0011] According to the test instruction, the test image version information is written into a file, the terminal device is tested, and a test result is generated;
[0012] The test image version information writing file whose test result meets the preset requirement is used as the image version information writing file.
[0013] In one embodiment, based on the startup instruction, the terminal device is triggered to send a request for IP allocation and the startup software package to the server;
[0014] The server allocates an IP address to the terminal device and specifies the server address and file path based on the dynamic host configuration protocol;
[0015] Based on the IP address and the server address, in combination with the Simple File Transfer Protocol, the startup software package is transmitted to the terminal device via the file path;
[0016] The terminal device receives and installs the startup software package.
[0017] In one embodiment, the startup software package sends a configuration file request to the server based on the mirror code;
[0018] The server sends the configuration file corresponding to the configuration file request to the terminal device based on the configuration file request;
[0019] The terminal device receives and loads the configuration file, and generates the installation parameters corresponding to the image version in combination with the operating parameters of the terminal device.
[0020] In one embodiment, based on the installation parameters, the environmental parameters of the terminal device are configured to obtain an updated installation environment;
[0021] Based on the installation environment, the system installation of the mirror version is completed.
[0022] In one embodiment, when the terminal device fails to read the image code of the hard disk, or the terminal device fails to load the configuration file corresponding to the image version information write file, a read exception report is generated;
[0023] According to the reading exception report, an interface for manually inputting a mirror code is generated.
[0024] In one embodiment, an association table of the image version and the image code is constructed;
[0025] According to the association table, the image versions are sequentially imported into the server;
[0026] According to the image code corresponding to the image version, the configuration file named after the image code is created on the server.
[0027] In one embodiment, the mirror code is filled in the work order information on the manufacturing execution system side;
[0028] The terminal device corresponding to the terminal device obtains the mirror code corresponding to the terminal device from the manufacturing execution system and stores it in the hard disk.
[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes an automation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the control method of the automation system based on the pre-boot execution environment as described above.
[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the control method of the automation system based on the pre-boot execution environment as described above are implemented.
[0031] The present application provides a control method for an automation system based on a pre-boot execution environment, comprising the following steps: the terminal device obtains and installs a startup software package sent by the server according to a startup instruction; based on a read request triggered by the startup software package, loads the mirror code written into a file with the mirror version information; according to the mirror code, obtains and loads a configuration file corresponding to the mirror code from the server, and generates installation parameters corresponding to the mirror code; according to the installation parameters, in combination with the mirror version written into the file with the mirror version information, executes the system installation process of the mirror version. By setting the mirror code in the hard disk, using the mirror code to obtain the mirror version information and write it into the file and configuration file, and then automatically completing the installation of the corresponding mirror version, the efficiency of system installation is improved.
[0032] To sum up, this application uses a production testing tool to write the image code corresponding to the terminal device into the hard disk, so that the terminal device can read the image code, obtain the image version information and write it into files and configuration files, thereby completing the installation of the corresponding image version of the terminal device. It overcomes the technical problem of relying on manual selection of images from a large number of lists for installation when installing the shipped system, which is prone to incorrect installation and configuration mismatch, resulting in low efficiency of system installation, and improves the efficiency of system installation. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0035] Figure 1 This is a flow chart of a first embodiment of a control method for an automation system based on a pre-boot execution environment of the present application;
[0036] Figure 2 This is a flow chart of a second embodiment of a control method for an automation system based on a pre-boot execution environment of the present application;
[0037] Figure 3 This is a flowchart of a third embodiment of a control method for an automation system based on a pre-boot execution environment of the present application;
[0038] Figure 4 This is a flow chart of a fourth embodiment of a control method for an automation system based on a pre-boot execution environment of the present application;
[0039] Figure 5 This is the abnormality judgment diagram for this application;
[0040] Figure 6 Configure the environment application diagram for this application;
[0041] Figure 7 This is the installation flow chart for the mirror version of this application;
[0042] Figure 8 This is a structural diagram of the automation equipment for this application.
[0043] The purpose, features and advantages of this application will be further explained with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0045] In the related art, a label with an image code is printed and affixed to the product. When installing the shipped system, the system relies on manual selection of the image from a large number of lists for installation. This is prone to incorrect installation and configuration mismatch, resulting in low system installation efficiency.
[0046] The present application provides a solution: first, the terminal device obtains and installs the startup software package sent by the server according to the startup instruction; then, based on the read request triggered by the startup software package, the image code written in the file with the image version information is loaded; then, based on the image code, the configuration file corresponding to the image code is obtained and loaded from the server, and the installation parameters corresponding to the image code are generated; finally, according to the installation parameters and the image version written in the file with the image version information, the system installation process of the image version is executed.
[0047] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device or automation device capable of implementing the above functions. The following uses automation equipment as an example to illustrate this embodiment and the following embodiments.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The present application embodiment provides a control method for an automation system based on a pre-start execution environment, referring to Figure 1 , Figure 1 This is a flow chart of a first embodiment of a control method for an automation system based on a pre-boot execution environment of the present application.
[0050] In this embodiment, the control method of the automation system based on the pre-boot execution environment includes steps S10 to S40:
[0051] Step S10: the terminal device obtains and installs the startup software package sent by the server according to the startup instruction.
[0052] In this embodiment, a terminal device refers to the physical device on which software needs to be installed, serving as one end of the pre-boot execution environment. A startup software package is a compressed package distributed by the server containing executable files, configuration files, and dependent libraries, used to deploy a specific version of a service application on the terminal device. The server is the central system responsible for managing software distribution, providing version control, signature verification, and terminal device communication capabilities.
[0053] As an optional implementation, in the scenario of installing the startup software package, the startup instruction is triggered according to the terminal device, which in turn triggers the terminal device to send an IP and a request for the startup software package to the server. The server assigns an IP address to the terminal device and specifies the server address. Based on the IP address and server address, the server transmits the startup software package to the terminal device through the constructed file path.
[0054] As an optional implementation method of triggering the startup instruction, in the scenario of installing the image version, the user clicks on the terminal device to trigger the startup instruction, or the terminal device recognizes that the image version on the terminal device has defects and needs to be updated, then the startup instruction of the terminal device is triggered, or the startup instruction of the terminal device is remotely triggered through the server.
[0055] Step S20: Based on the read request triggered by the startup software package, the image code in the file in which the image version information is written is loaded.
[0056] In this embodiment, the image code refers to a string that uniquely identifies the operating system image version and is used to associate the image version with a configuration file. The configuration file is a metadata file that records the configuration parameters corresponding to the image version in a structured data format. This is used to ensure that the image version accurately matches customer requirements during automated deployment and that the installation process is verifiable. Writing image version information to a file refers to persistently storing the obtained version information in a local file on the terminal device for verification during the installation process.
[0057] As an optional implementation method, in the scenario of installing the image version, starting the software package triggers a read request. According to the read request, the terminal device reads the tested image version information in the hard disk and writes it into the file. Based on the image version information written into the file, the image code is loaded and the image version corresponding to the image code is read from the image version information written into the file.
[0058] As an optional implementation method for obtaining the image version, the terminal device sends an image version acquisition request to the manufacturing execution system, obtains the image version information corresponding to the image code from the image code table of the manufacturing execution system, writes the file based on the image version information, and reads the image version corresponding to the image code.
[0059] Step S30: According to the mirror code, a configuration file corresponding to the mirror code is obtained and loaded from the server, and installation parameters corresponding to the mirror code are generated.
[0060] In this embodiment, the configuration file is a text file stored in a structured format that defines the software installation path, environment variables, and runtime parameters. The installation parameters are a set of key-value pairs dynamically generated based on the image version, used to configure the image version installation parameters based on the adaptability of the computer environment.
[0061] As an optional implementation method, in the installation scenario of the mirror version, the configuration file template in the startup software package is found according to the startup software package, and then the version number is sent to the server through an encrypted connection based on the locally saved version number file. The server checks whether the version number file is legal, and then generates a set of corresponding installation settings based on the computer configuration of the terminal device, encrypts it and sends it back to the terminal device. The terminal device uses a cryptographic tool to decrypt the encrypted package and generate a configuration file. Finally, based on the configuration file, the mirror version is configured according to the adaptability of the computer environment to generate installation parameters.
[0062] Step S40 , executing the system installation process of the image version according to the installation parameters and the image version information written into the file.
[0063] In this embodiment, image version installation refers to completing the entire process of software deployment and configuration according to a specified version of the software image file.
[0064] As an optional implementation method, in the image version installation scenario, check the integrity of the text written by the image version information. If the image version write file is incomplete, re-obtain the corresponding image version write text according to the image code. If the image version write file is complete, install the image version according to the installation parameters, and verify the matching degree between the image version and the device to complete the installation of the image version.
[0065] As an implementation method of optional matching degree, in the installation scenario of the image version, the matching degree between the image version and the device is verified. According to the system version and parameters of the required device corresponding to the image version, the system version and parameters are multiplied by the corresponding weight according to the matching degree and summed to obtain the matching degree value between the image version and the device. If the matching degree value is greater than the preset matching threshold, the image version is installed on the device. If the matching degree is less than the preset matching threshold, another image version is reinstalled.
[0066] Exemplarily, in the installation scenario of the mirror version, the terminal device triggers the startup instruction through the instruction issued by the server. The terminal device sends an IP and a request for the startup software package to the server based on the startup instruction. The server assigns an IP address to the terminal device and specifies the server address. According to the IP address and the server address, the server transmits the startup software package to the terminal device through the constructed file path. The terminal device receives and installs the startup software package. After the startup software package is installed, a read request is automatically triggered to read the image version information that has passed the detection in the hard disk and write it into a file. The image code (001) and the image version (V2.1) corresponding to the image code are read from the image version information write file. The terminal device sends a configuration file request to the server according to the image code. The server sends the corresponding configuration file (001.exe) according to the image code (001). The terminal device generates corresponding installation parameters based on the configuration file and the operating parameters of the terminal device. Finally, the terminal device completes the system installation of the mirror version according to the installation parameters.
[0067] Since the image code corresponding to the terminal device is written into the hard disk through the production test tool, the terminal device reads the image code, obtains the image version information and writes it into files and configuration files, thereby completing the installation of the corresponding image version of the terminal device. This overcomes the technical problem of relying on manual selection of images from a large number of lists for installation when installing the shipped system, which is prone to incorrect installation and configuration mismatch, resulting in low system installation efficiency, and improves the efficiency of system installation.
[0068] Based on any of the above embodiments, in the second embodiment of the present application, refer to Figure 2 , Figure 2 This is a flow chart of the second embodiment of the control method of the automation system based on the pre-start execution environment of this application. Before step S10, steps A11 to A13 are also included:
[0069] Step A11: In response to the test instruction triggered by the terminal device, the test image version information corresponding to the test image code is obtained from the manufacturing execution system and written into a file.
[0070] In this embodiment, the manufacturing execution system refers to an industrial software system that manages the production process and is responsible for storing the mapping relationship between the image code and the version information.
[0071] As an optional implementation method of triggering a test instruction, a test program of a terminal device receives a test command sent by a user or a server and triggers the test instruction.
[0072] As an implementation method of an optional triggering test instruction, the test program of the terminal device detects the input of the new image version information writing file and automatically triggers the test instruction to detect the terminal device adapted to the new image version information writing file.
[0073] As an optional implementation, in the scenario of testing the image version, the terminal device sends a query request to the manufacturing execution system according to the test instruction. Based on the query request, the manufacturing execution system writes the image version information corresponding to the image code into a file and sends it to the terminal device. The terminal device receives and loads the image version information corresponding to the image code into the file.
[0074] Step A12: writing the test image version information into a file according to the test instruction, performing a test on the terminal device, and generating a test result.
[0075] In this embodiment, the test result refers to the result obtained by simulating the operation on the terminal device based on the image version written into the file according to the image version information.
[0076] As an optional implementation, in the scenario of testing the image version, based on the test program in the terminal device, according to the test instructions, the operating environment of the terminal device is simulated, the image version information is written into a file to simulate the test in the operating environment, and various indicator parameters during operation are detected. The various indicator parameters are compared and judged with the preset indicator parameters, and the test results are evaluated according to the number of items that meet the preset indicator parameters, and the test results are obtained as meeting the preset requirements or not meeting the preset requirements.
[0077] Step A13: Writing the test image version information of a file whose test result meets a preset requirement into a file as the image version information into a file.
[0078] In this embodiment, if the score of the test result reaches a preset score, the test result meets the preset requirements.
[0079] As an optional implementation, in the scenario of testing the image version, if the test result meets the preset score of the preset requirement, the image version information is written into a file and stored in the hard disk of the corresponding terminal device.
[0080] As an optional implementation method that does not meet the preset requirements, in the scenario of testing the image version, if the test result does not meet the preset score of the preset requirements, the manufacturing execution system will re-match the image version information and write it into the file for detection, or display a manual image code input interface, manually enter the image code, and download the corresponding image version information from the manufacturing execution system according to the new image code and write it into the file for detection.
[0081] Exemplarily, in the scenario of testing the image version, the terminal device receives a test command sent by the server, and then the terminal device triggers the test instruction and activates the test program in the terminal device. According to the test instruction, the terminal device queries the image code (002) from the manufacturing execution system, obtains the image version information corresponding to the image code (002) and writes it into a file. According to the test instruction, the terminal device simulates the operating environment of the terminal device, writes the image version information into the file and simulates the test in the operating environment, detects various index parameters in the operation, compares and judges each index parameter with the preset index parameter, evaluates according to the number of items that meet the preset index parameter, obtains a test result score of 75 points, which is lower than the preset score standard of 80 points, and displays a manual input image code interface. By manually entering the image code (003), according to the new image code (003), the corresponding image version information is downloaded from the manufacturing execution system and written into the file for detection, and the test result score is 95 points, which meets the preset score standard. The image version information corresponding to the new image code (003) is written into the file and stored in the hard disk of the terminal device.
[0082] Because the image version has been tested before installation through the setup test process, and the relevant files are saved on the hard disk of the terminal device, the automatic installation process is ensured and the reliability of the system installation is improved.
[0083] Based on any of the above embodiments, in the third embodiment of the present application, refer to Figure 3 , Figure 3 This is a flow chart of the third embodiment of the control method of the automation system based on the pre-start execution environment of the present application. The step S10 includes steps B11 to B14:
[0084] Step B11: Based on the startup instruction, trigger the terminal device to send a request for IP allocation and the startup software package to the server.
[0085] In this embodiment, IP allocation refers to assigning a "network ID number" to a terminal device so that the device can communicate on the Internet. A startup software package refers to a compressed package used to install a system or software.
[0086] In step B12, the server allocates an IP address to the terminal device based on the Dynamic Host Configuration Protocol and specifies the server address and file path.
[0087] In this embodiment, the Dynamic Host Configuration Protocol refers to a rule for automatically assigning IP addresses to devices, similar to an "automatic numbering machine", to avoid manual IP settings.
[0088] As an optional implementation method, in the scenario of installing a mirror version, the terminal device receives the startup instruction and automatically sends an IP allocation request to the server. After receiving the request, the server first checks the identity of the terminal device, selects an idle address from the IP pool, and queries the corresponding startup software package. The server specifies the server address and the terminal device builds a file path based on the IP address.
[0089] Step B13: Based on the IP address and the server address, the startup software package is transferred to the terminal device through the file path in combination with the Simple File Transfer Protocol.
[0090] In this embodiment, the server address refers to the network location of the server, which tells the terminal device the specific address to obtain resources. The Simple File Transfer Protocol refers to a simple rule for quickly transferring files with a fast transfer speed.
[0091] Step B14: the terminal device receives and installs the startup software package.
[0092] In this embodiment, the terminal device receives the startup software package and performs a self-test program to detect whether there is any abnormality during the operation of the startup software package.
[0093] As an optional implementation method, in the scenario of installing a mirror version, after receiving it, the terminal device first receives the startup software package in combination with the simple file transfer protocol, then the terminal device decompresses the startup software package and automatically installs it to the specified directory. After the installation, the network parameters are configured according to the IP, and then the self-test program of the startup software package is performed. When the self-test runs without abnormalities, the terminal device reports the installation success to the server. If the IP is occupied or the software package is damaged in the middle, the terminal device will report an error to the server, record a log and request the download of the startup software package again, or wait for manual processing to install the manually downloaded startup software package to the specified directory of the terminal device.
[0094] For example, in the scenario of installing a mirror version, as soon as the terminal device is turned on (or receives a startup command), it automatically sends a message to the server: "I am a new device, please assign an IP address and give me the software package to install." After receiving the request, the server first checks the device identity (such as MAC address), selects an idle address (such as 192.168.1.20) and the corresponding software package (such as "Production Line Control V3.2.zip") from the IP pool, encrypts and packages it and sends it back to the terminal device. After receiving it, the terminal device first verifies whether the IP is valid (such as pinging the gateway to test the network connection), then decompresses the software package and automatically installs it to the specified directory (such as D:\Programs). After installation, it configures network parameters (such as subnet mask, DNS) according to the IP, and finally performs a self-test program (such as testing whether it can connect to the database). If there is no abnormality in the self-test, the terminal device will report "Installation successful" to the server. If the IP is occupied or the software package is damaged in the middle, the terminal device will report an error (such as a pop-up window prompting "IP conflict"), record a log, and wait for manual processing.
[0095] By allocating IP addresses and installing software packages, a secure transmission path can be established between the terminal device and the server, ensuring the security of file transmission and improving the security of system installation.
[0096] Based on any of the above embodiments, in the fourth embodiment of the present application, refer to Figure 4 , Figure 4 This is a flow chart of the fourth embodiment of the control method of the automation system based on the pre-boot execution environment of this application. Step S30 includes steps C11 to C13:
[0097] In step C11 , the startup software package sends a configuration file request to the server based on the mirror code.
[0098] In this embodiment, the configuration file request refers to a request to the server for a specific configuration file.
[0099] As an optional implementation, in the scenario of installing a mirror version, the terminal device generates a configuration file request corresponding to the mirror code according to the mirror code, and sends the configuration file request to the server.
[0100] In step C12, the server sends the configuration file corresponding to the configuration file request to the terminal device based on the configuration file request.
[0101] In this embodiment, the server finds the configuration file corresponding to the mirror code from a mapping table of mirror codes and configuration files according to the mirror code in the configuration file request.
[0102] As an optional implementation, in the scenario of installing the mirror version, the server finds the configuration file corresponding to the mirror code in the mapping table of mirror code and configuration file based on the configuration file request sent by the terminal device, and sends the configuration file corresponding to the configuration file request to the terminal device.
[0103] Step C13: The terminal device receives and loads the configuration file, and generates the installation parameters corresponding to the image version in combination with the operating parameters of the terminal device.
[0104] In this embodiment, the operating parameters refer to the current hardware operating information or environment configuration information of the device.
[0105] As an optional implementation, in the scenario of installing a mirror version, the terminal device receives and loads the configuration file sent by the server, configures the corresponding environment on the terminal device according to the configuration file, adjusts the environment configuration in combination with the operating parameters of the terminal device, and generates installation parameters that meet the normal operation of the terminal device and the mirror version at the same time.
[0106] For example, in the scenario of installing the image version, the terminal device automatically decompresses the startup software package after it is turned on, reads the image code inside, such as IMG-2024X, and immediately sends a message to the server: "I am an IMG-2024X model device, please send me the corresponding configuration manual." After the server verifies that the model is legal, it retrieves the configuration template of the model from the database (for example, setting the IP segment to 192.168.10.x and saving the log to D:\Logs), encrypts it and packages it into a standard encrypted file and sends it back to the terminal device. After the terminal device decrypts the file, it first scans its own hard disk. If the software is installed correctly (for example, if 16GB of memory and 500GB of hard disk are found), replace the "placeholders" in the configuration with actual values (change memory allocation to 11.2GB), and then check whether these parameters are reasonable (for example, whether the remaining space on the hard disk is enough to install the software). If there is no abnormality, it will be automatically installed to the specified location according to the configuration (for example, to the D:\App\ directory). After the installation, a pop-up window will display "IMG-2024X_V2.3 installed successfully". If the configuration does not match the hardware (for example, 12GB of memory is required but the device only has 8GB), the red light will flash immediately and a prompt will be displayed: "Insufficient memory, please upgrade the hardware".
[0107] By automatically acquiring the configuration file, the terminal device can configure the installation environment independently, overcoming the technical problem of manual environment configuration and improving the efficiency of system installation.
[0108] Based on any of the above embodiments, in the fifth embodiment of the present application, step S40 includes steps D11 to D12:
[0109] Step D11 : Based on the installation parameters, the environmental parameters of the terminal device are configured to obtain an updated installation environment.
[0110] In this embodiment, the environmental parameters refer to the current hardware or software status of the device. The updated installation environment refers to the device status adjusted according to the installation requirements to ensure that the software can run normally.
[0111] As an optional implementation method, in the scenario of installing a mirror version, the terminal device first scans the device's environmental parameters based on the installation parameters and automatically adjusts the configuration. If the space on the first hard disk is sufficient, the target directory is created and authorized. If the memory is insufficient, the background process is released first, and then the old version configuration file is backed up and the installation environment is updated according to the installation parameters.
[0112] Step D12: completing the system installation of the mirror version based on the installation environment.
[0113] In this embodiment, in the updated installation environment, the updated installation environment can match the system installation of the mirror version.
[0114] As an optional implementation method, in the scenario of installing the image version, the terminal device modifies the system registry or environment variables according to the installation parameters, and finally performs a silent installation and writes a log. After the installation is complete, a self-test program is run. If successful, the installation completion is displayed on the screen. If failed, the configuration is rolled back and the cause of the error is marked.
[0115] For example, the terminal device first scans the device's environmental parameters (such as 8GB of current memory and 50GB of remaining space on the D drive) based on the installation parameters (such as requiring installation to D:\App and memory usage not exceeding 70%), and automatically adjusts the configuration: if the D drive space is sufficient, create the target directory and authorize it. If there is insufficient memory, the background process will be released first or a prompt will appear: "Insufficient memory, please close other programs." Then, the old version configuration file (such as C:\word) will be backed up, the system registry or environment variables will be modified according to the installation parameters, and finally a silent installation will be performed and the log will be written. After the installation is complete, a self-test script will be run (such as testing whether port 8080 is accessible). If successful, "Environment Ready" will be displayed on the screen. If failed, the configuration will be rolled back and the cause of the error will be noted (such as "firewall blocking the port").
[0116] Since the environmental parameters of the terminal device are detected and regulated through the installation parameters, the installation of the mirror version is met, which improves the efficiency of system installation.
[0117] Based on any of the above embodiments, in the sixth embodiment of the present application, before step S40, steps E11 to E12 are further included:
[0118] Step E11 : When the terminal device fails to read the image code of the hard disk, or the terminal device fails to load the configuration file corresponding to the image version information write file, a reading exception report is generated.
[0119] In this embodiment, reading the exception report refers to an error document that records the failure cause and context information.
[0120] As an optional implementation, in the scenario of installing the image version, the terminal device automatically checks the image code in the hard disk when it starts up. If the image code reading fails, the error type, timestamp and terminal device code are immediately recorded, an alarm file is generated and saved in the specified directory, and an alarm prompt is popped up. If the reading is successful but the configuration file fails to be loaded, it rolls back to the last valid configuration, marks the specific error in the report, and notifies the administrator through the error prompt. The report content includes error code, screenshots, log fragments and recommended handling measures, and a terminal device startup 3-time retry mechanism is set. If it still fails, the installation process is locked and a reading exception report is generated.
[0121] Step E12: generating an interface for manually inputting a mirror code according to the reading abnormality report.
[0122] In this embodiment, the interface for manually inputting the mirror code refers to a pop-up window or page that allows the user to manually fill in the mirror code through a keyboard or touch screen.
[0123] As an optional implementation, in the scenario of installing a mirror version, when the terminal device detects that the mirror code reading fails or the configuration file loading error occurs, a red warning pop-up window will automatically pop up, displaying an error summary, and a window with an input box will be displayed in the center of the interface. An example format will be attached next to the input box. After the user manually enters the mirror code, the mirror code will be verified, and the terminal device will immediately send the code to the server through an encrypted connection for verification. If the server verifies that the mirror code exists in the library, it will automatically fill it into the configuration file and continue the installation. If it is invalid, the input box will shake and an error prompt will be given. When the user enters the wrong information three times, the interface will be locked for 5 minutes, and an encrypted log will be generated. If the input is successful, the terminal device will hide the pop-up window, resume the installation process, and mark "Manual repair completed" in the log.
[0124] For example, referring to Figure 5 , Figure 5This is the abnormal judgment diagram for this application. In the scenario of installing the image version, the terminal device automatically checks the image code in the hard disk when it starts. If the reading fails (such as the hard disk is damaged or the permission is insufficient), the error type ("hard disk is inaccessible"), timestamp and device SN code are recorded immediately, and an alarm file is generated and saved in the specified directory. At the same time, a pop-up window prompts "Image code reading failed, please contact operation and maintenance". If the reading is successful but the configuration file fails to be loaded (such as the config_v001.yml file is damaged or the version does not match), it will roll back to the last valid configuration, mark the specific error in the report (such as "parameter format error on line 15"), and notify the administrator by email / API; the report content includes error code, screenshots, log fragments and recommended handling measures (such as "restart service" or "replace hard disk"), and the terminal device starts 3 retry mechanisms (with an interval of 10 seconds). If it still fails, the installation process is locked to prevent the error from spreading. When the terminal device detects that the image code reading fails (such as the hard disk cannot be When an error occurs during image recognition or configuration file loading, a red warning window will automatically pop up, displaying an error summary (such as "Image code reading failed, error code #102"), and a window with an input box will be displayed in the center of the interface. A sample format will be attached next to the input box (such as "Please enter a code similar to IMG-2024A"). After the user manually enters the image code and clicks the "Verify" button, the terminal device will immediately send the code to the server for verification through an encrypted connection. If the server returns "valid" (such as matching the version in the database), it will be automatically filled in the configuration file and the installation will continue. If it is invalid, the input box will shake and a prompt will be prompted "The code does not exist, please check and re-enter". After the user enters the code incorrectly three times, the interface will be locked for 5 minutes, and an encrypted log will be generated (recording the input error code, time and device ID). At the same time, the interface will display "Please contact the administrator to obtain the correct code" and a contact number. After successful input, the terminal device will hide the pop-up window, resume the installation process, and mark "Manual repair completed" in the log.
[0125] By proofreading the image version and its corresponding configuration file, errors and incompatibilities in configuration files and versions are effectively avoided, the adaptability of the image version system installation is guaranteed, and the reliability of the system installation is improved.
[0126] Based on any of the above embodiments, in the seventh embodiment of the present application, before step S40, steps F11 to F13 are further included:
[0127] Step F11: constructing an association table between the image version and the image code.
[0128] In this embodiment, the association table of image versions and image codes refers to a table that records the relationship between image codes and corresponding version numbers.
[0129] As an optional implementation method, in the scenario of building an association table, the image code and image version are associated on the server side, written into the image association table of the database through a script, and the build time, person in charge and version description are attached to comprehensively generate an association table of the image version and image code.
[0130] Step F12: According to the association table, the image versions are sequentially imported into the server.
[0131] In this embodiment, corresponding import refers to uploading the image codes and version numbers in the association table to the server in batches to ensure that the server can correctly identify the version corresponding to each code.
[0132] As an optional implementation method, in the scenario of importing the association table, the operation and maintenance personnel upload the organized association table to the server through an encrypted web page. The table content includes the image code, version number, applicable device type and release date. After receiving the file, the server automatically verifies the format. If duplicate or illegal data is found, an error report is generated and the administrator is notified by email to correct it. After the verification is passed, the server writes the data into the version management database and updates the index file of the image association table.
[0133] Step F13 : creating the configuration file named after the image code on the server side according to the image code corresponding to the image version.
[0134] In this embodiment, the named configuration file refers to a configuration file generated with the image code as the file name.
[0135] As an optional implementation method, in the scenario of generating a configuration file, based on the image code and its corresponding image version, combined with the configuration parameters of the terminal device, a configuration file that conforms to the terminal device installation is generated, the installation environment of the terminal device is analyzed, and parameters for regulating the installation environment are generated. Based on the parameters for regulating the installation environment, an updated configuration file is obtained.
[0136] For example, referring to Figure 6 , Figure 6 For the configuration environment application diagram of this application, in the scenario of association table construction, by establishing an image code table in the server, the image code is associated with the image version, and then the image version and image code are imported into the PXE server. The configuration file is automatically generated according to the image version. Combined with the environment configuration, a grub configuration file named after the image code is created. After the test is passed, if the test result meets the requirements of the terminal device, the image code is filled in the work order information of the MES (manufacturing execution system). The production test program obtains the image code and image version that have passed the test from the manufacturing execution system, and stores the image code and image version in the hard disk of the terminal device.
[0137] For example, in the scenario of building an associated table, each mirror code (such as 001 for the production line) and the corresponding version number (such as V2.1) are filled in an Excel table, and a description is added (such as "dedicated to the production line in May 2024"). Then, this table is uploaded to the "central warehouse management system" on the server side. The system automatically checks whether the model and version in the table are legal (for example, whether 001 is repeated, whether the version number format is correct), and if there is a problem, it will be marked in red with a prompt "The model in the third row is repeated, please modify it". After the check is passed, the system will "label" each mirror code - for example, create a 001_V2.1 folder on the server side, put the corresponding software package and configuration file in it, and finally automatically generate an "instruction manual" according to the model name: for example, the installation path, memory limit and other parameters are written in the 001.config file, just like providing a dedicated operating guide for each model of product.
[0138] By setting the association table and generating the configuration file, the connection between the image code and the image version is guaranteed, so that the corresponding image version can be queried through the image code, and the image version can be installed through the configuration file, which improves the reliability of system installation.
[0139] Based on any of the above embodiments, in the eighth embodiment of the present application, after step F13, steps G11 to G12 are further included:
[0140] Step G11: Fill in the mirror code in the work order information on the manufacturing execution system.
[0141] In this embodiment, the work order information refers to an electronic form that records the details of the production task.
[0142] As an optional implementation, in the scenario of mirror version installation, when the user creates a new work order on the manufacturing execution system side, he manually enters or scans the code in the software configuration bar to obtain the mirror code. The system automatically verifies whether the code is in the pre-stored whitelist. If invalid, a pop-up window will prompt that it is not authorized. If the verification passes, the mirror code will be bound to the work order and displayed on the task details page, and the background service will be triggered to synchronize the code to the associated terminal device.
[0143] In step G12, the terminal device corresponding to the terminal device obtains the mirror code corresponding to the terminal device from the manufacturing execution system and stores it in the hard disk.
[0144] In this embodiment, the terminal device obtains the mirror code that has passed the inspection from the manufacturing execution system.
[0145] As an optional implementation method, in the scenario of obtaining the mirror code, the mirror code corresponding to the device is queried to the manufacturing execution system through an encrypted request. After the manufacturing execution system verifies the legitimacy of the terminal device, it extracts the mirror code from the work order association table and returns it to the terminal device with a digital signature. After receiving it, the terminal device verifies the validity of the signature. After the verification is passed, the mirror code is stored in the hard disk of the terminal device.
[0146] For example, referring to Figure 7 , Figure 7 This is a flowchart for the installation of the image version of this application. First, the terminal device receives a test command sent by the server, and then the terminal device triggers the test instruction and activates the test program in the terminal device. According to the test instruction, the terminal device queries the image code (005) from the manufacturing execution system, obtains the image version information corresponding to the image code (005) and writes it into a file. According to the test instruction, the operating environment of the terminal device is simulated, and the image version information is written into the file to simulate the test in the operating environment. The various index parameters in the operation are detected, and the various index parameters are compared and judged with the preset index parameters. According to the number of items that meet the preset index parameters, the image version information corresponding to the new image code (005) is written into the file and stored in the hard disk of the terminal device. Then, during the startup installation process, the terminal device requires the server to allocate an IP address, and then uses TFTP (Trivial File Transfer Protocol) or MTFTP (Multicast Trivial File Transfer Protocol) to transfer the image version information to the file. The PXE protocol uses the network transfer protocol to download a boot package (NBP) to the local memory for execution. Pre-boot execution environment (PXE) installation of an operating system requires that the computer to be installed has a PXE-supported network interface card (NIC). This means that the NIC must have a terminal device (PXE client). The PXE protocol enables computers to boot over the network. This protocol is divided into a terminal device and a server. When the computer boots, the BIOS loads the PXE client into memory for execution. The PXE client then downloads the remote Network Boot Program (NBP) file to the local machine via TFTP. The NBP loads the configuration file (grub.cfg) from the server via TFTP to display the boot menu, allowing users to manually select the operating system to be installed.
[0147] Since the image code is bound to the work order by connecting to the manufacturing execution system, the image code is obtained from the manufacturing execution system and written to the hard disk during assembly testing, which ensures the automatic startup and operation of the image version installation and improves the efficiency of system installation.
[0148] The present application provides an automation device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the control method of the automation system based on the pre-boot execution environment in the above-mentioned embodiment 1.
[0149] Reference below Figure 8 , which shows a schematic diagram of the structure of an automation device suitable for implementing the embodiments of the present application. The automation device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, automated installation equipment, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), system automated installation equipment, etc., as well as fixed terminals such as PC system automated installation equipment, desktop computers, etc. Figure 8 The automation equipment shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0150] like Figure 8As shown, the automation device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the automation device. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the automation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an automation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have instead.
[0151] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.
[0152] The automation device provided by this application utilizes the control method for an automation system based on a pre-boot execution environment in the above-mentioned embodiment. This device can solve the technical problem of relying on manual selection of images from a large list for installation when installing a shipping system, which is prone to incorrect installation and configuration mismatches, resulting in inefficient system installation. Compared with the prior art, the beneficial effects of the automation device provided by this application are the same as those of the control method for an automation system based on a pre-boot execution environment in the above-mentioned embodiment. The other technical features of the automation device are the same as those disclosed in the method of the above-mentioned embodiment and are not further described here.
[0153] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0154] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0155] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, wherein the computer-readable program instructions are used to execute the control method of the automation system based on the pre-boot execution environment in the above embodiment.
[0156] The computer-readable storage medium provided in this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM, CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, radio frequency (RF, Radio Frequency), etc., or any suitable combination thereof.
[0157] The computer-readable storage medium may be included in the automation device, or may exist independently without being assembled into the automation device.
[0158] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an automated device, the automated device: the terminal device obtains and installs the startup software package sent by the server according to the startup instruction; loads the image code written into the file with the image version information based on the read request triggered by the startup software package; obtains and loads the configuration file corresponding to the image code from the server according to the image code, and generates installation parameters corresponding to the image code; and executes the system installation process of the image version according to the installation parameters and the image version written into the file with the image version information.
[0159] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0160] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0161] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0162] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., a computer program) for executing the above-mentioned control method for an automated system based on a pre-boot execution environment. This can solve the technical problem of relying on manual selection of images from a large list for installation when installing a shipping system, which is prone to incorrect installation and configuration mismatches, resulting in low system installation efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the control method for an automated system based on a pre-boot execution environment provided in the above-mentioned embodiment, and will not be elaborated here.
[0163] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A control method for an automation system based on a pre-start execution environment, characterized in that: The automation system based on the pre-boot execution environment includes a server and a terminal device, and the method includes: The terminal device obtains and installs the startup software package sent by the server according to the startup instruction; Based on the read request triggered by the startup software package, load the image code written into the file with the image version information; According to the mirror code, obtain and load the configuration file corresponding to the mirror code from the server, and generate installation parameters corresponding to the mirror code; According to the installation parameters, in combination with the image version information, the system installation process of the image version is executed.
2. The control method of the automation system based on the pre-boot execution environment according to claim 1, characterized in that: The automation system based on the pre-boot execution environment further includes a manufacturing execution system end, and before the terminal device obtains and installs the startup software package sent by the server end according to the startup instruction, it also includes: In response to a test instruction triggered by the terminal device, obtaining test image version information corresponding to the test image code from the manufacturing execution system and writing it into a file; According to the test instruction, the test image version information is written into a file, the terminal device is tested, and a test result is generated; The test image version information writing file whose test result meets the preset requirement is used as the image version information writing file.
3. The control method of the automation system based on the pre-boot execution environment according to claim 1, characterized in that: The step of the terminal device acquiring and installing the startup software package sent by the server according to the startup instruction includes: Based on the startup instruction, trigger the terminal device to send a request for IP allocation and the startup software package to the server; The server allocates an IP address to the terminal device and specifies the server address and file path based on the dynamic host configuration protocol; Based on the IP address and the server address, in combination with the Simple File Transfer Protocol, the startup software package is transmitted to the terminal device via the file path; The terminal device receives and installs the startup software package.
4. The control method of the automation system based on the pre-boot execution environment according to claim 1, characterized in that: The step of obtaining and loading a configuration file corresponding to the mirror code from the server according to the mirror code, and generating installation parameters corresponding to the mirror code, includes: The startup software package sends a configuration file request to the server based on the mirror code; The server sends the configuration file corresponding to the configuration file request to the terminal device based on the configuration file request; The terminal device receives and loads the configuration file, and generates the installation parameters corresponding to the image version in combination with the operating parameters of the terminal device.
5. The control method of the automation system based on the pre-boot execution environment according to claim 1, characterized in that: The step of executing the system installation process of the image version according to the installation parameters and the image version written into the file in combination with the image version information includes: Based on the installation parameters, the environmental parameters of the terminal device are configured to obtain an updated installation environment; Based on the installation environment, the system installation of the mirror version is completed.
6. The control method of the automation system based on the pre-boot execution environment according to claim 1, characterized in that: Before the step of obtaining and loading a configuration file corresponding to the mirror code from the server according to the mirror code and generating installation parameters corresponding to the mirror code, the method further includes: When the terminal device fails to read the image code of the hard disk, or the terminal device fails to load the configuration file corresponding to the image version information write file, a reading exception report is generated; According to the reading exception report, an interface for manually inputting a mirror code is generated.
7. The control method of the automation system based on the pre-boot execution environment according to claim 1, characterized in that: Before the step of obtaining and loading a configuration file corresponding to the mirror code from the server according to the mirror code and generating installation parameters corresponding to the mirror code, the method further includes: Constructing an association table between the image version and the image code; According to the association table, the image versions are sequentially imported into the server; According to the image code corresponding to the image version, the configuration file named after the image code is created on the server.
8. The control method of the automation system based on the pre-boot execution environment according to claim 7, characterized in that: After the step of creating the configuration file named after the image code according to the image code corresponding to the image version on the server, the method further includes: Filling in the mirror code in the work order information on the manufacturing execution system; The terminal device corresponding to the terminal device obtains the mirror code corresponding to the terminal device from the manufacturing execution system and stores it in the hard disk.
9. An automated device, characterized in that: The automation device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the control method for a PC system installation solution based on network boot technology according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the control method of the PC system installation solution based on network boot technology according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Deployment method of gateway system and related equipment
CN121262079A