File processing method, device, electronic device and storage medium

By generating new versions of files in a hierarchical distributed test system and creating new root files, the complexity of file version management and collaborative work in the test system is solved, and effective version management and tracking of version iteration history is realized.

CN119782272APending Publication Date: 2025-04-08北歌(潍坊)智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411730222.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In a hierarchical distributed testing system, managing and coordinating files for multiple test parameters and steps becomes complicated, and effective file version management and collaborative working mechanisms are lacking.

Method used

Provides a file processing method to achieve version management of the target object file by generating a new version of the file and creating a new root file. The method includes responding to a file modification request, generating a new version of the file, and updating the root file and header file to track the file's version iteration history.

Benefits of technology

This method facilitates version management of the target object's files. Users can track the complete version iteration history of the file based on the root file, reducing the amount of data backed up in the distributed system and file space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782272A_ABST
    Figure CN119782272A_ABST
Patent Text Reader

Abstract

The present disclosure provides a file processing method, device, electronic device and storage medium, the method comprising: providing a first group of files of a target object; wherein the first group of files includes multiple files; in response to a first modification request for a first file in the first group of files, generating a new version of the first file and creating a new root file; wherein the new root file represents a second group of files, the second group of files includes a second file and the new version of the first file, the first file is any one or more files in the first group of files, and the second file is a file in the first group of files other than the first file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of file processing technology, and more specifically, to a file processing method, device, electronic device and storage medium. Background Art

[0002] In the test system, a layered distributed test system is usually designed, including a host computer test management system, a board data acquisition system, and so on.

[0003] Hierarchical distributed test systems are usually designed with multiple layers, each with its own specific functions and responsibilities. The host computer test management system is responsible for the coordination and management of the overall test process, providing user interface and data analysis functions. The board data acquisition system focuses on the collection and processing of real-time data to ensure the accuracy and reliability of test data. Through this hierarchical architecture, each component can work independently of each other while being able to collaborate efficiently.

[0004] Each product may involve different test parameters and test steps, which makes it particularly necessary to uniformly manage the test parameter files. Summary of the invention

[0005] An object of the embodiments of the present disclosure is to provide a file processing method, device, electronic device and storage medium.

[0006] According to a first aspect of an embodiment of the present disclosure, there is provided a file processing method, comprising:

[0007] Providing a first set of files of a target object; wherein the first set of files includes a plurality of files;

[0008] In response to a first modification request for a first file in the first group of files, a new version of the first file is generated, and a new root file is created; wherein the new root file represents a second group of files, the second group of files includes a second file and the new version of the first file, the first file is any one or more files in the first group of files, and the second file is a file in the first group of files other than the first file.

[0009] Optionally, after creating the new root file, the method further includes:

[0010] A header file representing a file version corresponding to the target object is modified according to the new root file so that the header file points to the new root file.

[0011] Optionally, the method further includes:

[0012] In response to a second modification request for the header file, the header file is modified so that the header file points to an old root file, wherein the old root file represents the first group of files.

[0013] Optionally, the method further includes:

[0014] In response to a request from another electronic device to obtain the file of the target object, a group of files represented by the root file pointed to by the header file is obtained as the target file, and the target file is sent to the other electronic device.

[0015] Optionally, the first group of files and the second group of files are stored in a first folder, the first folder includes a second folder corresponding to each file in the first group of files, and each second folder includes a corresponding file of at least one version.

[0016] Optionally, the header file, the new root file and the old root file are stored in the same folder.

[0017] Optionally, after generating the first file of the new version, the method further includes:

[0018] The new version of the first file is sent to other electronic devices.

[0019] According to a second aspect of the present disclosure, there is provided a file processing device, comprising:

[0020] A file providing module, used for providing a first set of files of a target object; wherein the first set of files includes a plurality of files;

[0021] A file modification module is used to generate a new version of the first file and create a new root file in response to a first modification request for the first file in the first group of files; wherein the new root file represents a second group of files, the second group of files includes a second file and the new version of the first file, the first file is any one or more files in the first group of files, and the second file is a file in the first group of files other than the first file.

[0022] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the method described in the first aspect of the present disclosure under the control of the computer program.

[0023] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect of the present disclosure is implemented.

