CN112486477B - File generation method and device, electronic equipment and storage medium - Google Patents

File generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112486477B
CN112486477B CN202011489803.XA CN202011489803A CN112486477B CN 112486477 B CN112486477 B CN 112486477B CN 202011489803 A CN202011489803 A CN 202011489803A CN 112486477 B CN112486477 B CN 112486477B
Authority
CN
China
Prior art keywords
configuration
target
file
item
configuration area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011489803.XA
Other languages
Chinese (zh)
Other versions
CN112486477A (en
Inventor
李鸣
肖云
官世良
赵璐
马春宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Future Tv Co ltd
Original Assignee
Future Tv Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Future Tv Co ltd filed Critical Future Tv Co ltd
Priority to CN202011489803.XA priority Critical patent/CN112486477B/en
Publication of CN112486477A publication Critical patent/CN112486477A/en
Application granted granted Critical
Publication of CN112486477B publication Critical patent/CN112486477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a file generation method, a file generation device, electronic equipment and a storage medium, and relates to the technical field of software testing. The file generation method comprises the following steps: displaying a file configuration interface, the file configuration interface comprising: the system comprises a first configuration area, a second configuration area and a third configuration area, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, configuration values of the configuration items in the target configuration area are obtained, and a target file is generated according to the configuration values, and the target configuration area is any one of the first configuration area, the second configuration area and the third configuration area. In the embodiment of the application, the configuration operation of the user in the first configuration area, the second configuration area and the third configuration area is obtained, and the corresponding target file is generated according to the configuration operation, so that the generation efficiency and the generation precision of the target file are improved.

Description

File generation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of software testing, and in particular, to a method and apparatus for generating a file, an electronic device, and a storage medium.
Background
Existing software typically sets its upload boundaries during development, for example: the software supports uploading N files at most, uploading files supports N megabits at most, uploading forms supports N rows at most, uploading picture sizes do not exceed NxN, and the like. Software testing is a process that uses manual or automated means to run or determine a certain software system, primarily to verify whether the software meets the expected results or to find the difference between the expected results and the actual results.
The existing software testing method generally adopts the steps that a tester creates a file to copy and paste, performs a drop-down format operation on a table, performs picture cutting through other software, or performs file generation on an online website to obtain a required target file. While online clipping requires a network and payment; the on-line cutting of pictures is easy to cause information leakage; the local cutting needs to install software and pay, and excessive occupation of local computer resources and test file generation are usually carried out by copying and pasting for many times on the basis of small files, so that the working efficiency is low due to occupation of time resources, and the size and the capacity of the generated test files are not well controlled.
The existing software testing method is low in efficiency and cannot accurately control the generation size of the target file.
Disclosure of Invention
In order to solve the problems in the prior art, the application provides a file generation method, a file generation device, electronic equipment and a storage medium.
The first aspect of the present application provides a file generating method, including:
Displaying a file configuration interface, the file configuration interface comprising: the system comprises a first configuration area, a second configuration area and a third configuration area, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, the first configuration area is used for configuring a file containing a record row, the second configuration area is used for configuring a file containing characters, and the third configuration area is used for configuring a picture file;
Responding to the operation of a user on each configuration item and the clicking operation of the generation control, which are executed in a target configuration area, obtaining the configuration value of each configuration item in the target configuration area, and generating a target file according to the configuration value, wherein the target configuration area is any one of the first configuration area, the second configuration area and the third configuration area.
Optionally, the configuration items of the target configuration area include: a file type item;
the generating the target file according to the configuration value comprises the following steps:
And generating a target file according to the configuration value of the file type item, wherein the type of the target file is the configuration value of the file type item.
Optionally, the target configuration area is the first configuration area;
The configuration items of the target configuration area further comprise: a number generation rule item, a separator item and a record line number item;
The responding to the operation of the user for each configuration item executed in the target configuration area and the clicking operation for the generating control, obtaining the configuration value of each configuration item in the target configuration area comprises the following steps:
Acquiring a target number generation rule value selected by a user from at least one selectable value of the number generation rule item;
acquiring a target separator selected by a user from at least one selectable value of the separator item;
and acquiring the target record line number input by the user in the input box corresponding to the record line number item.
Optionally, the generating the target file according to the configuration value includes:
newly creating an original file;
generating a rule value according to the target number, and generating the number of the target record row number;
adding a separator to each number according to the target separator;
And writing the number added with the separator into the original file to obtain the target file.
Optionally, the target configuration area is the second configuration area;
the configuration items of the target configuration area further comprise: text items, file size items;
The responding to the operation of the user for each configuration item executed in the target configuration area and the clicking operation for the generating control, obtaining the configuration value of each configuration item in the target configuration area comprises the following steps:
Acquiring a target text input by a user in an input box corresponding to the text item;
And acquiring a target file size value input by a user in an input box corresponding to the file size item.
Optionally, the generating the target file according to the configuration value includes:
newly creating an original file;
And circularly and repeatedly writing the target text into the original file until the size of the original file reaches the target file size value, and taking the original file with the size reaching the target file size value as the target file.
Optionally, the target configuration area is the third configuration area;
The configuration items of the target configuration area further comprise: an abscissa starting position item, an abscissa ending position item, an ordinate starting position item, and an ordinate ending position item;
The responding to the operation of the user for each configuration item executed in the target configuration area and the clicking operation for the generating control, obtaining the configuration value of each configuration item in the target configuration area comprises the following steps:
Acquiring an abscissa initial position value input by a user in an input box corresponding to the abscissa initial position item;
Acquiring an abscissa ending position value input by a user in an input box corresponding to the abscissa ending position item;
Acquiring an ordinate initial position value input by a user in an input box corresponding to the ordinate initial position item;
and acquiring an ordinate ending position value input by a user in an input box corresponding to the ordinate ending position item.
Optionally, the generating the target file according to the configuration value includes:
And taking the vertex formed by the abscissa initial position value and the ordinate final position value and the vertex formed by the abscissa final position value and the ordinate initial position value as the vertex of a target file, and cutting out the target file from an original picture file.
A second aspect of the present application provides a file generating apparatus including: a display unit, a generation unit;
The display unit is configured to display a file configuration interface, where the file configuration interface includes: the system comprises a first configuration area, a second configuration area and a third configuration area, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, the first configuration area is used for configuring a file containing a record row, the second configuration area is used for configuring a file containing characters, and the third configuration area is used for configuring a picture file;
the generating unit is used for responding to the operation of each configuration item executed by a user in a target configuration area and the clicking operation of the generating control, acquiring the configuration value of each configuration item in the target configuration area, and generating a target file according to the configuration value, wherein the target configuration area is any one of the first configuration area, the second configuration area and the third configuration area.
Optionally, the configuration items of the target configuration area include: a file type item;
The generating unit is used for generating a target file according to the configuration value of the file type item, wherein the type of the target file is the configuration value of the file type item.
Optionally, the target configuration area is the first configuration area;
The configuration items of the target configuration area further comprise: a number generation rule item, a separator item and a record line number item;
the generating unit is used for acquiring a target number generating rule value selected by a user from at least one selectable value of the number generating rule item;
acquiring a target separator selected by a user from at least one selectable value of the separator item;
and acquiring the target record line number input by the user in the input box corresponding to the record line number item.
Optionally, the generating unit is used for creating an original file;
generating a rule value according to the target number, and generating the number of the target record row number;
adding a separator to each number according to the target separator;
And writing the number added with the separator into the original file to obtain the target file.
Optionally, the target configuration area is the second configuration area;
the configuration items of the target configuration area further comprise: text items, file size items;
the generating unit is used for acquiring target text input by a user in an input box corresponding to the text item;
And acquiring a target file size value input by a user in an input box corresponding to the file size item.
Optionally, the generating unit is used for creating an original file;
And circularly and repeatedly writing the target text into the original file until the size of the original file reaches the target file size value, and taking the original file with the size reaching the target file size value as the target file.
Optionally, the target configuration area is the third configuration area;
The configuration items of the target configuration area further comprise: an abscissa starting position item, an abscissa ending position item, an ordinate starting position item, and an ordinate ending position item;
The generating unit is used for acquiring a horizontal coordinate initial position value input by a user in an input frame corresponding to the horizontal coordinate initial position item;
Acquiring an abscissa ending position value input by a user in an input box corresponding to the abscissa ending position item;
Acquiring an ordinate initial position value input by a user in an input box corresponding to the ordinate initial position item;
and acquiring an ordinate ending position value input by a user in an input box corresponding to the ordinate ending position item.
Optionally, the generating unit is configured to cut out the target file from the original picture file by using a vertex formed by the abscissa initial position value and the ordinate final position value and a vertex formed by the abscissa final position value and the ordinate initial position value as a vertex of the target file.
A third aspect of the present application provides an electronic apparatus, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method as described in the first aspect above.
A fourth aspect of the application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the first aspect described above.
The application provides a file generation method, a device, electronic equipment and a storage medium, wherein the file generation method comprises the following steps: displaying a file configuration interface, the file configuration interface comprising: the system comprises a first configuration area, a second configuration area and a third configuration area, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, the first configuration area is used for configuring a file containing a record row, the second configuration area is used for configuring a file containing characters, and the third configuration area is used for configuring a picture file; responding to the operation of a user on each configuration item and the clicking operation of the generation control, which are executed in a target configuration area, obtaining the configuration value of each configuration item in the target configuration area, and generating a target file according to the configuration value, wherein the target configuration area is any one of the first configuration area, the second configuration area and the third configuration area. In the embodiment of the application, the configuration operation of the user in the first configuration area, the second configuration area and the third configuration area is obtained, and the corresponding target file is generated according to the configuration operation, so that the generation efficiency and the generation precision of the target file are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart illustrating a method for generating a file according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a file configuration interface according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for generating a file according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a first configuration area according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a target file according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for generating a file according to another embodiment of the present application;
FIG. 7 is a schematic diagram of a second configuration area according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating a method for generating a file according to another embodiment of the present application;
FIG. 9 is a schematic diagram of a third configuration area according to an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating an overall configuration interface of a display file according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a document generating apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments are only some, but not all, embodiments of the application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that the term "comprising" will be used in embodiments of the application to indicate the presence of the features stated hereafter, but not to exclude the addition of other features.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
Furthermore, the terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
Existing software typically sets its upload boundaries during development, for example: the software supports uploading N files at most, uploading files supports N megabits at most, uploading forms supports N rows at most, uploading picture sizes do not exceed NxN, and the like. Software testing is a process that uses manual or automated means to run or determine a certain software system, primarily to verify whether the software meets the expected results or to find the difference between the expected results and the actual results. The existing software testing method generally adopts the steps that a tester creates a file to copy and paste, performs a drop-down format operation on a table, performs picture cutting through other software, or performs file generation on an online website to obtain a required target file. While online clipping requires a network and payment; the on-line cutting of pictures is easy to cause information leakage; the local cutting needs to install software and pay, and excessive occupation of local computer resources and test file generation are usually carried out by copying and pasting for many times on the basis of small files, so that the working efficiency is low due to occupation of time resources, and the size and the capacity of the generated test files are not well controlled.
In order to solve the technical problems existing in the prior art, the application provides an application conception: the method comprises the steps of obtaining configuration operations of a user in a first configuration area, a second configuration area and a third configuration area, and generating corresponding target files according to the configuration operations, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, the first configuration area is used for configuring files containing record rows, the second configuration area is used for configuring files containing characters, the third configuration area is used for configuring picture files, and the generation efficiency and the generation precision of the target files are improved by the method.
The following describes the specific technical scheme provided by the application through possible implementation modes.
Fig. 1 is a schematic flow chart of a file generating method according to an embodiment of the present application, and an execution subject of the method may be a computer, a server, or other devices with processing functions. As shown in fig. 1, the method includes:
s101, displaying a file configuration interface.
Fig. 2 is a schematic diagram of a file configuration interface according to an embodiment of the present application. As shown in fig. 2, the file configuration interface includes: the first configuration area 10, the second configuration area 11 and the third configuration area 12, the first configuration area 10, the second configuration area 11 and the third configuration area 12 respectively comprise at least one configuration item and a generation control. Illustratively, the first configuration area 10 may include: configuration item 101, configuration item 102, and generate control 103; the second configuration area 12 may include: configuration item 111, configuration item 112, and generate control 113; the third configuration area 12 may include: configuration item 121, configuration item 122, and generate control 123; the first configuration area 10 is used for configuring a file containing a record row, the second configuration area 11 is used for configuring a file containing characters, and the third configuration area 12 is used for configuring a picture file.
It should be noted that, the number of configuration items and the number of generating controls in the first configuration area 10, the second configuration area 11, and the third configuration area 12 in fig. 2 are exemplary, and the number of specific configuration items and the number of generating controls are not limited thereto, and may be adjusted accordingly according to specific generating needs.
S102, responding to operation of a user on each configuration item and clicking operation of a generation control, which are executed in a target configuration area, acquiring configuration values of each configuration item in the target configuration area, and generating a target file according to the configuration values.
The target configuration area is any one of the first configuration area, the second configuration area and the third configuration area.
Illustratively, when a configuration value is obtained that the user performs for the first configuration area, for example: when the number generates information such as rule, separator, line number, file generation type, etc., a file containing the record line may be generated according to the configuration value, for example: excel file.
The application provides a file generation method, which comprises the following steps: displaying a file configuration interface, the file configuration interface comprising: the system comprises a first configuration area, a second configuration area and a third configuration area, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, the first configuration area is used for configuring a file containing a record row, the second configuration area is used for configuring a file containing characters, and the third configuration area is used for configuring a picture file; responding to the operation of a user on each configuration item and the clicking operation of the generation control, which are executed in a target configuration area, obtaining the configuration value of each configuration item in the target configuration area, and generating a target file according to the configuration value, wherein the target configuration area is any one of the first configuration area, the second configuration area and the third configuration area. In the embodiment of the application, the configuration operation of the user in the first configuration area, the second configuration area and the third configuration area is obtained, and the corresponding target file is generated according to the configuration operation, so that the generation efficiency and the generation precision of the target file are improved.
Optionally, the configuration items of the target configuration area include: a file type item;
generating a target file according to the configuration value, including: and generating a target file according to the configuration value of the file type item, wherein the type of the target file is the configuration value of the file type item.
Wherein the file type item may include: a first configuration area, a second configuration area, and a third configuration area. When the file type item is the first configuration area, the configuration value of the file type item may be: number generation rules, separators, number of rows, file types, etc. When the file type item is the second configuration area, the configuration value of the file type item may be: text entry boxes, text type selections, file size definition items, and the like. When the file type item is the third configuration area, the configuration value of the file type item may be: start position information and end position information of the file, and the like.
Optionally, responding to an operation for each configuration item and a clicking operation for a generating control executed by a user in a target configuration area, obtaining a configuration value of each configuration item in the target configuration area, and generating a target file according to the configuration value, including: responding to the operation of the user on each configuration item and the clicking operation on the generation control, which are executed in the target configuration area, and acquiring the configuration value of each configuration item in the target configuration area; displaying a confirmation interface, wherein the confirmation interface displays configuration values of each configuration item and a confirmation control; and responding to clicking operation of a user on the confirmation control, and generating a target file according to the configuration value.
Specifically, the target configuration area is a first configuration area; the configuration items of the target configuration area further include: a number generation rule item, a separator item and a record line number item;
Responding to the operation of the user on each configuration item and the clicking operation on the generation control, which are executed in the target configuration area, and obtaining the configuration value of each configuration item in the target configuration area comprises the following steps:
Acquiring a target number generation rule value selected by a user from at least one optional value of a number generation rule item; acquiring a target separator selected by a user from at least one selectable value of separator items; and acquiring the target record line number input by the user in an input box corresponding to the record line number item.
The number generation rule item may be 8-ary, 10-ary or 16-ary, which is not limited in this embodiment of the present application. The separator item may be "no separator", ": the number of recording lines may be set according to actual requirements, for example, 1000, 3000, 10000, etc.
In the embodiment of the application, after the user selects the configuration parameters in each configuration item and clicks the 'generate' control, prompt information is formed according to the selection of the user. All configuration item information of the user can be displayed in the prompt information, and a confirmation button is generated to wait for confirmation of the user.
Fig. 3 is a flowchart of a file generation method according to another embodiment of the present application, where, as shown in fig. 3, generating a target file according to a configuration value includes:
S201, newly creating an original file.
S202, generating a rule value according to the target number, and generating the number of the target record lines.
S203, adding separators to each number according to the target separators.
S204, writing the number added with the separator into the original file to obtain the target file.
In the embodiment of the application, after the selection information of the user on the first configuration area is obtained, a corresponding original file is newly built in the background correspondingly, for example, the original file can be an Excel file. And adding contents on the basis of the original file according to the input number of the user and the input separator information, and finally obtaining the target file.
Fig. 4 is a schematic diagram of a first configuration area provided by an embodiment of the present application, as shown in fig. 4, where the selection number generation rule item is 16 scale, and the separator is ": when the number of the record lines is 10, the clicking operation of the user on the generation control is obtained, the input information of the user is displayed on the interface in the form of prompt information, the user is waited for confirmation again, and after the clicking operation of the user on the 'determination' button is obtained, the corresponding target file is generated. The final generated target file is shown in fig. 5.
It should be noted that, in the example of fig. 4, the first configuration area further includes a file type item, and it should be understood that, in the implementation process, the file type item and other configuration items in fig. 4 may be used simultaneously or separately.
FIG. 6 is a flowchart illustrating a method for generating a file according to another embodiment of the present application, where a target configuration area is a second configuration area; the configuration items of the target configuration area further include: text items, file size items; as shown in fig. 6, in response to an operation performed by a user on each configuration item in a target configuration area and a click operation performed on a generation control, obtaining a configuration value of each configuration item in the target configuration area includes:
s301, acquiring target text input by a user in an input box corresponding to the text item.
S302, acquiring a target file size value input by a user in an input box corresponding to the file size item.
The input box corresponding to the text item is used for obtaining the target text input by the user, and the target text can be information such as a character string, an Arabic number, a Chinese character, a symbol and the like, which is not limited in this embodiment. The input box corresponding to the file size item is used for obtaining the target file size expected by the user, for example, the target file size can be 1MB, 10MB, 100MB, and the like.
Fig. 7 is a schematic diagram of a second configuration area provided in an embodiment of the present application, where as shown in fig. 7, a target text input by a user is "o", and a file size is 1MB. When the trigger operation of the 'generate' button is acquired, a corresponding target file is generated. It should be noted that, in the example of fig. 7, the second configuration area further includes a file type item, and it should be understood that, in the implementation process, the file type item and other configuration items in fig. 7 may be used simultaneously or separately.
Fig. 8 is a flowchart of a file generation method according to another embodiment of the present application, where, as shown in fig. 8, generating a target file according to a configuration value includes:
S402, newly creating an original file.
S402, circularly and repeatedly writing the target text into the original file until the size of the original file reaches the size value of the target file, and taking the original file with the size reaching the size value of the target file as the target file.
It should be noted that, in the embodiment of the present application, after detecting that a user writes a target text in an original file, attribute information of the original file after writing the target text is obtained, specifically, size information of the original file in the attribute information, and according to the size information of the original file and the size value of the target file, the target text is cyclically and repeatedly written into the original file until the size of the original file reaches the size value of the target file.
Illustratively, when the original file size of the written target text is obtained as 10K and the target file size value is 1000K, 1000/10=100, i.e. the target text needs to be written into the original file repeatedly 100 times.
Optionally, the target configuration area is a third configuration area; the configuration items of the target configuration area further include: an abscissa starting position item, an abscissa ending position item, an ordinate starting position item, and an ordinate ending position item;
Responding to the operation of the user on each configuration item and the clicking operation on the generation control, which are executed in the target configuration area, and obtaining the configuration value of each configuration item in the target configuration area comprises the following steps:
acquiring an abscissa initial position value input by a user in an input box corresponding to an abscissa initial position item;
acquiring a horizontal coordinate end position value input by a user in an input box corresponding to the horizontal coordinate end position item;
Acquiring an ordinate initial position value input by a user in an input box corresponding to the ordinate initial position item;
and acquiring an ordinate ending position value input by a user in an input box corresponding to the ordinate ending position item.
It should be noted that, in the embodiment of the present application, the abscissa initial position value and the ordinate initial position value are used to indicate the initial position of the original picture interception, and correspondingly, the abscissa end position value and the ordinate end position value are used to indicate the end position of the original picture interception.
When the position range indicated by the abscissa initial position value, the ordinate initial position, the abscissa end position value and the ordinate end position value exceeds the position range of the original picture, warning reminding information is generated.
For example, when the original picture is 400×400 pixels, and the abscissa initial position value, the ordinate initial position value, the abscissa final position value, and the ordinate final position value are respectively 0, 500, and 500, it indicates that the capturing position is beyond the original picture range, and at this time, the warning reminding information is generated.
Optionally, generating the target file according to the configuration value includes:
And taking the vertex formed by the abscissa initial position value and the ordinate final position value and the vertex formed by the abscissa final position value and the ordinate initial position value as the vertex of the target file, and cutting out the target file from the original picture file.
Fig. 9 is a schematic diagram of a third configuration area provided in an embodiment of the present application, as shown in fig. 9, an abscissa start position value is input corresponding to an X start input box, an abscissa end position value is input corresponding to an X end input box, an ordinate start position value is input corresponding to a Y start input box, and an ordinate end position value is input corresponding to a Y end input box. The "select picture cropping" button is used to obtain an initial picture to be cropped, and when the size of the selected initial picture is 400×400 pixels and the target file is 200×200 pixels, the exemplary X start, X end, Y start and Y end that can be input are: 0. 200, 0, 200.
In order to clearly show the file generation method of the embodiment of the present application, a display file configuration interface is shown in its entirety. Fig. 10 is an overall schematic diagram of a display file configuration interface according to an embodiment of the present application, including: the selection of specific configuration items of the first configuration area 10, the second configuration area 11, and the third configuration area 12 in the first configuration area 10, the second configuration area 11, and the third configuration area 12 may refer to the descriptions of fig. 1 to fig. 9, and the description of this embodiment of the present application will not be repeated.
The following describes a device, a storage medium, etc. corresponding to the method for generating a file, and specific implementation processes and technical effects of the method are referred to above, and are not described in detail below.
Fig. 11 is a schematic diagram of a file generating apparatus according to an embodiment of the present application, as shown in fig. 11, the apparatus may include: a display unit 501 and a generation unit 502;
A display unit 501, configured to display a file configuration interface, where the file configuration interface includes: the system comprises a first configuration area, a second configuration area and a third configuration area, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, the first configuration area is used for configuring a file containing a record row, the second configuration area is used for configuring a file containing characters, and the third configuration area is used for configuring a picture file;
The generating unit 502 is configured to obtain a configuration value of each configuration item in a target configuration area in response to an operation performed by a user on each configuration item in the target configuration area and a click operation performed on a generation control, and generate a target file according to the configuration value, where the target configuration area is any one of a first configuration area, a second configuration area, and a third configuration area.
Optionally, the configuration items of the target configuration area include: a file type item;
the generating unit 502 is configured to generate a target file according to the configuration value of the file type item, where the type of the target file is the configuration value of the file type item.
Optionally, the target configuration area is a first configuration area;
the configuration items of the target configuration area further include: a number generation rule item, a separator item and a record line number item;
A generating unit 502, configured to obtain a target number generating rule value selected by a user from at least one selectable value of the number generating rule item;
acquiring a target separator selected by a user from at least one selectable value of separator items;
and acquiring the target record line number input by the user in an input box corresponding to the record line number item.
Optionally, the generating unit 502 is configured to create an original file;
generating a rule value according to the target number, and generating the number of the target record lines;
Adding separators in each number according to the target separators;
And writing the number added with the separator into the original file to obtain the target file.
Optionally, the target configuration area is a second configuration area;
The configuration items of the target configuration area further include: text items, file size items;
a generating unit 502, configured to obtain a target text input by a user in an input box corresponding to a text item;
and acquiring a target file size value input by a user in an input box corresponding to the file size item.
Optionally, the generating unit 502 is configured to create an original file;
and circularly and repeatedly writing the target text into the original file until the size of the original file reaches the size value of the target file, and taking the original file with the size reaching the size value of the target file as the target file.
Optionally, the target configuration area is a third configuration area;
the configuration items of the target configuration area further include: an abscissa starting position item, an abscissa ending position item, an ordinate starting position item, and an ordinate ending position item;
a generating unit 502, configured to obtain an abscissa initial position value input by a user in an input box corresponding to an abscissa initial position item;
acquiring a horizontal coordinate end position value input by a user in an input box corresponding to the horizontal coordinate end position item;
Acquiring an ordinate initial position value input by a user in an input box corresponding to the ordinate initial position item;
and acquiring an ordinate ending position value input by a user in an input box corresponding to the ordinate ending position item.
Optionally, the generating unit 502 is configured to cut out the target file from the original picture file by using, as the vertices of the target file, the vertex formed by the abscissa starting position value and the ordinate ending position value and the vertex formed by the abscissa ending position value and the ordinate starting position value.
Fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application, including: processor 710, storage medium 720 and bus 730, storage medium 720 storing machine-readable instructions executable by processor 710, processor 710 executing machine-readable instructions to perform steps of the above-described method embodiments when the electronic device is operating, processor 710 communicating with storage medium 720 via bus 730. The specific implementation manner and the technical effect are similar, and are not repeated here.
An embodiment of the present application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the above-described method.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing is merely illustrative of embodiments of the present application, and the present application is not limited thereto, and any changes or substitutions can be easily made by those skilled in the art within the technical scope of the present application, and the present application is intended to be covered by the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A document generation method, comprising:
Displaying a file configuration interface, the file configuration interface comprising: the system comprises a first configuration area, a second configuration area and a third configuration area, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, the first configuration area is used for configuring a file containing a record row, the second configuration area is used for configuring a file containing characters, and the third configuration area is used for configuring a picture file;
Responding to the operation of a user on each configuration item and the clicking operation of the generation control executed in a target configuration area, acquiring the configuration value of each configuration item in the target configuration area, and generating a target file according to the configuration value, wherein the target configuration area is any one of the first configuration area, the second configuration area and the third configuration area;
the target configuration area is the second configuration area;
the configuration items of the target configuration area further comprise: text items, file size items;
The responding to the operation of the user for each configuration item executed in the target configuration area and the clicking operation for the generating control, obtaining the configuration value of each configuration item in the target configuration area comprises the following steps:
Acquiring a target text input by a user in an input box corresponding to the text item;
And acquiring a target file size value input by a user in an input box corresponding to the file size item.
2. The method of claim 1, wherein the configuration items of the target configuration area comprise: a file type item;
the generating the target file according to the configuration value comprises the following steps:
And generating a target file according to the configuration value of the file type item, wherein the type of the target file is the configuration value of the file type item.
3. The method according to claim 1 or 2, wherein the target configuration area is the first configuration area;
The configuration items of the target configuration area further comprise: a number generation rule item, a separator item and a record line number item;
The responding to the operation of the user for each configuration item executed in the target configuration area and the clicking operation for the generating control, obtaining the configuration value of each configuration item in the target configuration area comprises the following steps:
Acquiring a target number generation rule value selected by a user from at least one selectable value of the number generation rule item;
acquiring a target separator selected by a user from at least one selectable value of the separator item;
and acquiring the target record line number input by the user in the input box corresponding to the record line number item.
4. A method according to claim 3, wherein said generating a target file from said configuration values comprises:
newly creating an original file;
generating a rule value according to the target number, and generating the number of the target record row number;
adding a separator to each number according to the target separator;
And writing the number added with the separator into the original file to obtain the target file.
5. The method of claim 1, wherein generating the object file from the configuration values comprises:
newly creating an original file;
and circularly and repeatedly writing the target text into the original file until the size of the original file reaches the size value of the target file, and taking the original file with the size reaching the size value of the target file as the target file.
6. The method according to claim 1 or 2, wherein the target configuration area is the third configuration area;
The configuration items of the target configuration area further comprise: an abscissa starting position item, an abscissa ending position item, an ordinate starting position item, and an ordinate ending position item;
The responding to the operation of the user for each configuration item executed in the target configuration area and the clicking operation for the generating control, obtaining the configuration value of each configuration item in the target configuration area comprises the following steps:
Acquiring an abscissa initial position value input by a user in an input box corresponding to the abscissa initial position item;
Acquiring an abscissa ending position value input by a user in an input box corresponding to the abscissa ending position item;
Acquiring an ordinate initial position value input by a user in an input box corresponding to the ordinate initial position item;
and acquiring an ordinate ending position value input by a user in an input box corresponding to the ordinate ending position item.
7. The method of claim 6, wherein generating the object file from the configuration values comprises:
And taking the vertex formed by the abscissa initial position value and the ordinate final position value and the vertex formed by the abscissa final position value and the ordinate initial position value as the vertex of a target file, and cutting out the target file from an original picture file.
8. A document generating apparatus, comprising: a display unit, a generation unit;
The display unit is configured to display a file configuration interface, where the file configuration interface includes: the system comprises a first configuration area, a second configuration area and a third configuration area, wherein the first configuration area, the second configuration area and the third configuration area respectively comprise at least one configuration item and a generation control, the first configuration area is used for configuring a file containing a record row, the second configuration area is used for configuring a file containing characters, and the third configuration area is used for configuring a picture file;
the generating unit is used for responding to the operation of each configuration item executed by a user in a target configuration area and the clicking operation of the generating control, acquiring the configuration value of each configuration item in the target configuration area and generating a target file according to the configuration value, wherein the target configuration area is any one of the first configuration area, the second configuration area and the third configuration area;
the target configuration area is the second configuration area; the configuration items of the target configuration area further comprise: text items, file size items;
The generating unit is further used for acquiring target text input by a user in an input box corresponding to the text item; and acquiring a target file size value input by a user in an input box corresponding to the file size item.
9. An electronic device, comprising: a processor, a storage medium, and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium in communication over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method of any one of claims 1-7.
10. A storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1-7.
CN202011489803.XA 2020-12-15 2020-12-15 File generation method and device, electronic equipment and storage medium Active CN112486477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011489803.XA CN112486477B (en) 2020-12-15 2020-12-15 File generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011489803.XA CN112486477B (en) 2020-12-15 2020-12-15 File generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112486477A CN112486477A (en) 2021-03-12
CN112486477B true CN112486477B (en) 2024-06-04

Family

ID=74917133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011489803.XA Active CN112486477B (en) 2020-12-15 2020-12-15 File generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112486477B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6485774A (en) * 1987-09-28 1989-03-30 Hitachi Ltd Document generator
CN104809099A (en) * 2014-01-24 2015-07-29 京瓷办公信息***株式会社 Document file generating device and document file generation method
CN105740217A (en) * 2014-12-08 2016-07-06 珠海金山办公软件有限公司 Document generation method and device based on document template
CN108182142A (en) * 2016-12-08 2018-06-19 武汉安天信息技术有限责任公司 Test resource integration method, system and function test method, system
CN109635257A (en) * 2018-10-30 2019-04-16 深圳壹账通智能科技有限公司 A kind of configuration method and device of contract template
CN110968997A (en) * 2019-12-03 2020-04-07 广联达科技股份有限公司 Strong controllable document generation method and device, storage medium and electronic equipment
CN111339041A (en) * 2020-03-10 2020-06-26 中国建设银行股份有限公司 File parsing and warehousing and file generating method and device
CN111597151A (en) * 2020-05-20 2020-08-28 广州平云小匠科技有限公司 File generation method and device, computer equipment and storage medium
CN111597781A (en) * 2020-05-19 2020-08-28 浪潮软件集团有限公司 Unstructured big data generation method and system, storage medium and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6485774A (en) * 1987-09-28 1989-03-30 Hitachi Ltd Document generator
CN104809099A (en) * 2014-01-24 2015-07-29 京瓷办公信息***株式会社 Document file generating device and document file generation method
CN105740217A (en) * 2014-12-08 2016-07-06 珠海金山办公软件有限公司 Document generation method and device based on document template
CN108182142A (en) * 2016-12-08 2018-06-19 武汉安天信息技术有限责任公司 Test resource integration method, system and function test method, system
CN109635257A (en) * 2018-10-30 2019-04-16 深圳壹账通智能科技有限公司 A kind of configuration method and device of contract template
CN110968997A (en) * 2019-12-03 2020-04-07 广联达科技股份有限公司 Strong controllable document generation method and device, storage medium and electronic equipment
CN111339041A (en) * 2020-03-10 2020-06-26 中国建设银行股份有限公司 File parsing and warehousing and file generating method and device
CN111597781A (en) * 2020-05-19 2020-08-28 浪潮软件集团有限公司 Unstructured big data generation method and system, storage medium and electronic equipment
CN111597151A (en) * 2020-05-20 2020-08-28 广州平云小匠科技有限公司 File generation method and device, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
eazycode.New Plugin - Text File Manager by EzCode.https://forum.bubble.io/t/new-plugin-text-file-manager-by-ezcode/84171.2020,1-3页. *
New Plugin - Text File Manager by EzCode;eazycode;https://forum.bubble.io/t/new-plugin-text-file-manager-by-ezcode/84171;20200331;1-3页 *
按特定区域/指定位置 批量裁剪图片;方言Freya;https://blog.csdn.net/boluofyFly/article/details/110915916;20201209;第1-3页 *

Also Published As

Publication number Publication date
CN112486477A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN109801347B (en) Method, device, equipment and medium for generating editable image template
CN101957730B (en) Messaging device and information processing method
KR20140114392A (en) Confident item selection using direct manipulation
JP4677442B2 (en) Multi-source, multi-destination data transfer
EP3543948A1 (en) Method for providing e-book service and computer program therefor
CN106611065B (en) Searching method and device
CN113536173B (en) Page processing method and device, electronic equipment and readable storage medium
CN114115681B (en) Page generation method and device, electronic equipment and medium
CN114648615B (en) Method, device and equipment for controlling interactive reproduction of target object and storage medium
CN103839479A (en) High-efficiency electronic-map lettering interaction method
CN109271607A (en) User Page layout detection method and device, electronic equipment
CN111782106A (en) Method, device, electronic equipment and readable medium for displaying page menu bar
CN112181346B (en) Method, device, server, client and medium for processing thinking guide graph
CN112486477B (en) File generation method and device, electronic equipment and storage medium
US8024158B2 (en) Management system and management method of CAD data used for a structural analysis
JP6668868B2 (en) Information processing apparatus and information processing program
EP1901189A2 (en) Parts managing system, parts managing method, computer program and computer readable storage medium
CN106055416B (en) Method and device for data cross-application transfer
CN110851752B (en) Image transmission method and device
CN111596828B (en) cookie synchronization method, device and computer readable storage medium
US11657350B2 (en) Information processing apparatus, workflow test apparatus, and non-transitory computer readable medium
CN114443022A (en) Method for generating page building block and electronic equipment
US20220147693A1 (en) Systems and Methods for Generating Documents from Video Content
CN110221756B (en) Method, device, terminal and storage medium for processing application data
CN113010128A (en) Multi-screen interaction method and system based on BIM (building information modeling)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant