A file creation method, device, electronic device and storage medium

By obtaining attribute templates and creating classification templates, the archive creation process is simplified, and the problem of poor scalability of traditional archive structure is solved, and the efficiency and security improvement of archive creation is achieved.

CN114298238BActive Publication Date: 2024-11-26HANYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111666142.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-11-26
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The field information of traditional archive structure is single and poorly scalable, which leads to cumbersome archive creation process, slow response speed, and unsafe, making it difficult to adjust.

Method used

By obtaining attribute templates, creating classification templates and attribute information templates, simplifying the archive creation process, improving scalability, allowing selection of classification and configuration attributes, and improving archive structure.

Benefits of technology

Simplifies the archive creation process, improves responsiveness and scalability, saves creation time, and improves the security and flexibility of archives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114298238B_ABST
    Figure CN114298238B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method, device, electronic device and storage medium for creating an archive, wherein the method comprises: obtaining an attribute template; creating a classification template according to the attribute template; obtaining an attribute information template according to the classification template; and creating an archive according to the attribute information template. The implementation of the embodiment of the present application simplifies the archive creation process, improves the archive structure, and improves the scalability and response speed of the archive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of archive management, and in particular to an archive creation method, device, electronic device and computer-readable storage medium. Background Art

[0002] The industrial Internet has the characteristics of digitization, networking and intelligence. It can realize digital modeling of assets such as production lines, workshops and factories, network connection of factors such as people, machines, materials, methods, environment and measurement, and intelligent services such as industrial knowledge graphs, experience mechanism precipitation, big data and machine learning.

[0003] However, with the development of the industrial Internet, the application fields are becoming more and more extensive, which has brought about the problem of archive diversification. The archive work scene has changed from the visible physical space to the network virtual space, and the archive security has changed from physical security to network environment security. The traditional archive structure has relatively simple field information and poor scalability, which leads to cumbersome archive creation process, more redundant fields, slow response speed, unsafe information and inconvenient adjustment. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a file creation method, device, electronic device and computer-readable storage medium to simplify the file creation process, improve the file structure, and enhance the scalability and response speed of the file.

[0005] In a first aspect, an embodiment of the present application provides a method for creating a file, the method comprising:

[0006] Get the attribute template;

[0007] Creating a classification template according to the attribute template;

[0008] Obtaining an attribute information template according to the classification template;

[0009] A profile is created according to the attribute information template.

[0010] In the above implementation process, archives are created by creating attribute templates and classification templates, which simplifies the archive creation process and improves the scalability of archives. Archives can be classified and attributed, while improving the archive structure and saving the time of creating archives.

[0011] Furthermore, the step of creating a classification template according to the attribute template includes:

[0012] Obtaining attribute type information in the attribute template;

[0013] A classification template is created according to the attribute type information.

[0014] In the above implementation process, creating a classification template according to the attribute type information can simplify the classification process in the archive creation process, make the type selection more convenient, save classification time, and improve the efficiency of creating classification templates.

[0015] Furthermore, the step of creating a classification template according to the attribute type information includes:

[0016] According to the attribute type information, a template in a matching knowledge base is obtained, and a template corresponding to the attribute type information in the knowledge base with the highest matching degree with the attribute type information is obtained;

[0017] A classification template is created according to the template corresponding to the attribute type information with the highest matching degree.

[0018] In the above implementation process, the template with the highest matching degree in the knowledge base is matched, and a classification template is created according to the template with the highest matching degree, so that the classification template can be more selective and the type of the classification template can be more in line with the archive.

[0019] Furthermore, the step of obtaining the attribute information template according to the classification template includes:

[0020] defining attribute information in the classification template;

[0021] An attribute information template is obtained according to the attribute information.

[0022] In the above implementation process, the attribute information is defined in the classification template, and the attribute information and the type can be combined so that the obtained attribute information template contains more information.