[0024] Through the embodiments of the present disclosure, in response to a first modification request for a first file in a first group of files of a target object, a new version of the first file is generated and a new root file is created, which can facilitate version management of the files of the target object and facilitate users to track the complete version iteration history of the files based on the root file.

[0025] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0027] Figure 1 is a block diagram of an electronic device according to an embodiment of the present disclosure;

[0028] Figure 2 is a flowchart of a file processing method according to an embodiment of the present disclosure;

[0029] Figure 3 is a schematic diagram of a file directory according to an embodiment of the present disclosure;

[0030] Figure 4 is a schematic diagram of a file directory according to another embodiment of the present disclosure;

[0031] Figure 5 is a block diagram of a file processing device according to an embodiment of the present disclosure;

[0032] Figure 6 is a block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0034] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0035] Technologies, methods and equipment known to persons of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods and equipment should be considered part of the specification.

[0036] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0037] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0038] <Hardware Configuration>

[0039] Figure 1 1 is a block diagram showing a hardware configuration of an electronic device 1000 that can implement an embodiment of the present disclosure.

[0040] The electronic device 1000 may be a portable computer, a desktop computer, a mobile phone, a tablet computer, etc. In one example, the electronic device 1000 may be a master device or any controlled device in a distributed system.

[0041] In one example, the distributed system can be a hierarchical distributed test system, the master control device can be a host computer test management system, and the controlled device can be a board data acquisition system. The host computer test management system is responsible for the coordination and management of the overall test process, providing a user interface and data analysis functions. The board data acquisition system focuses on the collection and processing of real-time data to ensure the accuracy and reliability of the test data. Through this hierarchical architecture, each component can work independently of each other while being able to collaborate efficiently.

[0042] like Figure 1 As shown, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. Among them, the processor 1100 may be a processor CPU, a microprocessor MCU, and the like. The memory 1200 includes, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, and the like. The communication device 1400 is, for example, capable of wired or wireless communication, and may specifically include Wifi communication, Bluetooth communication, 2G / 3G / 4G / 5G communication, and the like. The display device 1500 is, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. The user may input / output voice information through the speaker 1700 and the microphone 1800.

[0043] Figure 1The electronic device shown is merely illustrative and does not in any way imply any limitation on the present disclosure, its application or use. In the embodiments of the present disclosure, the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to perform any one of the methods provided in the embodiments of the present disclosure. It should be understood by those skilled in the art that although Figure 1 In the electronic device 1000, multiple devices are shown, but the present disclosure may only involve some of the devices, for example, the electronic device 1000 only involves the processor 1100 and the memory 1200. A technician can design instructions according to the scheme disclosed in the present disclosure. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0044] <Method Example>

[0045] The present disclosure provides a file processing method, which may be implemented by an electronic device, and the electronic device may be the aforementioned electronic device 1000.

[0046] Figure 2 The figure is a flowchart of a file processing method according to an embodiment of the present disclosure.

[0047] like Figure 2 As shown, the method includes steps S2100 to S2200 as shown below:

[0048] Step S2100: providing a first set of files of a target object.

[0049] The first group of files includes multiple files.

[0050] The target object may be, for example, a product to be tested, test equipment, test tasks, etc.

[0051] The first set of files of the target object may be the test steps of the product to be tested, the test parameters of the test equipment, the test parameters of the product to be tested, the test steps of the test task, etc.

[0052] Step S2200, in response to a first modification request for a first file in a first group of files, generates a new version of the first file and creates a new root file; wherein the new root file represents a second group of files, the second group of files includes the second file and the new version of the first file, the first file is any one or more files in the first group of files, and the second file is a file in the first group of files other than the first file.

[0053] In this embodiment, the first modification request may be triggered when the user performs a modification action on the first file, or may be triggered when the user performs an operation of saving the modification after modifying the first file.

[0054] For example, the first group of files includes file a of version 2, file b of version 1, file c of version 1, and file d of version 2. Then, in response to a first modification request for file a of version 2, file a of version 3 is generated, and the second group of files may include file a of version 3, file b of version 1, file c of version 1, and file d of version 2.

[0055] Before modifying the first file, the old root file points to the first set of files, namely, file a of version 2, file b of version 1, file c of version 1, and file d of version 2. Correspondingly, the new root file will point to the second set of files, namely, file a of version 3, file b of version 1, file c of version 1, and file d of version 2.

