Parameter file importing method and device and electronic equipment
By automatically acquiring and formatting parameter files through a preset synchronization strategy, the problem of missed or mis-imported data caused by manual operation is solved, thereby improving production efficiency and delivery cycle.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, importing parameter files relies on manual operation, which can easily lead to omissions or mis-imports, affecting production efficiency and delivery cycle.
Product configuration information is obtained through a preset synchronization strategy, candidate file information is determined, downloaded and converted in the target storage location, parameter files are generated and automatically imported into the target device.
The system enables automatic import of parameter files, avoiding omissions or mis-imports, and improving production efficiency and delivery cycle.
Smart Images

Figure CN121743291A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a parameter file import method and device and electronic equipment. BACKGROUND
[0002] Under the background of current product rapid development, various electronic products are updated and replaced at an increasingly faster speed, and the functions are increasingly complex and diverse. In order to ensure the quality and performance of electronic products, a series of strict testing, debugging and checking work need to be carried out in the production process of electronic products, including but not limited to key code burning, white balance debugging and function checking and other key test items. Because different models and different brands of electronic products have differences in design and function, therefore, in the production test stage, each has a specific debugging requirement. Therefore, in the production process, the corresponding parameter file needs to be imported into the host computer according to the order information of the electronic product, so as to meet the debugging requirements of different electronic products.
[0003] In the related art, the existing import of parameter file mainly depends on manual operation, that is, before each production, the operator needs to query the order information of the electronic product to be executed by the line body he is responsible for, and input the order number of the order information one by one on the server to obtain the required parameter file, and manually import the parameter file into the host computer. Although this method can import the parameter file into the host computer, the manual operation method is prone to miss import or misimport, and the host computer will output an error prompt because it cannot obtain the correct parameter file, thereby causing the production line to stop production, which seriously affects the production efficiency and the delivery cycle of the electronic product. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a parameter file import method, device and electronic equipment, so as to realize automatic import of parameter file into target device. The specific technical solutions are as follows: In the first aspect of the embodiments of the present application, a parameter file import method is first provided, which comprises: Based on a preset synchronization strategy, obtaining configuration information corresponding to a product; Based on the configuration information, determining M candidate file information, wherein M is a positive integer; For any candidate file information, obtaining a candidate file corresponding to the candidate file information, and downloading the candidate file to a target storage location; In the target storage location, according to the configuration information, performing format conversion on the candidate file to generate a parameter file; Importing the parameter file into a target device.
[0005] In an optional implementation, the determining M candidate file information based on the configuration information comprises: obtaining file path information and synchronization state information from the configuration information; obtaining a file information list from the server according to the file path information; taking file information whose file timestamp exceeds the timestamp of the synchronization state information in the file information list as the candidate file information.
[0006] In an optional implementation, the generating a parameter file by format converting the candidate file according to the configuration information comprises: obtaining product information from the configuration information; obtaining a preset calling rule corresponding to the product information; renaming the candidate file according to the product information and the preset calling rule to obtain the parameter file.
[0007] In an optional implementation, before the downloading the candidate file to the target storage location, the method further comprises: obtaining an initial encoding value corresponding to the candidate file from the server; storing the initial encoding value to an initial encoding file in the target storage location.
[0008] In an optional implementation, after the downloading the candidate file to the target storage location, the method further comprises: obtaining the candidate file from the target storage location; determining an encoding value corresponding to the candidate file; obtaining an initial encoding value corresponding to the candidate file from the initial encoding file; in a case where the encoding value corresponding to the candidate file is consistent with the initial encoding value, performing the step of format converting the candidate file.
[0009] In an optional implementation, after the generating the parameter file, the method further comprises: obtaining a file name corresponding to the parameter file; if a file with the same file name as the parameter file exists in the target storage location, moving the file to an alternative folder.
[0010] In an optional implementation, the method further comprises: obtaining a synchronization timestamp, the synchronization timestamp being a timestamp when the determining M candidate file information is completed; updating synchronization state information in the configuration information according to the synchronization timestamp.
[0011] In an optional implementation, the method further includes: obtaining a preset cleaning strategy; periodically cleaning parameter files in the target storage location that meet the preset cleaning strategy.
[0012] In a second aspect of the embodiments of the present application, a parameter file importing apparatus is further provided, and the apparatus includes: a configuration information obtaining module, configured to obtain configuration information corresponding to a product based on a preset synchronization strategy; a file information determining module, configured to determine M candidate file information based on the configuration information, where M is a positive integer; a file downloading module, configured to obtain a candidate file corresponding to any candidate file information and download the candidate file to a target storage location; a file generating module, configured to generate a parameter file by performing format conversion on the candidate file according to the configuration information in the target storage location; a file importing module, configured to import the parameter file to a target device.
[0013] In a third aspect of the embodiments of the present application, an electronic device is further provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus; the memory is configured to store a computer program; the processor is configured to execute the program stored on the memory, and implement the parameter file importing method in any of the first aspect.
[0014] In a fourth aspect of the embodiments of the present application, a storage medium is further provided, and the storage medium stores instructions, which, when executed on a computer, cause the computer to perform the parameter file importing method in any of the first aspect.
[0015] In a fifth aspect of the embodiments of the present application, a computer program product including instructions is further provided, which, when executed on a computer, causes the computer to perform the parameter file importing method in any of the first aspect.
[0016] The technical solution provided by the embodiment of the present application comprises the following steps: obtaining configuration information corresponding to a product based on a preset synchronization strategy; determining M candidate file information based on the configuration information, wherein M is a positive integer; obtaining a candidate file corresponding to any candidate file information, and downloading the candidate file to a target storage location; performing format conversion on the candidate file in the target storage location according to the configuration information, to generate a parameter file; and importing the parameter file into a target device. In this way, the parameter file can be automatically imported into the target device, thereby avoiding the situation of missing import or incorrect import due to manual operation of importing the parameter file. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are incorporated herein and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced hereinafter. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
[0019] Figure 1 An implementation flowchart of a parameter file import method provided by the embodiment of the present application is shown in the figure. Figure 2 An implementation flowchart of another parameter file import method provided by the embodiment of the present application is shown in the figure. Figure 3 An implementation flowchart of a method for determining candidate file information provided by the embodiment of the present application is shown in the figure. Figure 4 An implementation flowchart of a candidate file verification method provided by the embodiment of the present application is shown in the figure. Figure 5 A structure diagram of a parameter file import device provided by the embodiment of the present application is shown in the figure. Figure 6 A structure diagram of an electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0020] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort fall within the scope of protection of the present application.
[0021] The following disclosure provides many different embodiments, or examples, for implementing different structures of the present application. For the purpose of simplifying the present application, components and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeatedly refer to numbers and / or letters in different examples. Such repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed.
[0022] For the purpose of facilitating the understanding of the embodiments of the present application, the following will be further explained and described with specific embodiments in conjunction with the accompanying drawings, which do not constitute limitations on the embodiments of the present application.
[0023] As Figure 1 shown, an implementation flow diagram of a parameter file import method provided by the embodiments of the present application is shown, which can specifically include the following steps: S101, based on a preset synchronization strategy, obtaining configuration information corresponding to a product.
[0024] The above-mentioned preset synchronization strategy refers to a rule preset for triggering a subsequent parameter file preparation process. The preset synchronization strategy includes but is not limited to an event triggering strategy (such as responding to a test task order issued by a production management system) and a time triggering strategy (such as reaching a preset period time point based on a timer), which is not limited by the embodiments of the present application.
[0025] The above-mentioned product refers to a device or system that needs to be verified by testing for its performance and function. It includes but is not limited to various consumer electronic products such as televisions, computers, smart phones, and industrial devices, medical devices, etc., which are not limited by the embodiments of the present application.
[0026] The above-mentioned configuration information refers to a set of information related to the test process of the product, including but not limited to the production base of the product (i.e. the physical location of product manufacturing), the line body (i.e. the assembly line in the product production process), the work station (the specific work station in the product production process), the model of the product (the specific model identifier of the product), the test option setting (specific test content such as key code burning, white balance debugging and function verification test items), and synchronization state information (such as the last time stamp of downloading the candidate file), etc., which are not limited by the embodiments of the present application.
[0027] In this embodiment, configuration information corresponding to the product is obtained based on a preset synchronization strategy. Specifically, when the triggering conditions of the preset synchronization strategy are met (e.g., a new work order is received or the current time reaches a preset cycle time point), the configuration information corresponding to the product is obtained to determine the corresponding candidate file based on the configuration information. By triggering the process through the preset synchronization strategy, the file preparation and test execution are decoupled in time, ensuring that the file preparation process is independent of the actual testing process. This allows the parameter file to be imported before the production testing of the product begins, thereby avoiding production line waiting.
[0028] S102, Based on the configuration information, determine M candidate file information, where M is a positive integer.
[0029] In this embodiment, based on configuration information, M candidate file information are determined, where M is a positive integer (e.g., M is 1, 2, 3, etc.). The candidate file information refers to file information related to the product's testing process, filtered according to the configuration information, including but not limited to file path (i.e., the specific location of the file on the server or storage system), filename (e.g., config_v2.1.json), file type (e.g., text file, binary file, etc.), and file timestamp (the time the file was created or last modified). This embodiment does not limit these parameters.
[0030] S103: For any candidate file information, obtain the candidate file corresponding to the candidate file information and download the candidate file to the target storage location.
[0031] The aforementioned target storage location refers to the physical or virtual location used to store candidate files. It can be a folder on a local disk (i.e., a specific folder on the local computer's disk, such as D:\test_files\), a shared directory on a network storage device (such as a shared directory on a network attached storage (NAS) device), or a bucket created in a cloud storage service (such as Alibaba Cloud OSS, Tencent Cloud COS, etc.). This application embodiment does not limit this.
[0032] The aforementioned candidate files are the actual files located based on the candidate file information. They may contain test data, configuration files, scripts, and other files used for testing the product.
[0033] In this embodiment, for any candidate file information, the corresponding candidate file is obtained and downloaded to the target storage location. Specifically, candidate files can be obtained from a server or storage system and saved to the target storage location via file transfer protocols (such as FTP, SFTP, HTTP, etc.) or API interfaces provided by cloud storage services.
[0034] For example, the candidate file corresponding to the candidate file information can be obtained from the server according to the candidate file information, and the candidate file can be downloaded to a folder of a local disk.
[0035] In the target storage location, the candidate file is format-converted according to the configuration information to generate a parameter file, in S104.
[0036] The parameter file refers to a file used for product testing, and contains parameters and data required in the testing process, such as test cases, initial data, configuration parameters, and the like.
[0037] In the embodiments of the present application, the candidate file is format-converted according to the configuration information to generate a parameter file in the target storage location. The format conversion process can include parsing, modifying, and reorganizing the file content. Specifically, the file name of the candidate file can be renamed to obtain a parameter file suitable for the target device, or the file content of the candidate file can be converted to adapt to different testing environments, which is not limited in the embodiments of the present application.
[0038] For example, the candidate file is converted from ASCII encoding to UTF-8 encoding to ensure that the candidate file can be correctly read and processed on different systems or devices.
[0039] In S105, the parameter file is imported into the target device.
[0040] The target device refers to a hardware device or a virtual environment, such as a host computer, used for executing a product testing process, and serves as the final import destination of the parameter file. The target device includes but is not limited to a server, a test machine (such as a special-purpose computer loaded with a test tool), an embedded development board, a virtual testing platform based on cloud computing (such as an AWS EC2 instance), a containerized environment (such as a Docker container), or a simulation testing system, which is not limited in the embodiments of the present application.
[0041] In the embodiments of the present application, the parameter file is imported into the target device, so that the target device adapts to the corresponding product according to the name of the parameter file, and executes the test case according to the instructions and data in the parameter file to comprehensively test the performance and functions of the product.
[0042] Through the description of the technical solutions provided by the embodiments of the present application, based on the preset synchronization strategy, the configuration information corresponding to the product is obtained, based on the configuration information, M candidate file information is determined, M is a positive integer, for any candidate file information, the candidate file corresponding to the candidate file information is obtained, and the candidate file is downloaded to the target storage location, in the target storage location, according to the configuration information, the candidate file is format-converted to generate a parameter file, and the parameter file is imported into the target device. In this way, the parameter file can be automatically imported into the target device, thereby avoiding the situation of missing import or incorrect import due to manual operation to import the parameter file.
[0043] As shown in Figure 2 , it is an implementation flow diagram of another parameter file import method provided by the embodiments of the present application, which can specifically include the following contents: S201, based on a preset synchronization strategy, obtaining configuration information corresponding to a product.
[0044] In the embodiments of the present application, this step is similar to the above step S101, and the embodiments of the present application will not be repeated here.
[0045] S202, based on the configuration information, determining M candidate file information, M being a positive integer.
[0046] In the embodiments of the present application, this step is similar to the above step S102, and the embodiments of the present application will not be repeated here.
[0047] And how to determine M candidate file information based on configuration information can refer to the method as shown in Figure 3 , as shown in Figure 3 , it is an implementation flow diagram of a method for determining candidate file information provided by the embodiments of the present application, which specifically includes the following steps: S301, obtaining file path information and synchronization state information from the configuration information.
[0048] In the embodiments of the present application, file path information and synchronization state information are obtained from the configuration information. Among them, the file path information refers to the specific storage location of the related file for testing the product in the server or storage system, which is usually represented in directory tree structure (such as / data / test_files / projectA / ). Through the file path information, the physical or virtual storage space where the file is located can be located. The synchronization state information refers to the timestamp corresponding to the last download operation from the server or storage system (such as 2025-07-10 14:30:00).
[0049] In yet another embodiment of the present application, the file path information can be obtained by concatenating the production base, line, work station, product model and other information contained in the configuration information, so as to obtain the corresponding file information list in the server or storage system.
[0050] For example, if the production base of the known product is "Shenzhen", the line is "Line1", the work station is "StationA", and the product model is "ProductX", the file path information " / Shenzhen / Line1 / StationA / ProductX / " can be obtained by concatenating according to certain rules (such as " / production base / line / work station / product model / "), so as to obtain the corresponding file information list in the server or storage system.
[0051] S302, obtaining the file information list from the server according to the file path information.
[0052] In the embodiment of the present application, the file information list is obtained from the server according to the file path information. The file information list refers to the collection of detailed information of all files under the file path corresponding to the file path information in the server. The file information list contains but is not limited to the file name (such as config_v2.1.json), the file type (such as JSON configuration file, binary test data), the file timestamp (recording the last modification time of the file), the file size, etc., which are not limited in the embodiment of the present application.
[0053] In yet another embodiment of the present application, the file information list can also be obtained from the storage system according to the file path information.
[0054] For example, if the network attached storage (NAS) is used as the storage system, the file information list under the specified path can be obtained through the management interface or file sharing protocol (such as SMB, NFS) provided by the NAS.
[0055] S303, taking the file information whose file timestamp exceeds the timestamp of the synchronization state information in the file information list as the candidate file information.
[0056] In the embodiment of the present application, the file information whose file timestamp exceeds the timestamp of the synchronization state information in the file information list is taken as the candidate file information. Specifically, the file information list can be traversed, and the file timestamp of each file information in the file information list is compared with the timestamp of the synchronization state information in the configuration information. The file information whose file timestamp exceeds the timestamp of the synchronization state information is taken as the candidate file information.
[0057] For example, the synchronization status information timestamp is "2025-07-10 14:30:00", and there is a file in the file information list with a file timestamp of "2025-07-11 09:00:00". Since this file's timestamp exceeds the synchronization status information's timestamp, it indicates that the file has been updated or newly created since the last download. Therefore, this file is selected as a candidate file. This process filters out the latest files that need to be downloaded and processed, ensuring that the test uses the latest parameters and data.
[0058] S203: For any candidate file information, obtain the candidate file corresponding to the candidate file information and download the candidate file to the target storage location.
[0059] In this embodiment of the application, this step is similar to step S103 above, and will not be described in detail here.
[0060] The above describes the specific process of downloading candidate files to the target storage location. To ensure that the downloaded candidate files are consistent with the original candidate files, the downloaded candidate files can also be verified. For details, please refer to... Figure 4 The method shown is as follows: Figure 4 The diagram shown illustrates the implementation flow of a candidate file verification method provided in this application, specifically including the following steps: S401: For any candidate file information, obtain the candidate file corresponding to the candidate file information.
[0061] In this embodiment of the application, for any candidate file information, the corresponding candidate file is obtained. Specifically, the corresponding file can be obtained from the server or storage system based on the file path information and file name, and used as the candidate file.
[0062] S402, retrieve the initial encoding value corresponding to the candidate file from the server.
[0063] In this embodiment, the initial encoding value corresponding to the candidate file is obtained from the server. The initial encoding value is the original hash value (such as MD5, SHA-1, SHA-256) of the candidate file on the server, used for subsequent verification of whether the downloaded candidate file has been tampered with or corrupted.
[0064] S403, store the initial encoded value to the initial encoded file in the target storage location.
[0065] In the embodiment of the present application, the initial encoding value is stored into the initial encoding file in the target storage location. The initial encoding file is used to store the initial encoding value. After the initial encoding value is stored into the initial encoding file in the target storage location, the initial encoding value can be stored and managed with the candidate file. The specific storage format can be: file name "candidate file 1" - initial encoding value "encoding 1"; file name "candidate file 2" - initial encoding value "encoding 2".
[0066] S404, download the candidate file to the target storage location.
[0067] In the embodiment of the present application, the candidate file is downloaded to the target storage location. The candidate file can be downloaded to the target storage location through a file transfer protocol (such as FTP, SFTP, HTTP, etc.). The target storage location can be a specific target folder used to contain a series of files for testing the product.
[0068] S405, obtain the candidate file from the target storage location.
[0069] In the embodiment of the present application, the candidate file is obtained from the target storage location. The candidate file is the file downloaded to the target storage location.
[0070] S406, determine the encoding value corresponding to the candidate file.
[0071] In the embodiment of the present application, the encoding value corresponding to the candidate file is determined. The encoding value corresponding to the candidate file can be determined according to a preset algorithm (such as MD5, SHA-1, SHA-256). The specific selection of the preset algorithm can be determined according to the configuration information corresponding to the product. The algorithm corresponding to the initial encoding value is consistent, which is not limited in the embodiment of the present application.
[0072] For example, if the algorithm used by the server to calculate the initial encoding value is SHA-256, the SHA-256 algorithm is also selected to determine the encoding value corresponding to the candidate file.
[0073] S407, obtain the initial encoding value corresponding to the candidate file from the initial encoding file.
[0074] In the embodiment of the present application, the initial encoding value corresponding to the candidate file is obtained from the initial encoding file. Specifically, the initial encoding value corresponding to the candidate file can be obtained by searching the initial encoding file according to the file name of the candidate file.
[0075] For example, if the file name of the candidate file is file 1, the initial encoding value matching "file 1" is searched from the initial encoding file.
[0076] S408, in the case that the encoding value corresponding to the candidate file is consistent with the initial encoding value, performing the step of format converting the candidate file.
[0077] In the embodiment of the present application, in the case that the encoding value corresponding to the candidate file is consistent with the initial encoding value, the step of format converting the candidate file is performed, i.e. steps S204-S208.
[0078] In another embodiment of the present application, if the encoding value corresponding to the candidate file is inconsistent with the initial encoding value, it indicates that the downloaded candidate file has been tampered with or damaged, and the candidate file needs to be downloaded again.
[0079] S204, in the target storage location, obtaining product information from the configuration information.
[0080] In the embodiment of the present application, in the target storage location, product information is obtained from the configuration information. The product information includes model, production batch, serial number, etc. of the product. The target storage location is the location where the candidate file is stored after being downloaded.
[0081] For example, in the television production line, the configuration information contains the model of the television to be tested currently, which is “XX-2025”, and the production batch, which is “Batch-001”.
[0082] S205, obtaining a preset calling rule corresponding to the product information.
[0083] In the embodiment of the present application, a preset calling rule corresponding to the product information is obtained. The preset calling rule includes the file format and file naming rule required by the target device (i.e. the host computer) for testing the product, so as to ensure that the target device can accurately identify and load the corresponding file, which is not limited in the embodiment of the present application.
[0084] For example, for a specific model of television, the preset calling rule requires that the parameter file must have “.inn” as the extension, and the product model and batch number must be included in the file name, so that the host computer can accurately load it.
[0085] S206, according to the product information and the preset calling rule, renaming the candidate file to obtain a parameter file.
[0086] In the embodiment of the present application, according to the product information and the preset calling rule, the candidate file is renamed to obtain a parameter file. Specifically, according to the naming specification in the preset calling rule, the file name of the candidate file is modified to meet the calling requirements of the target device.
[0087] For example, the candidate file in the target storage location "D:\Car_Parts_Test\Downloaded_Files" has a file name "20250101", and according to the preset calling rule, the file should be renamed as "XX-2025_Batch-001_config.inn", XX is the product model, and in the product information, the product model is AA, so the candidate file in the target storage location is renamed to obtain a parameter file, and the parameter file has a file name "AA-2025_Batch-001_config.inn".
[0088] In the embodiment of the present application, the file name corresponding to the parameter file, i.e., the file name of the parameter file, is obtained.
[0089] In the embodiment of the present application, the file name corresponding to the parameter file, i.e., the file name of the parameter file, is obtained.
[0090] For example, in the example of S206, the file name corresponding to the parameter file is "AA-2025_Batch-001_config.inn".
[0091] S208, if the target storage location contains a file with the same file name as the parameter file, the file is moved to the alternative folder.
[0092] In the embodiment of the present application, if the target storage location contains a file with the same file name as the parameter file, the file is moved to the alternative folder to avoid file coverage or conflict. The alternative folder is used to store the file with the same file name, to ensure the accuracy and stability of file processing.
[0093] For example, if the target storage location "D:\Car_Parts_Test\Downloaded_Files" contains three files, the file names of the three files are file1, file2 and file3 respectively, the file name of the file3 after renaming is file2, and it is detected that the file name of the file3 after renaming is consistent with the file name of the file2 in the target storage location, so the file2 in the original target storage location needs to be moved to the alternative folder "Backup" folder, so as to avoid the file name conflict.
[0094] S209, the parameter file is imported into the target device.
[0095] In the embodiment of the present application, this step is similar to the above step S105, and the embodiment of the present application will not be described one by one.
[0096] In addition, in another embodiment of the present application, a synchronization timestamp can also be obtained after the M candidate file information is determined, wherein the synchronization timestamp is the timestamp when the M candidate file information is determined, i.e., the timestamp corresponding to the step S303. According to the synchronization timestamp, the synchronization state information in the configuration information is updated, so that when the product is tested next time, only the candidate files corresponding to the file modification / creation time later than the timestamp corresponding to the synchronization state information are downloaded, and the unnecessary file download is reduced.
[0097] In still another embodiment of the present application, a preset cleaning strategy can also be obtained, wherein the preset cleaning strategy can be the time for cleaning the target storage location, or can be the specific type of file in the target storage location. By periodically cleaning the parameter files in the target storage location that meet the preset cleaning strategy, the storage space can be optimized and the neatness of the file system can be maintained. For example, the parameter files in the target storage location that meet the preset cleaning strategy can be cleaned when the product is tested for the first time every day. For another example, the parameter files in the target storage location that are not accessed for more than a certain time (e.g., 30 days) are cleaned at intervals; or more complex cleaning operations are performed according to the file type, size, etc. The embodiments of the present application do not limit this.
[0098] Corresponding to the above method embodiments, the embodiments of the present application also provide a parameter file import device, as shown in Figure 5 The device can include a configuration information acquisition module 501, a file information determination module 502, a file download module 503, a file generation module 504, and a file import module 505.
[0099] The configuration information acquisition module 501 acquires the configuration information corresponding to the product based on the preset synchronization strategy; The file information determination module 502 determines M candidate file information based on the configuration information, wherein M is a positive integer; The file download module 503 acquires the candidate file corresponding to the candidate file information for any candidate file information, and downloads the candidate file to the target storage location; The file generation module 504 generates a parameter file by format converting the candidate file according to the configuration information in the target storage location; The file import module 505 imports the parameter file to the target device.
[0100] The embodiments of the present application also provide an electronic device, as shown in Figure 6 The electronic device includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604, The memory 603 is used to store a computer program; In an embodiment of the present application, the processor 601, when executing the program stored in the memory 603, implements the following steps: Based on a preset synchronization strategy, configuration information corresponding to the product is acquired, M candidate file information is determined based on the configuration information, M is a positive integer, for any candidate file information, a candidate file corresponding to the candidate file information is acquired, and the candidate file is downloaded to a target storage location, in the target storage location, the candidate file is format-converted to generate a parameter file according to the configuration information, and the parameter file is imported into the target device.
[0101] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0102] The communication interface is used for communication between the above electronic device and other devices.
[0103] The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, for example, at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0104] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0105] In another embodiment of the present application, a storage medium is also provided, and the storage medium stores instructions, when the instructions run on a computer, the computer executes the parameter file import method in any of the above embodiments.
[0106] In yet another embodiment provided in the present application, a computer program product containing instructions, which when executed on a computer, causes the computer to perform the parameter file import method according to any one of the above-mentioned embodiments.
[0107] In the above-mentioned embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product contains one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a storage medium or transferred from one storage medium to another storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD) or a semiconductor medium (for example, Solid State Disk (SSD)) and the like.
[0108] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0109] Each of the embodiments in the specification is described in a relevant manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0110] The above only describes the preferred embodiments of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for importing parameter files, characterized in that, The method includes: Based on a preset synchronization strategy, obtain the configuration information corresponding to the product; Based on the configuration information, M candidate file information is determined, where M is a positive integer; For any of the candidate file information, obtain the candidate file corresponding to the candidate file information, and download the candidate file to the target storage location; In the target storage location, the candidate files are converted according to the configuration information to generate a parameter file; Import the parameter file into the target device.
2. The method according to claim 1, characterized in that, The step of determining M candidate file information based on the configuration information includes: Obtain file path information and synchronization status information from the configuration information; Based on the file path information, obtain a list of file information from the server; Files whose timestamps in the file information list exceed the timestamps of the synchronization status information are selected as candidate file information.
3. The method according to claim 1, characterized in that, The step of converting the candidate files according to the configuration information to generate a parameter file includes: Obtain product information from the configuration information; Obtain the preset calling rules corresponding to the product information; Based on the product information and the preset calling rules, the candidate file is renamed to obtain the parameter file.
4. The method according to claim 1, characterized in that, Before downloading the candidate file to the target storage location, the method further includes: Obtain the initial encoding value corresponding to the candidate file from the server; The initial encoded value is stored in the initial encoded file in the target storage location.
5. The method according to claim 4, characterized in that, After downloading the candidate file to the target storage location, the process includes: Obtain the candidate file from the target storage location; Determine the encoding value corresponding to the candidate file; Obtain the initial encoding value corresponding to the candidate file from the initial encoding file; If the encoding value corresponding to the candidate file is consistent with the initial encoding value, the step of converting the format of the candidate file is performed.
6. The method according to claim 1, characterized in that, Following the generation of the parameter file, the following is also included: Obtain the filename corresponding to the parameter file; If a file with the same name as the parameter file exists in the target storage location, the file with the same name will be moved to the alternative folder.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the synchronization timestamp, which is the timestamp when the information of the M candidate files was determined; Update the synchronization status information in the configuration information according to the synchronization timestamp.
8. The method according to claim 1, characterized in that, The method further includes: Get the preset cleanup strategy; Periodically clean up parameter files in the target storage location that conform to the preset cleanup strategy.
9. A parameter file import device, characterized in that, The device includes: The configuration information acquisition module acquires the configuration information corresponding to the product based on a preset synchronization strategy. The file information determination module determines M candidate file information based on the configuration information, where M is a positive integer; The file download module, for any of the aforementioned candidate file information, obtains the candidate file corresponding to the candidate file information and downloads the candidate file to the target storage location; The file generation module, in the target storage location, performs format conversion on the candidate files according to the configuration information to generate a parameter file; The file import module imports the parameter file into the target device.
10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-8.