[0023] Furthermore, after the step of obtaining the attribute template, the method further includes:

[0024] The attribute template is initialized to obtain an initialized attribute template.

[0025] In a second aspect, an embodiment of the present application further provides a device for creating a profile, the device comprising:

[0026] Acquisition module, used to obtain attribute templates;

[0027] A template creation module, used to create a classification template according to the attribute template; and also used to obtain an attribute information template according to the classification template;

[0028] The archive creation module is used to create an archive according to the attribute information template.

[0029] In the above implementation process, archives are created by creating attribute templates and classification templates, which simplifies the archive creation process and improves the scalability of archives. Archives can be classified and attributed, while improving the archive structure and saving the time of creating archives.

[0030] Furthermore, the template creation module is also used for:

[0031] According to the attribute type information, a template in a matching knowledge base is obtained, and a template corresponding to the attribute type information in the knowledge base with the highest matching degree with the attribute type information is obtained;

[0032] A classification template is created according to the template corresponding to the attribute type information with the highest matching degree.

[0033] In the above implementation process, the template with the highest matching degree in the knowledge base is matched, and a classification template is created according to the template with the highest matching degree, so that the classification template can be more selective and the type of the classification template can be more in line with the archive.

[0034] Furthermore, the template creation module is also used for:

[0035] defining attribute information in the classification template;

[0036] An attribute information template is obtained according to the attribute information.

[0037] In the above implementation process, the attribute information is defined in the classification template, and the attribute information and the type can be combined so that the obtained attribute information template contains more information.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.

[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.

[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.

[0041] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0042] And it can be implemented according to the contents of the specification. The following is a detailed description of the preferred embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A schematic diagram of a process for creating a file provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of the structure of the archive creation device provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0048] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0049] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not intended to limit the scope of the present application.

[0050] Embodiment 1

[0051] Figure 1 is a flow chart of the archive creation method provided in the embodiment of the present application, such as Figure 1 As shown, the method includes:

[0052] S1, obtain attribute template;

[0053] S2, creating a classification template based on the attribute template;

[0054] S3, obtaining an attribute information template according to the classification template;

[0055] S4, creating a profile based on the attribute information template.

[0056] In the above implementation process, archives are created by creating attribute templates and classification templates, which simplifies the archive creation process and improves the scalability of archives. Archives can be classified and attributed, while improving the archive structure and saving the time of creating archives.

[0057] In S1, the attribute template contains some basic information, such as fixed attributes, styles, etc.

[0058] After getting the attribute template, also include:

[0059] Initialize the attribute template to obtain the initialized attribute template.

[0060] Furthermore, S3 includes:

[0061] Get the attribute type information in the attribute template;

[0062] Create a classification template based on the attribute type information.

[0063] In the above implementation process, creating a classification template according to the attribute type information can simplify the classification process in the archive creation process, make the type selection more convenient, save classification time, and improve the efficiency of creating classification templates.

[0064] Furthermore, the step of creating a classification template according to the attribute type information includes:

[0065] Matching the templates in the knowledge base according to the attribute type information, obtaining the template corresponding to the attribute type information in the knowledge base with the highest matching degree with the attribute type information;

[0066] Create a classification template based on the template corresponding to the attribute type information with the highest matching degree.

[0067] Exemplarily, through a search engine, an existing template in the knowledge base is quickly selected based on keywords in the attribute type information, and the template with the highest matching degree of attribute type information among the existing templates is selected as the classification template to add a new attribute template. Optionally, if there is no template with a high matching degree in the knowledge base, related information such as the attribute type can be defined and a knowledge base can be generated.

[0068] A search engine refers to a system that automatically collects information from the Internet, organizes it, and provides it to users for query. The information on the Internet is vast and disorderly. All the information is like small islands on the ocean. Web links are the crisscrossing bridges between these small islands. The search engine draws a clear information map for users to check at any time. It can extract information from various websites on the Internet (mainly web page text), establish a database, and retrieve records that match the user's query conditions, and return the results in a certain order.

[0069] In the above implementation process, the template with the highest matching degree in the knowledge base is matched, and a classification template is created according to the template with the highest matching degree, so that the classification template can be more selective and the type of the classification template can be more in line with the archive.

[0070] Furthermore, S4 includes:

[0071] Define attribute information in the classification template;

[0072] An attribute information template is obtained according to the attribute information.

[0073] Export the attribute information template and define the attribute information based on the classification template. The attribute information includes data type (number, character, date, enumeration, object, interface), type value (tree structure information, interface), length, precision, unit, whether it is not empty, whether it is displayed, whether it is encrypted, etc.

[0074] In the above implementation process, the attribute information is defined in the classification template, and the attribute information and the type can be combined so that the obtained attribute information template contains more information.

[0075] In S5, when creating a file, you can select a classification template and combine the basic information and attribute information templates to form a new file structure.

[0076] Optionally, the archive can switch the classification template, change the template according to the corresponding attribute information, view the archive effect in a visual way, obtain the data inside the system through redis (a database) or call it through the restful interface for visual display at the front end.

[0077] Redis is a key-value storage system, similar to Memcached (a distributed cache system), it supports relatively more value types, including string, list, set, and zset. These data types support push / pop, add / remove, intersection, union, difference, and richer operations, and these operations are atomic. On this basis, Redis supports various different sorting methods. Like Memcached, in order to ensure efficiency, data is cached in memory. The difference is that Redis will periodically write updated data to disk or write modification operations to additional record files, and on this basis, master-slave synchronization is achieved.

[0078] Redis is a high-performance key-value database. The emergence of Redis has largely compensated for the storage deficiencies of databases such as Memcached, and can be a good supplement to relational databases in some situations. It is also more convenient to use.

[0079] After the file is formed, you can also configure related attribute information, set operation permissions, perform verification, save, etc. After the file is configured, you can dynamically control the visibility of fields and whether they are editable by configuring attribute templates.

[0080] The purpose of the embodiment of the present application is that the system generates a set of basic information templates by default, defines some fixed attributes, and provides classification templates for adding new attribute templates, defining attribute types and other related information and generating a knowledge base or using a search engine to quickly select existing templates with a high degree of match from the knowledge base. When creating an archive, a classification template can be selected to combine the basic information template and the attribute information template to form a new archive structure.

[0081] Optionally, the embodiment of the present application provides a page function for dynamically configuring attributes through a visual interface to control the visibility of attributes, verification information, data format, and whether encryption is required; the background assembles the data required for the corresponding attribute template from the system cache or through a remote interface call, and provides a foreground selection operation to avoid multiple interface requests for obtaining the data source, thereby achieving diversity in file creation and rapid response.

[0082] Embodiment 2

[0083] In order to execute the method corresponding to the above embodiment 1 to achieve the corresponding functions and technical effects, a file creation device is provided below, such as Figure 2 As shown, the device comprises:

[0084] Acquisition module 1, used to acquire attribute template;

[0085] Template creation module 2, used to create a classification template according to the attribute template; and also used to obtain an attribute information template according to the classification template;

[0086] The archive creation module 3 is used to create an archive according to the attribute information template.

[0087] In the above implementation process, archives are created by creating attribute templates and classification templates, which simplifies the archive creation process and improves the scalability of archives. Archives can be classified and attributed, while improving the archive structure and saving the time of creating archives.

[0088] Furthermore, the template creation module 3 is also used for:

[0089] Get the attribute type information in the attribute template;

[0090] Create a classification template based on the attribute type information.

[0091] In the above implementation process, creating a classification template according to the attribute type information can simplify the classification process in the archive creation process, make the type selection more convenient, save classification time, and improve the efficiency of creating classification templates.

[0092] Furthermore, the template creation module 3 is also used for:

[0093] Matching the templates in the knowledge base according to the attribute type information, obtaining the template corresponding to the attribute type information in the knowledge base with the highest matching degree with the attribute type information;

[0094] Create a classification template based on the template corresponding to the attribute type information with the highest matching degree.

[0095] In the above implementation process, the template with the highest matching degree in the knowledge base is matched, and a classification template is created according to the template with the highest matching degree, so that the classification template can be more selective and the type of the classification template can be more in line with the archive.

[0096] Furthermore, the template creation module 3 is also used for:

[0097] Define attribute information in the classification template;

[0098] An attribute information template is obtained according to the attribute information.

[0099] In the above implementation process, the attribute information is defined in the classification template, and the attribute information and the type can be combined so that the obtained attribute information template contains more information.

[0100] Furthermore, the device also includes an initialization module, which is used to:

[0101] Initialize the attribute template to obtain the initialized attribute template.

[0102] The above-mentioned archive creation device can implement the method of the above-mentioned embodiment 1. The options in the above-mentioned embodiment 1 are also applicable to this embodiment and will not be described in detail here.

[0103] The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned embodiment 1, and will not be repeated in this embodiment.

[0104] Embodiment 3

[0105] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the archive creation method of the first embodiment.

[0106] Optionally, the above-mentioned electronic device may be a server.

[0107] See also Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33 and at least one communication bus 34. The communication bus 34 is used to realize direct connection and communication between these components. The communication interface 32 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.

[0108] The processor 31 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.

[0109] The memory 33 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 33 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 31, the device can execute the above-mentioned Figure 1 The method embodiment involves various steps.

[0110] Optionally, the electronic device may further include a storage controller and an input / output unit. The memory 33, the storage controller, the processor 31, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the device.

[0111] The input and output unit is used to provide users with the task creation and to create an optional time period or preset execution time for the task to enable interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.

[0112] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0113] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the archive creation method of the first embodiment when the computer program is executed by a processor.

[0114] The embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the method described in the method embodiment.

[0115] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing 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 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 flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0117] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0118] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0119] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0120] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for creating a file, characterized in that: The method comprises: Get the attribute template; Creating a classification template according to the attribute template; Obtaining an attribute information template according to the classification template; Creating a profile according to the attribute information template; The step of creating a classification template according to the attribute template comprises: Obtaining attribute type information in the attribute template; Creating a classification template according to the attribute type information; The step of creating a classification template according to the attribute type information includes: According to the attribute type information, a template in a matching knowledge base is obtained, and a template corresponding to the attribute type information in the knowledge base with the highest matching degree with the attribute type information is obtained; A classification template is created according to the template corresponding to the attribute type information with the highest matching degree.

2. The archive creation method according to claim 1, characterized in that: The step of obtaining the attribute information template according to the classification template comprises: defining attribute information in the classification template; An attribute information template is obtained according to the attribute information.

3. The archive creation method according to claim 1, characterized in that: After the step of obtaining the attribute template, the method further includes: The attribute template is initialized to obtain an initialized attribute template.

4. A file creation device, characterized in that: The device comprises: Acquisition module, used to obtain attribute templates; A template creation module, used to create a classification template according to the attribute template; and also used to obtain an attribute information template according to the classification template; A file creation module, used to create a file according to the attribute information template; The template creation module is also used to: Obtaining attribute type information in the attribute template; Creating a classification template according to the attribute type information; According to the attribute type information, a template in a matching knowledge base is obtained, and a template corresponding to the attribute type information in the knowledge base with the highest matching degree with the attribute type information is obtained; A classification template is created according to the template corresponding to the attribute type information with the highest matching degree.

5. The archive creation device according to claim 4, characterized in that: The template creation module is also used to: defining attribute information in the classification template; An attribute information template is obtained according to the attribute information.

6. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the archive creation method according to any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed by a processor, the archive creation method according to any one of claims 1 to 3 is implemented.