[0056] In an example, Figure 3 As shown, the first group of files and the second group of files are stored in a first folder, the first folder includes a second folder corresponding to each file in the first group of files, and each second folder includes a corresponding file of at least one version.

[0057] Specifically, the first folder may include a second folder a, b, c and d. The second folder a may include the first version of file a and the second version of file a. The second folder b may include the first version of file b. The second folder c may include the first version of file c. The second folder d may include the first version of file d and the second version of file d.

[0058] Further, in response to the first modification request for the second version of the file a, a new version of the first file, ie, the third version of the file a, may be generated in the second folder a.

[0059] By storing and recording the first group of files and the second group of files in the storage method of this embodiment, it is convenient for users to search.

[0060] Through the embodiments of the present disclosure, in response to a first modification request for a first file in a first group of files of a target object, a new version of the first file is generated and a new root file is created, which can facilitate version management of the files of the target object and facilitate users to track the complete version iteration history of the files based on the root file.

[0061] In one embodiment of the present disclosure, after generating the new version of the first file, the method further includes: sending the new version of the first file to other electronic devices.

[0062] In this embodiment, the other electronic devices may be devices located in the same distributed system as the electronic device executing this embodiment. For example, the electronic device executing the method of this embodiment may be a master device in a distributed system, and the other electronic devices may be controlled devices in the distributed system. For another example, the electronic device executing the method of this embodiment may be any controlled device in a distributed system, and the other electronic devices may be other controlled devices in the distributed system. For another example, the electronic device executing the method of this embodiment may be any controlled device in a distributed system, and the other electronic devices may be a master device in the distributed system.

[0063] Through this embodiment, when any file of the target object is modified, the amount of data backed up in the distributed system can be reduced, the amount of data synchronized with the electronic device can be reduced, and the space occupied by files on each electronic device can be effectively reduced.

[0064] In one embodiment of the present disclosure, after creating the new root file, the method further includes: modifying a header file representing a file version corresponding to the target object according to the new root file, so that the header file points to the new root file.

[0065] In this embodiment, a third folder Root may be pre-constructed to store the header file header.

[0066] Specifically, the file name of the new root file may be included in the header file to point to the new root file, wherein the file name of the root file may be a version number of a set of files.

[0067] This embodiment uses the header file so that a group of files of the latest version of the target object can be obtained later according to the header file.

[0068] In one embodiment of the present disclosure, the method further includes: in response to a second modification request for the header file, modifying the header file so that the header file points to an old root file, and the old root file represents the first group of files.

[0069] In this embodiment, the second modification request can be triggered when the user modifies the file names of a group of files pointed to by the header file according to actual needs, or it can be triggered when the user modifies the file names of a group of files pointed to by the header file and saves the changes.

[0070] By modifying the file name contained in the header file, the group of files pointed to by the header file can be modified to facilitate jump editing, version tracing, etc. of the file version of the target object.

[0071] In one embodiment of the present disclosure, the header file, the new root file, and the old root file are stored in the same folder.

[0072] In this embodiment, if Figure 4 As shown, the header file head, the new root file 2, and the old root file 1 can all be stored in the third folder Root.

[0073] In one embodiment of the present disclosure, the method further includes: in response to a request from other electronic devices to obtain files of the target object, obtaining a group of files represented by the root file pointed to by the header file as the target files, and sending the target files to other electronic devices.

[0074] The request of other electronic devices to obtain the file of the target object may be sent from other electronic devices to the electronic device, may be triggered by the user performing a corresponding operation through the electronic device, or may be triggered at a fixed time.

[0075] In one embodiment, if the header file points to the old root file, and the old root file points to the first group of files, namely, file a of version 2, file b of version 1, file c of version 1, and file d of version 2, then file a of version 2, file b of version 1, file c of version 1, and file d of version 2 can be sent to other electronic devices.

[0076] In another embodiment, if the header file points to a new root file, the new root file will point to the second group of files, namely, file a of version 3, file b of version 1, file c of version 1, and file d of version 2. Then, file a of version 3, file b of version 1, file c of version 1, and file d of version 2 can be sent to other electronic devices.

[0077] Through this embodiment, the jump editing and version tracing of the file version of the target object can be achieved by modifying the header file.

[0078] <Device Example>

