CN115658127A - Data processing method and device, electronic equipment and storage medium - Google Patents
Data processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115658127A CN115658127A CN202211228994.3A CN202211228994A CN115658127A CN 115658127 A CN115658127 A CN 115658127A CN 202211228994 A CN202211228994 A CN 202211228994A CN 115658127 A CN115658127 A CN 115658127A
- Authority
- CN
- China
- Prior art keywords
- template
- information
- preset
- file
- reading
- 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.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a data processing method, a data processing device, electronic equipment and a storage medium, and relates to the technical field of big data analysis. One embodiment of the method comprises: receiving a file templating instruction, acquiring a corresponding first file, and converting the first file into a second file in a target format; identifying an information domain in the second file, inquiring a preset template, extracting tag values corresponding to various types of tags in the preset template from the information domain, and replacing the tag values with the preset template; acquiring style configuration information of a preset template, determining the style configuration information as template information by combining the replaced preset template, and storing a corresponding relation with a preset identifier; and responding to a generation instruction of the template component, reading the template information based on the preset identification so as to load the template information to a preset component frame, and generating the target template component. The implementation method can solve the problems that the manual generation of the protocol template assembly needs to spend more labor cost and time and has lower efficiency.
Description
Technical Field
The present invention relates to the field of big data analysis technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
In a scenario that needs page development, such as enterprise software, a user protocol page is one of pages that often need to be implemented, and a user protocol page is usually generated based on a protocol template component, so generating the protocol template component becomes an important task in page development. In the prior art, a protocol template component is generally generated in such a way that a developer manually writes a user protocol in an acquired protocol document into a front-end component code to generate a protocol template component, and then a user protocol page is generated. However, the manual generation of the protocol template component requires much labor cost and time, and is inefficient.
Disclosure of Invention
In view of this, embodiments of the present invention provide a template data processing method and apparatus, an electronic device, and a storage medium, which can solve the problems that a manual generation manner of a protocol template component needs to spend much labor cost and time, and is low in efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a data processing method.
The data processing method of the embodiment of the invention comprises the following steps: receiving a file templating instruction, acquiring a corresponding first file, calling a preset conversion model, and converting the first file into a second file in a target format;
identifying an information domain in the second file, inquiring a preset template to extract tag values corresponding to various types of tags in the preset template from the information domain, and replacing the tag values with the preset template;
acquiring style configuration information of a preset template to determine the style configuration information as template information by combining the replaced preset template, and storing the corresponding relation with a preset identifier;
and responding to a generation instruction of the template component, reading the template information based on the preset identification so as to load the template information to a preset component frame, and generating a target template component.
In one embodiment, the type tags include an information type tag and a link type tag;
extracting tag values corresponding to various types of tags in the preset template from the information domain, wherein the steps of:
searching an information template from the information domain to extract a corresponding information value from the information template based on the information type tag;
searching a link template from the information domain to extract a corresponding link from the link template based on the link type tag.
In yet another embodiment, extracting the corresponding information value based on the information type tag includes:
and acquiring the information field identification and/or the information prompt in the information type label so as to extract the corresponding information value from the information template.
In another embodiment, reading the template information based on the preset identifier to load the template information to a preset component framework includes:
reading the template information from a cache based on the preset identification, and judging whether the effective time of the template information meets a preset condition;
if yes, loading the template information to a preset assembly frame; if not, reading the template information from a database based on the preset identification, and loading the template information to a preset assembly frame.
In another embodiment, the determining whether the valid time of the protocol template information satisfies a preset condition includes:
and reading a token corresponding to the template information from a cache based on the preset identifier, and determining the effective time of the token as the effective time of the template information so as to judge whether a preset condition is met.
In another embodiment, before reading the template information based on the preset identifier, the method further includes:
and acquiring template information corresponding to the preset identification from a database, calling a preset token interface to generate a token based on the preset identification, and setting corresponding effective time to store the template information and the effective time of the token in a cache.
In another embodiment, invoking a preset conversion model to convert the first file into a second file in a target format includes:
querying a history file in a history log to compare with the first file;
in response to the comparison result being consistent, determining the template information corresponding to the history file as the template information corresponding to the first file;
and responding to the inconsistency of the comparison result, calling a preset conversion model, and converting the first file into a second file in a target format.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a data processing apparatus.
A data processing apparatus of an embodiment of the present invention includes: the receiving unit is used for receiving a file templating instruction, acquiring a corresponding first file, calling a preset conversion model and converting the first file into a second file in a target format;
the extracting unit is used for identifying the information domain in the second file, inquiring a preset template so as to extract the label value corresponding to each type of label in the preset template from the information domain, and replacing the label value with the preset template;
the determining unit is used for acquiring the style configuration information of the preset template, determining the style configuration information as template information by combining the replaced preset template, and storing the corresponding relation with the preset identifier;
and the generating unit is used for responding to a generating instruction of the template component, reading the template information based on the preset identification, loading the template information to a preset component frame and generating a target template component.
In one embodiment, the type tags include an information type tag and a link type tag;
the extraction unit is specifically configured to:
searching an information template from the information domain to extract a corresponding information value from the information template based on the information type tag;
searching a link template from the information domain to extract a corresponding link from the link template based on the link type tag.
In another embodiment, the extracting unit is specifically configured to:
and acquiring the information field identification and/or the information prompt in the information type label so as to extract the corresponding information value from the information template.
In another embodiment, the generating unit is specifically configured to:
reading the template information from a cache based on the preset identification, and judging whether the effective time of the template information meets a preset condition;
if yes, loading the template information to a preset assembly frame; if not, reading the template information from a database based on the preset identification, and loading the template information to a preset assembly frame.
In another embodiment, the generating unit is specifically configured to:
and reading a token corresponding to the template information from a cache based on the preset identifier, and determining the effective time of the token as the effective time of the template information so as to judge whether a preset condition is met.
In yet another embodiment, the generating unit is further configured to:
and acquiring template information corresponding to the preset identification from a database, calling a preset token interface to generate a token based on the preset identification, and setting corresponding effective time to store the template information and the effective time of the token in a cache.
In another embodiment, the receiving unit is specifically configured to:
querying a history file in a history log to compare with the first file;
in response to the comparison result being consistent, determining the template information corresponding to the history file as the template information corresponding to the first file;
and responding to the inconsistency of the comparison result, calling a preset conversion model, and converting the first file into a second file in a target format.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the template data processing method provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, which, when executed by a processor, implements the template data processing method provided by an embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product.
A computer program product according to an embodiment of the present invention includes a computer program, and when the computer program is executed by a processor, the computer program implements the template data processing method according to an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, the protocol document can be firstly converted into the target format so as to be conveniently identified, then the label value can be directly extracted from the protocol file of the target format based on each type of label in the preset template so as to be replaced to the preset template, so that the template information of the protocol can be determined by combining the style configuration information, and further, when the template component needs to be generated, the template information can be read and loaded to the component frame so as to generate the template component, namely the protocol template component. In the embodiment of the invention, the protocol document is converted into the recognizable file through format conversion, and then the template information is extracted from the recognizable file based on the preset template and loaded into the component framework in combination with the style configuration information to automatically generate the protocol template component, so that the protocol template component is generated without manual operation of service personnel, the cost is saved, and the generation efficiency of the protocol template component can be improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a system architecture of a data processing system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of one principal flow of a method of data processing according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of yet another major flow of a method of data processing according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of yet another principal flow of a method of data processing according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main elements of an apparatus for data processing according to an embodiment of the present invention;
FIG. 6 is yet another exemplary system architecture diagram to which embodiments of the present invention may be applied;
FIG. 7 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. According to the technical scheme, the data acquisition, storage, use, processing and the like meet relevant regulations of national laws and regulations.
Embodiments of the present invention provide a data processing system, which may be used for generating a scenario of a protocol template component through a low code.
Specifically, in the embodiment of the present invention, processing of a protocol template component is taken as an example for description. In the embodiment of the invention, the data processing system can use the MVC architecture idea to realize a low-code device. FIG. 1 is a block diagram of an architecture of a data processing system. As shown in FIG. 1, a data processing system may include a viewing layer, a control layer, and a model layer.
The viewing layer mainly has the functions of displaying user views and is also a level directly interacted with a user, and the viewing layer mainly comprises a content display module, a configuration module and a preview module. The display module can be used for displaying files with different formats and information and codes of protocol templates in different stages, for example, the display module can display a file which is converted from a DOCX format protocol file input by a user into an HTML format in a left side view, and the right side view displays corresponding template component codes of the HTML format file by using a textarea tag, so that the user can conveniently edit the files in real time; the configuration module can be used for configuring template information, for example, the configuration module can be realized by using a pull-down menu and a text box, so that the style configuration of the final generation assembly can be interactively selected or customized, the configuration information input and taken effect by a user is stored in a database, and the common configuration can be read from the database; the preview module can be used for previewing the generated template component, such as reading style configuration information, rendering in real time, displaying the finally generated page component and the running page effect, and the like, so that a user can rapidly adjust the configuration according to the own requirements. The control layer mainly controls the flow direction of data and updates the data in real time, and the control layer comprises a data updating module and a format conversion method, wherein the data updating module can store user input into a global state by using Vuex and call a dispatch method to realize the control of data flow and the real-time updating of views, and the format conversion method is used for converting the format of an input DOCX protocol file. The model layer is mainly a database, such as a Mysql database, and is used for storing basic data of the template information and user-defined configuration data of a user.
An embodiment of the present invention provides a data processing method, which may be executed by the data processing system shown in fig. 1, as shown in fig. 2, and the method includes:
s201: and receiving a file templating instruction, acquiring a corresponding first file, calling a preset conversion model, and converting the first file into a second file in a target format.
The first file may specifically be a protocol file, and the format of the first file is a DOCX format in an initial state, that is, the first file is a protocol file in a DOCX format. Since DOCX formatted documents are not easily templated, it is necessary to convert DOCX formatted documents into an easy-to-process target format document, i.e., the second document, in this step. In the embodiment of the invention, the second file can be a file in an HTML format, namely a protocol file of an HTML structure.
In the embodiment of the invention, a conversion model for format conversion can be preset and is arranged at a control layer of a template data processing system so as to be called to perform file format conversion.
S202: and identifying the information domain in the second file, inquiring a preset template so as to extract the label value corresponding to each type of label in the preset template from the information domain, and replacing the label value with the preset template.
The second file may include a plurality of items of content, where each item of content may be marked by an identifier or the like in an area, so in this step, an information field in the second file is identified by the identifier, and the information field indicates an area where the content in the second file for generating the template information is located, so in this step, the template information is extracted by identifying the information field, that is, the tag value is extracted. The preset template represents a storage template of the template information, the preset template comprises different types of labels corresponding to the template information, and the different types of labels are used for storing corresponding label values so as to store the required template information.
Specifically, in this step, each type of tag in the preset template may be set based on a format in the information field in the second file, so that a corresponding tag value may be extracted from the information field through each type of tag, and the tag value is replaced to a position corresponding to each type of tag in the preset template, so as to obtain the replaced preset template.
In some embodiments, the type tag may comprise an information type tag and a link type tag, that is, the information data and the link data need to be extracted from the information field, so the extracting step may be performed as: searching the information template from the information domain to extract a corresponding information value from the information template based on the information type tag; the link template is searched from the information domain to extract corresponding links from the link template based on the link type tags.
Since the information field can be further divided into an information template and a link template for providing data of the information field and link data, respectively, in this step, an information value corresponding to the information type tag and a link corresponding to the link type tag can be extracted, respectively. Specifically, the information type tag may be an information field identifier and/or an information prompt, and may further extract a corresponding information value based on the information field identifier and/or the information prompt.
It should be noted that, in the embodiment of the present invention, each type of label in the preset template may be set based on a requirement, for example, the preset template may be defined as a plurality of parallel p labels and may regularly match paragraphs including a personal information field and a prompt, or the preset template may be defined as a paragraph including an a label in a table label and regularly including link information. The information values may specifically include: name, credential type, credential number, business name, unified social credit code, and the like.
S203: and acquiring the style configuration information of the preset template to be determined as template information by combining the replaced preset template, and storing the corresponding relation with the preset identification.
Because the template component needs to perform the style configuration when displaying, the style configuration information of the preset template also needs to be acquired in the step. A particular user may enter style configuration information based on the display module of the system shown in fig. 1. The style configuration information and the replaced preset template can be determined as template information after being obtained, and the template information is stored in a database. The storage mode may be to store a corresponding relationship between the preset identifier and the template information, so as to facilitate query of the template information.
S204: and responding to a generation instruction of the template component, reading the template information based on the preset identification so as to load the template information to a preset component frame, and generating the target template component.
The generation instruction of the template component is used for indicating that the template component needs to be generated, so that the template information can be read through the preset identifier, and then the template information is loaded to the preset component frame to generate the target template component.
Specifically, in order to facilitate the generation of the template component, the template information may be read from the database in advance and stored in the cache, and the valid time is set, so the template information may be read from the cache in this step. In order to ensure data security, effective time can be set for the template information in the cache, when the current time belongs to the effective time, the template information in the cache can be directly used for generating the template component, and when the current time does not belong to the effective time, the template information in the cache can not be directly used for generating the template component, and the template information needs to be obtained from the database again. Therefore, the process of reading the template information and loading the template information to the preset component frame in this step can be executed as follows: reading template information from a cache based on a preset identifier, and judging whether the effective time of the template information meets a preset condition; if so, loading the template information to a preset assembly frame; if not, reading the template information from the database based on the preset identification, and loading the template information to the preset assembly frame.
It should be noted that, in the embodiment of the present invention, after the first file is acquired, the first file may be compared with a history file recorded in a history log; if the comparison result is consistent, it indicates that the template information corresponding to the file is already stored, so that the template information corresponding to the history file can be determined as the template information corresponding to the first file, and then step S203 is executed; if the comparison result is inconsistent, the template information corresponding to the file is not stored, so that a preset conversion model can be called, the first file is converted into a second file in a target format, and a subsequent processing flow is executed.
In the embodiment of the invention, the protocol document is converted into the recognizable file through format conversion, and then the template information is extracted from the recognizable file based on the preset template and loaded into the component frame in combination with the style configuration information to automatically generate the protocol template component, so that the protocol template component is generated without manual operation of service personnel, the cost is saved, and the generation efficiency of the protocol template component can be improved.
The following describes a data processing method in the embodiment of the present invention in detail with reference to the system architecture shown in fig. 1 and the embodiment shown in fig. 2, and as shown in fig. 3, the method includes:
s301: and receiving a file templating instruction, acquiring a corresponding first file, calling a preset conversion model, and converting the first file into a second file in a target format.
S302: an information field in the second file is identified, and an information template and a link template are searched from the information field.
S303: and inquiring a preset template, extracting a corresponding information value based on the information type label, and extracting a corresponding link based on the link type label so as to replace the preset template.
S304: and acquiring style configuration information of the preset template to determine the style configuration information as template information by combining the replaced preset template, and storing the corresponding relation with the preset identification.
S305: and responding to a generation instruction of the template component, reading the template information based on the preset identification so as to load the template information to a preset component template, and generating the target template component.
It should be noted that the data processing principle in the embodiment of the present invention is the same as the corresponding data processing principle in the embodiment shown in fig. 2, and is not described herein again.
Based on the embodiment shown in fig. 2, the present invention provides an implementation manner to explain a specific implementation procedure of step S204 in the data processing method shown in fig. 2. As shown in fig. 4, the method includes:
s401: and responding to a generation instruction of the template component, and acquiring template information corresponding to the preset identification from the database.
When the instruction is generated in response to the first time, the template information is not stored in the cache, so that the template information needs to be acquired from the database.
S402: and calling a preset token interface to generate a token based on the preset identification, and setting corresponding valid time to store the template information and the valid time of the token in a cache.
The token interface can be used for generating a token, and the validity of the template information can be set through the token in the embodiment of the invention, so that the token is generated based on the preset identifier to represent that the token is associated with the template information corresponding to the preset identifier, and the valid time of the token is the valid time of the template information.
It should be noted that the valid information of the token may be set based on the requirement, for example, may be set to 10 minutes.
S403: and reading the template information and the corresponding token from the cache based on the preset identification.
S404: and judging whether the valid time of the token meets a preset condition.
The preset condition may be specifically that the current time belongs to the valid time.
S405: if so, loading the template information to the component template.
S406: if not, reading the template information from the database based on the preset identification.
In the embodiment of the invention, the token is used for setting the effective time of the template information in the cache, so that the effective time of the template information can be controlled more inventively, and the safety of the template information can be effectively improved.
In order to solve the problems in the prior art, an embodiment of the present invention provides a data processing apparatus 500, as shown in fig. 5, the apparatus 500 includes:
a receiving unit 501, configured to receive a file templating instruction, acquire a corresponding first file, call a preset conversion model, and convert the first file into a second file in a target format;
an extracting unit 502, configured to identify a template field in the second file, query a preset template, so as to extract a tag value corresponding to each type of tag in the preset template from the template field, and replace the tag value with the preset template;
a determining unit 503, configured to acquire style configuration information of the preset template, determine the style configuration information as template information by combining with the replaced preset template, and store the template information in a corresponding relationship of the preset identifier;
the generating unit 504 is configured to, in response to a generating instruction of a template component, read the template information based on the preset identifier, so as to load the template information to a preset component template, and generate a target template component.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 2, and the description thereof is omitted.
In one embodiment, the type tags include an information type tag and a link type tag;
the extracting unit 502 is specifically configured to:
searching an information template from the information domain to extract a corresponding information value from the information template based on the information type tag;
searching a link template from the information domain to extract a corresponding link from the link template based on the link type tag.
In another embodiment, the extracting unit 502 is specifically configured to:
and acquiring the information field identification and/or the information prompt in the information type label so as to extract the corresponding information value from the information template.
In another embodiment, the generating unit 503 is specifically configured to:
reading the template information from a cache based on the preset identification, and judging whether the effective time of the template information meets a preset condition;
if yes, loading the template information to a preset assembly frame; if not, reading the template information from a database based on the preset identification, and loading the template information to a preset assembly frame.
In another embodiment, the generating unit 503 is specifically configured to:
and reading a token corresponding to the template information from a cache based on the preset identification, and determining the effective time of the token as the effective time of the template information so as to judge whether a preset condition is met.
In another embodiment, the generating unit 503 is further configured to:
and acquiring template information corresponding to the preset identification from a database, calling a preset token interface to generate a token based on the preset identification, and setting corresponding effective time to store the template information and the effective time of the token in a cache.
In another embodiment, the receiving unit 501 is specifically configured to:
querying a history file in a history log to compare with the first file;
in response to the comparison result being consistent, determining the template information corresponding to the historical file as the template information corresponding to the first file;
and responding to the inconsistency of the comparison result, calling a preset conversion model, and converting the first file into a second file in a target format.
It should be understood that the embodiment of the present invention is implemented in the same manner as the embodiment shown in fig. 2, 3 or 4, and is not repeated herein.
In the embodiment of the invention, the protocol document is converted into the recognizable file through format conversion, and then the template information is extracted from the recognizable file based on the preset template and loaded into the component frame in combination with the style configuration information to automatically generate the protocol template component, so that the protocol template component is generated without manual operation of service personnel, the cost is saved, and the generation efficiency of the protocol template component can be improved.
According to an embodiment of the present invention, an electronic device and a readable storage medium are also provided.
The electronic device of the embodiment of the invention comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the method for data processing provided by the embodiment of the invention.
Fig. 6 shows an exemplary system architecture 600 of a data processing apparatus or a method of data processing to which embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various client applications may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be, but are not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, and the server may analyze and perform other processes on data such as a received product information query request, and feed back a processing result (for example, product information — just an example) to the terminal device.
It should be noted that the data processing method provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the data processing apparatus is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, a block diagram of a computer system 700 suitable for use in implementing embodiments of the present invention is shown. The computer system illustrated in FIG. 7 is only an example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, an extracting unit, a determining unit, and a generating unit. The names of these units do not in some cases constitute a limitation of the unit itself, and for example, a receiving unit may also be described as a "unit that instructs a receiving function".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the data processing methods provided by the present invention.
As another aspect, the present invention also provides a computer program product including a computer program, where the computer program is executed by a processor to implement the method for data processing provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (15)
1. A method of data processing, comprising:
receiving a file templating instruction, acquiring a corresponding first file, calling a preset conversion model, and converting the first file into a second file in a target format;
identifying an information domain in the second file, inquiring a preset template to extract tag values corresponding to various types of tags in the preset template from the information domain, and replacing the tag values with the preset template;
acquiring style configuration information of a preset template to determine the style configuration information as template information by combining the replaced preset template, and storing the corresponding relation with a preset identifier;
and responding to a generation instruction of the template component, reading the template information based on the preset identification so as to load the template information to a preset component frame, and generating a target template component.
2. The method of claim 1, wherein the type tag comprises an information type tag and a link type tag;
extracting tag values corresponding to various types of tags in the preset template from the information domain, wherein the steps of:
searching an information template from the information domain to extract a corresponding information value from the information template based on the information type tag;
searching a link template from the information domain to extract a corresponding link from the link template based on the link type tag.
3. The method of claim 2, wherein extracting the corresponding information value based on the information type tag comprises:
and acquiring the information field identification and/or the information prompt in the information type label so as to extract the corresponding information value from the information template.
4. The method of claim 1, wherein reading the template information based on the preset identifier to load the template information to a preset component framework comprises:
reading the template information from a cache based on the preset identification, and judging whether the effective time of the template information meets a preset condition;
if yes, loading the template information to a preset assembly frame; if not, reading the template information from a database based on the preset identification, and loading the template information to a preset assembly frame.
5. The method of claim 4, wherein determining whether the valid time of the protocol template information satisfies a preset condition comprises:
and reading a token corresponding to the template information from a cache based on the preset identification, and determining the effective time of the token as the effective time of the template information so as to judge whether a preset condition is met.
6. The method of claim 5, wherein before reading the template information based on the preset identifier, the method further comprises:
and acquiring template information corresponding to the preset identification from a database, calling a preset token interface to generate a token based on the preset identification, and setting corresponding effective time to store the template information and the effective time of the token in a cache.
7. The method of claim 1, wherein invoking a preset conversion model to convert the first file into a second file in a target format comprises:
querying a history file in a history log to compare with the first file;
in response to the comparison result being consistent, determining the template information corresponding to the history file as the template information corresponding to the first file;
and responding to the inconsistency of the comparison result, calling a preset conversion model, and converting the first file into a second file in a target format.
8. An apparatus for data processing, comprising:
the receiving unit is used for receiving a file templating instruction, acquiring a corresponding first file, calling a preset conversion model and converting the first file into a second file in a target format;
the extracting unit is used for identifying the information domain in the second file, inquiring a preset template so as to extract the label value corresponding to each type of label in the preset template from the information domain, and replacing the label value with the preset template;
the determining unit is used for acquiring the style configuration information of the preset template, determining the style configuration information as template information by combining the replaced preset template, and storing the corresponding relation with the preset identifier;
and the generating unit is used for responding to a generating instruction of the template component, reading the template information based on the preset identification, loading the template information to a preset component frame and generating a target template component.
9. The apparatus of claim 8, wherein the type tag comprises an information type tag and a link type tag;
the extraction unit is specifically configured to:
searching an information template from the information domain to extract a corresponding information value from the information template based on the information type tag;
searching a link template from the information domain to extract a corresponding link from the link template based on the link type tag.
10. The apparatus according to claim 9, wherein the extraction unit is specifically configured to:
and acquiring the information field identification and/or the information prompt in the information type label so as to extract the corresponding information value from the information template.
11. The apparatus according to claim 8, wherein the generating unit is specifically configured to:
reading the template information from a cache based on the preset identification, and judging whether the effective time of the template information meets preset conditions or not;
if yes, loading the template information to a preset assembly frame; if not, reading the template information from a database based on the preset identification, and loading the template information to a preset assembly frame.
12. The apparatus according to claim 11, wherein the generating unit is specifically configured to:
and reading a token corresponding to the template information from a cache based on the preset identifier, and determining the effective time of the token as the effective time of the template information so as to judge whether a preset condition is met.
13. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
15. A computer program product comprising a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211228994.3A CN115658127A (en) | 2022-10-08 | 2022-10-08 | Data processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211228994.3A CN115658127A (en) | 2022-10-08 | 2022-10-08 | Data processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115658127A true CN115658127A (en) | 2023-01-31 |
Family
ID=84987153
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211228994.3A Pending CN115658127A (en) | 2022-10-08 | 2022-10-08 | Data processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115658127A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116933742A (en) * | 2023-09-14 | 2023-10-24 | 杭州行芯科技有限公司 | Process technology file generation method and device, electronic equipment and storage medium |
-
2022
- 2022-10-08 CN CN202211228994.3A patent/CN115658127A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116933742A (en) * | 2023-09-14 | 2023-10-24 | 杭州行芯科技有限公司 | Process technology file generation method and device, electronic equipment and storage medium |
CN116933742B (en) * | 2023-09-14 | 2023-12-29 | 杭州行芯科技有限公司 | Process technology file generation method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112905178B (en) | Service function page generation method, device, equipment and medium | |
CN113626223A (en) | Interface calling method and device | |
CN112861529A (en) | Method and device for managing error codes | |
CN110705271A (en) | System and method for providing natural language processing service | |
CN112860662A (en) | Data blood relationship establishing method and device, computer equipment and storage medium | |
CN115658127A (en) | Data processing method and device, electronic equipment and storage medium | |
CN113434098B (en) | Printing function realization method, device, electronic equipment, system and storage medium | |
CN112818026A (en) | Data integration method and device | |
CN116362216A (en) | Form data processing method, device, electronic equipment and storage medium | |
CN116737662A (en) | Method, device, electronic equipment and storage medium for processing business data | |
CN116204428A (en) | Test case generation method and device | |
CN112860538A (en) | Method and device for performing interface regression test based on online log | |
CN110858240A (en) | Front-end module loading method and device | |
CN114116675A (en) | Data archiving method and device | |
CN113312900A (en) | Data verification method and device | |
CN113704222A (en) | Method and device for processing service request | |
CN113742321A (en) | Data updating method and device | |
CN112965946B (en) | Method, device, equipment and computer readable medium for processing document | |
CN110874302A (en) | Method and device for determining buried point configuration information | |
CN113779138B (en) | Order management method and device | |
CN114896004A (en) | Data processing method and device, electronic equipment and storage medium | |
CN109376023B (en) | Method and equipment for generating calling information and issuing return code group | |
CN116342058A (en) | Data processing method, device, electronic equipment and storage medium | |
CN110019030B (en) | Method and device for dividing file | |
CN115964052A (en) | Data processing method and device, electronic equipment and computer readable medium |
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 |