[0079] The present disclosure also provides a file processing device, such as Figure 5 As shown, the file processing device 5000 may include a file providing module 5100 and a file modifying module 5200 .

[0080] The file providing module 5100 is used to provide a first group of files of a target object; wherein the first group of files includes multiple files.

[0081] The file modification module 5200 is used to generate a new version of the first file and create a new root file in response to a first modification request for the first file in the first group of files; wherein the new root file represents a second group of files, the second group of files includes a second file and the new version of the first file, the first file is any one or more files in the first group of files, and the second file is a file in the first group of files other than the first file.

[0082] In one embodiment of the present disclosure, the file processing device 5000 further includes:

[0083] A module for modifying a header file representing a file version corresponding to the target object according to the new root file so that the header file points to the new root file.

[0084] In one embodiment of the present disclosure, the file processing device 5000 further includes:

[0085] The module is configured to modify the header file in response to a second modification request for the header file, so that the header file points to a module of an old root file, wherein the old root file represents the first group of files.

[0086] In one embodiment of the present disclosure, the file processing device 5000 further includes:

[0087] A module for obtaining a group of files represented by the root file pointed to by the header file as target files in response to a request from other electronic devices to obtain files of the target object, and sending the target files to the other electronic devices.

[0088] In one embodiment of the present disclosure, the first group of files and the second group of files are stored in a first folder, the first folder includes a second folder corresponding to each file in the first group of files, and each second folder includes a corresponding file of at least one version.

[0089] In one embodiment of the present disclosure, the header file, the new root file and the old root file are stored in the same folder.

[0090] In one embodiment of the present disclosure, the file processing device 5000 further includes:

[0091] A module for sending the new version of the first file to other electronic devices.

[0092] <Electronic Equipment Embodiment>

[0093] This embodiment provides an electronic device. In one aspect, the electronic device may include the aforementioned file processing device 5000.

[0094] On the other hand, Figure 6 As shown, the electronic device 6000 may include a processor 6100 and a memory 6200, the memory 6200 is used to store a computer program, and the processor 6100 is used to control the electronic device to execute the method of any embodiment of the present disclosure under the control of the computer program.

[0095] <Readable Storage Medium Embodiment>

[0096] This embodiment provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method described in any method embodiment of the present disclosure is executed.

[0097] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0098] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0099] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0100] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.

[0101] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.

[0102] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0103] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0104] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes 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 action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0105] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.

Claims

1. A file processing method, characterized in that: include: Providing a first set of files of a target object; wherein the first set of files includes a plurality of files; In response to a first modification request for a first file in the first group of files, a new version of the first file is generated, and a new root file is created; wherein the new root file represents a second group of files, the second group of files includes a second file and the new version of the first file, the first file is any one or more files in the first group of files, and the second file is a file in the first group of files other than the first file.

2. The method according to claim 1, characterized in that: After creating the new root file, the method further includes: A header file representing a file version corresponding to the target object is modified according to the new root file so that the header file points to the new root file.

3. The method according to claim 2, characterized in that The method further comprises: In response to a second modification request for the header file, the header file is modified so that the header file points to an old root file, wherein the old root file represents the first group of files.

4. The method according to claim 2 or 3, characterized in that: The method further comprises: In response to a request from another electronic device to obtain the file of the target object, a group of files represented by the root file pointed to by the header file is obtained as the target file, and the target file is sent to the other electronic device.

5. The method according to claim 1, characterized in that The first group of files and the second group of files are stored in a first folder, the first folder includes a second folder corresponding to each file in the first group of files, and each second folder includes a corresponding file of at least one version.

6. The method according to claim 3, characterized in that The header file, the new root file and the old root file are stored in the same folder.

7. The method according to claim 1, characterized in that After generating the first file of the new version, the method further includes: The new version of the first file is sent to other electronic devices.

8. A file processing device, characterized in that: include: A file providing module, used for providing a first group of files of a target object; wherein the first group of files includes a plurality of files; A file modification module is used to generate a new version of the first file and create a new root file in response to a first modification request for the first file in the first group of files; wherein the new root file represents a second group of files, the second group of files includes a second file and the new version of the first file, the first file is any one or more files in the first group of files, and the second file is a file in the first group of files other than the first file.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the method according to any one of claims 1 to 7 under the control of the computer program.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by a processor.