CN112445478A - Graphic file processing method, device, equipment and medium - Google Patents

Graphic file processing method, device, equipment and medium Download PDF

Info

Publication number
CN112445478A
CN112445478A CN202011448052.7A CN202011448052A CN112445478A CN 112445478 A CN112445478 A CN 112445478A CN 202011448052 A CN202011448052 A CN 202011448052A CN 112445478 A CN112445478 A CN 112445478A
Authority
CN
China
Prior art keywords
graphic file
file
identification information
label
graphic
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
Application number
CN202011448052.7A
Other languages
Chinese (zh)
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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology 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 Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202011448052.7A priority Critical patent/CN112445478A/en
Publication of CN112445478A publication Critical patent/CN112445478A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure discloses a processing method and device of a graphic file, a storage medium and electronic equipment. The method comprises the following steps: acquiring a graphic file, and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file; and registering the tag of the graphic file on a WEB page, wherein the registered tag is used for calling the graphic file based on the identification information of the graphic file. According to the technical scheme provided by the embodiment of the invention, the graphic file is quickly called through the identification information in the web page development process, so that the management and use efficiency of the graphic file is improved, and the code redundancy in the use process of the graphic file is avoided.

Description

Graphic file processing method, device, equipment and medium
Technical Field
The embodiment of the disclosure relates to the technical field of computer data processing, in particular to a method, a device, equipment and a medium for processing a graphic file.
Background
SVG (Scalable Vector Graphics) files are commonly used files in the development process of Web (World Wide Web) pages.
However, the application mode of the current svg file is complex, so that the system code is bloated and is inconvenient to manage.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, equipment and a medium for processing a real-time graphic file, so as to realize convenient application of the graphic file.
In a first aspect, an embodiment of the present disclosure provides a method for processing a graphics file, where the method includes:
a method for processing a graphics file, comprising:
acquiring a graphic file, and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file;
and registering the tag of the graphic file on a WEB page, wherein the registered tag is used for calling the graphic file based on the identification information of the graphic file.
In a second aspect, an embodiment of the present disclosure further provides an apparatus for processing a graphics file, where the apparatus includes:
the label generating module is used for acquiring a graphic file and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file;
and the label registration module is used for registering the label of the graphic file on a WEB page, wherein the registered label is used for calling the graphic file based on the identification information of the graphic file.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing the graphic file according to any one of the embodiments of the present disclosure.
In a fourth aspect, the embodiments of the present disclosure further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the processing method of the graphics file according to any one of the embodiments of the present disclosure.
According to the technical scheme of the embodiment, the graph file to be used is obtained, the content of the graph file and the label generated by the identification information of the graph file are determined, and the label of the graph file is registered on the WEB page, so that the graph file can be called quickly through the identification information in the WEB page development process, the management and use efficiency of the graph file is improved, and the code redundancy in the graph file use process is avoided.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flowchart of a processing method of a graphic file according to a first embodiment of the disclosure;
fig. 2 is a schematic flow chart illustrating a processing method of a graphic file according to a second embodiment of the disclosure;
fig. 3 is a schematic structural diagram of a processing apparatus for a graphic file according to a fifth embodiment of the disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to a sixth embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
Example one
Fig. 1 is a schematic flow chart of a processing method of a graphic file according to a first embodiment of the present disclosure, where the present disclosure is applicable to a situation where interactive recorded data is generated based on interaction information of a user in a web page development process, and the method may be executed by a processing apparatus of the graphic file, and the apparatus may be implemented in a form of software and/or hardware, and optionally, implemented by an electronic device, where the electronic device may be a mobile terminal, a PC terminal, a server, or the like.
As shown in fig. 1, the method of the present embodiment includes:
s110, obtaining a graphic file, and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file.
And S120, registering the label of the graphic file on a WEB page, wherein the registered label is used for calling the graphic file based on the identification information of the graphic file.
In this embodiment, the graphic file, i.e., the svg file, may be an icon (icon) file, and may also be a picture file, which is a scalable vector graphic file required by a WEB page to be developed. In some embodiments, the graphics file may be uploaded by the operating user and retrieved through an HTML5 interface. In some embodiments, the graphics file may be pre-stored in memory, and recalled from memory prior to WEB page development. Optionally, the memory may store a plurality of types of graphic files in advance, and may be at least one graphic file that is called to be registered according to the type of the WEB page to be developed. Wherein, the same graphic file can be suitable for different types of WEB pages.
Each acquired graphic file is configured with identification information, i.e., id information, which may be a file name or a code of the graphic file, etc., for uniquely characterizing each graphic file. The identification information of the graphic files may be preset by the user, or may be set in sequence according to the registration order or the historical use frequency of the graphic files. The identification information of the graphic file can be a character string formed by any one or more of characters, numbers, letters, symbols and the like.
The label for registering each graphic file is generated by the content of the graphic file and the identification information of the graphic file, the label of each graphic file is registered on the web page to be developed, and after the label is registered, the graphic file can be quickly called and rendered on the web page in a label calling mode, so that the graphic file is convenient to manage and use.
It should be noted that the obtained graphic file is a binary format file, before generating a label, the binary format graphic file is converted into a string format file, and the label for registration is determined based on the string format graphic file and the identification information of the graphic file.
Optionally, generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file includes: and regularizing the content of the graphic file and the identification information of the graphic file to obtain a label in a character string format.
In this embodiment, the graphics file content (i.e., the graphics file in string format) and the identification information (i.e., the id information) are processed through a preset regularized expression, so as to obtain the symbol tag in a string format.
For example, the regular expression used to process the graphic file may be:
Figure BDA0002825579440000051
registering the symbol tag of each graphic file on the web page by calling a registration instruction, for example, taking the registered graphic file as an icon file, the registration instruction may be addsvgsymboliconbox.
Optionally, before registering the tag of the graphic file on the WEB page, the method further includes: determining whether a registration container of the label is arranged on the WEB page; and if not, creating the registration container. By judging the registration container in advance, the registration container provided with the label on the WEB page or the registration container of the registration label is determined, and the condition that the registration fails because the registration container does not exist during label registration is avoided.
After a registration container is set on a WEB page or created, a tag of a graphic file is registered in the registration container. After the label of the graphic file is successfully registered, any registered graphic file can be called in a mode of calling an instruction through the identification information, rendering is carried out on a WEB page, the condition that the graphic file is made in a mode of calling an address is replaced, and efficient calling and management of the graphic file are facilitated.
According to the technical scheme of the embodiment, the graph file to be used is obtained, the content of the graph file and the label generated by the identification information of the graph file are determined, and the label of the graph file is registered on the WEB page, so that the graph file can be called quickly through the identification information in the WEB page development process, the management and use efficiency of the graph file is improved, and the code redundancy in the graph file use process is avoided.
Example two
Fig. 2 is a schematic flow chart of a processing method of a graphic file according to a second embodiment of the disclosure. The present embodiment is optimized based on the foregoing embodiment, and as shown in fig. 2, the method includes:
s210, obtaining a graphic file, and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file.
And S220, registering the label of the graphic file on a WEB page.
S230, receiving a graphic file calling instruction carrying identification information, and calling a graphic file corresponding to the identification information according to the identification information and the registered label in the graphic file calling instruction.
And S240, rendering the called graphic file on a WEB page.
In this embodiment, the attributes of the graphic files are set, for example, each graphic file is set with a color adaptive attribute and a size adaptive attribute. The color self-adaptive attribute is used for automatically determining rendered colors to be rendered when the graphic file is called, and similarly, the size self-adaptive attribute is used for automatically determining rendered sizes (such as rendered width and rendered height) to be rendered when the graphic file is called, so that other settings are not needed, convenience and rapidness are achieved, and convenience of the graphic file in the using process is improved.
The color adaptive attribute and the size adaptive attribute of the graphic file may be set in advance before the graphic file is uploaded or may be set before registration. For example, before registering the tags of the graphic files, it is determined whether a color adaptive attribute and a size adaptive attribute are set in each graphic file, if so, the tags of the graphic files are directly registered, and if not, the attributes of the graphic files without the color adaptive attribute and the size adaptive attribute are set.
Optionally, the color adaptive attribute is set by a file, currentColor, and the size adaptive attribute may be set in a unit form of em.
Correspondingly, rendering the called graphic file on the WEB page, which comprises the following steps: sequentially traversing parent tags of the called graphic files to obtain color attributes and size attributes in the parent tags; rendering the graphics file based on the color attributes and the size attributes in the parent tag. Specifically, a call instruction of the graphics file is received, and the call instruction is configured with identification information for calling the graphics file, and for example, the call instruction of the graphics file may be < use href ═ { id } > < use >. And determining a corresponding registered tag by calling identification information (namely id information) in the instruction, determining the content of the graphic file based on the registered tag, and rendering the content of the graphic file. The size attribute and the color attribute of the graphic file are automatically obtained, and self-adaptive rendering is carried out. Specifically, a parent tag of a tag to be rendered currently is determined, and when the parent tag exists, a color attribute and a size attribute in the parent tag are determined. It should be noted that, if there is no one or more of the color attribute and the size attribute in the current parent label, the parent label of the current parent label is further determined based on the nesting relationship between the labels, and each parent label having the nesting relationship is traversed until the color attribute and the size attribute are determined or the previous parent label does not exist, and the traversal is stopped. Optionally, the determined color attribute and size attribute are determined as the color attribute and size attribute of the tag (i.e. graphics file) to be currently rendered. Optionally, according to the attribute setting rule between the parent tag and the child tag, the color attribute and the size attribute of the tag to be currently rendered are determined based on the color attribute and the size attribute of the parent tag, for example, the size attribute is taken as an example, the size of the child tag may be smaller than the size of the parent tag, for example, may be determined by reducing by 1 em. It should be noted that the attribute setting rule may be set in advance according to the requirement of the web page, and may also be set according to the type of the graphic file, which is not limited to this.
And when the color attribute and/or the size attribute cannot be determined by traversing each parent label or no parent label exists, acquiring a preset default color attribute and/or default size attribute, and rendering the called graphic file based on the default color attribute and/or default size attribute. The default color attribute and the default size attribute may be set according to a type of the graphics file, or a type of the web page, or set based on a rendering position of the graphics file, which is not limited herein.
And adjusting the rendering size of the graphic file according to the determined size attribute, replacing the original color of the graphic file through the color attribute, and rendering conveniently and quickly.
It should be noted that the attributes of the graphic file also include, but are not limited to, a vertical alignment attribute and an element overflow hiding attribute. The rendered graphic files are vertically aligned by setting the vertical alignment attribute, so that the regularity of the web page is improved, and the content exceeding the element frame is hidden by setting and overflowing the hidden attribute of the elements, so that the regularity of the web page is improved.
In some embodiments, after registering the tab of the graphic file on a WEB page, the method further comprises: and displaying the corresponding relation between the identification information corresponding to the registered label and the example graph of the graph file in a preset area of the WEB page. When the number of the registered graphic files is large, in order to avoid the situation that the corresponding relationship between the identification information and the graphic files is disordered to cause wrong calling of the graphic files, the identification information corresponding to the registered tag and the example graph of the graphic files can be displayed in a preset area of the WEB page, so that a user can visually determine the identification information corresponding to each graphic file, and the accuracy of the calling instruction is improved. The preset area of the WEB page may be a toolbar area of the display interface or other preset display areas.
In some embodiments, after registering the tab of the graphic file on a WEB page, the method further comprises: and setting a calling control or a calling instruction of the corresponding relation between the identification information corresponding to the registered label and the example graph of the graphic file, wherein the calling control or the calling instruction is used for triggering the corresponding relation between the identification information corresponding to the registered label and the example graph of the graphic file to be displayed. In order to avoid occupying space of a display interface by normal display, a display area for carrying out corresponding relation between identification information corresponding to a registered label and an example graph of a graphic file is hidden, a calling control or a calling instruction for triggering the display area is set, for example, a preset virtual key, or a triggering gesture or a triggering track and the like are set, when the calling control is detected to be clicked or the calling instruction input of the triggering gesture or the triggering track and the like is detected, the display area is triggered to be displayed, and a user can conveniently check the corresponding relation between the graphic file and the identification information.
According to the technical scheme provided by the embodiment, after the labels of the graphic files are registered on the web page, the graphic files are called through the calling instruction comprising the identification information, and the rendering attributes of the graphic files are determined in a self-adaptive manner, so that the calling and rendering modes of the graphic files are simplified, the svg background graph and the svg dom rendering mode are not required to be used, the problem of code swelling in the management and use processes of the graphic files is avoided, and the management and use of the graphic files are facilitated.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a processing apparatus for a graphic file according to a fifth embodiment of the disclosure. As shown in fig. 3, the apparatus includes: a tag generation module 310 and a tag registration module 320.
The tag generation module 310 is configured to obtain a graphic file, and generate a tag of the graphic file based on the content of the graphic file and the identification information of the graphic file;
and a tag registration module 320, configured to register a tag of the graphics file on a WEB page, where the registered tag is used to call the graphics file based on the identification information of the graphics file.
According to the technical scheme of the embodiment, the label generating module is used for acquiring the graphic file to be used, determining the content of the graphic file and the label generated by the identification information of the graphic file, and the label registering module is used for registering the label of the graphic file on the WEB page, so that the graphic file can be called quickly through the identification information in the WEB page development process, the management and use efficiency of the graphic file are improved, and the code redundancy in the use process of the graphic file is avoided.
On the basis of the above technical solution, the tag generating module 310 is configured to:
and regularizing the content of the graphic file and the identification information of the graphic file to obtain a label in a character string format.
On the basis of the technical scheme, the device further comprises:
the container judgment module is used for determining whether a registration container of the label is arranged on a WEB page or not before the label of the graphic file is registered on the WEB page;
and the container creating module is used for creating the registration container if the registration container of the label is not set on the WEB page.
On the basis of the technical scheme, the device further comprises:
the graph file calling module is used for receiving a graph file calling instruction carrying identification information after the label of the graph file is registered on a WEB page, and calling the graph file corresponding to the identification information according to the identification information in the graph file calling instruction and the registered label;
and the graphic file rendering module is used for rendering the called graphic file on the WEB page.
On the basis of the technical scheme, the graphic file is provided with a color self-adaptive attribute and a size self-adaptive attribute.
On the basis of the technical scheme, the graphic file rendering module is used for:
sequentially traversing parent tags of the called graphic files to obtain color attributes and size attributes in the parent tags;
rendering the graphics file based on the color attributes and the size attributes in the parent tag.
On the basis of the technical scheme, the device further comprises:
the first display module is used for displaying the corresponding relation between the identification information corresponding to the registered tag and the example graph of the graphic file in a preset area of the WEB page after the tag of the graphic file is registered on the WEB page;
on the basis of the technical scheme, the device further comprises:
and the second display module is used for setting a calling control or a calling instruction of the corresponding relation between the identification information corresponding to the registered label and the example graph of the graphic file, wherein the calling control or the calling instruction is used for triggering the corresponding relation between the identification information corresponding to the registered label and the example graph of the graphic file to be displayed.
The device provided by the embodiment of the disclosure can execute the method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the embodiments of the present disclosure.
Example four
Referring now to fig. 4, a schematic diagram of an electronic device (e.g., the terminal device or the server of fig. 4) 400 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM402, and the RAM403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment 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 carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
The electronic device provided by the embodiment of the present disclosure and the method for processing a graphic file provided by the above embodiment belong to the same inventive concept, and technical details that are not described in detail in the embodiment can be referred to the above embodiment, and the embodiment has the same beneficial effects as the above embodiment.
EXAMPLE five
The disclosed embodiments provide a computer storage medium on which a computer program is stored, which when executed by a processor implements the processing method of a graphics file provided by the above embodiments.
It should be noted that the computer readable medium in the present disclosure 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 disclosure, 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either 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: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
acquiring a graphic file, and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file;
and registering the tag of the graphic file on a WEB page, wherein the registered tag is used for calling the graphic file based on the identification information of the graphic file.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit/module does not in some cases constitute a limitation of the unit itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
According to one or more embodiments of the present disclosure, [ example one ] there is provided a graphic file processing method, including:
acquiring a graphic file, and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file;
and registering the tag of the graphic file on a WEB page, wherein the registered tag is used for calling the graphic file based on the identification information of the graphic file.
According to one or more embodiments of the present disclosure, [ example two ] there is provided a graphic file processing method, further comprising:
optionally, the generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file includes: and regularizing the content of the graphic file and the identification information of the graphic file to obtain a label in a character string format.
According to one or more embodiments of the present disclosure, [ example three ] there is provided a graphic file processing method, further comprising:
before registering the tag of the graphic file on a WEB page, the method further comprises: determining whether a registration container of the label is arranged on the WEB page; and if not, creating the registration container.
According to one or more embodiments of the present disclosure, [ example four ] there is provided a graphic file processing method, further comprising:
optionally, after registering the tag of the graphic file on the WEB page, the method further includes: receiving a graphic file calling instruction carrying identification information, and calling a graphic file corresponding to the identification information according to the identification information in the graphic file calling instruction and a registered label; and rendering the called graphic file on a WEB page.
According to one or more embodiments of the present disclosure, [ example five ] there is provided a graphic file processing method, further comprising:
optionally, the graphic file is provided with a color adaptive attribute and a size adaptive attribute.
According to one or more embodiments of the present disclosure, [ example six ] there is provided a graphic file processing method, further comprising:
optionally, rendering the called graphic file on a WEB page includes: sequentially traversing parent tags of the called graphic files to obtain color attributes and size attributes in the parent tags; rendering the graphics file based on the color attributes and the size attributes in the parent tag.
According to one or more embodiments of the present disclosure, [ example seven ] there is provided a graphic file processing method, further comprising:
optionally, after registering the tag of the graphic file on the WEB page, the method further includes: and displaying the corresponding relation between the identification information corresponding to the registered label and the example graph of the graph file in a preset area of the WEB page.
According to one or more embodiments of the present disclosure, [ example eight ] there is provided a graphic file processing method, further comprising:
optionally, after registering the tag of the graphic file on the WEB page, the method further includes: and setting a calling control or a calling instruction of the corresponding relation between the identification information corresponding to the registered label and the example graph of the graphic file, wherein the calling control or the calling instruction is used for triggering the corresponding relation between the identification information corresponding to the registered label and the example graph of the graphic file to be displayed.
According to one or more embodiments of the present disclosure, [ example nine ] there is provided a graphic file processing apparatus including:
the label generating module is used for acquiring a graphic file and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file;
and the label registration module is used for registering the label of the graphic file on a WEB page, wherein the registered label is used for calling the graphic file based on the identification information of the graphic file.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for processing a graphics file, comprising:
acquiring a graphic file, and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file;
and registering the tag of the graphic file on a WEB page, wherein the registered tag is used for calling the graphic file based on the identification information of the graphic file.
2. The method of claim 1, wherein generating the tag for the graphic file based on the graphic file content and the identification information of the graphic file comprises:
and regularizing the content of the graphic file and the identification information of the graphic file to obtain a label in a character string format.
3. The method according to claim 1, wherein before registering the tab of the graphic file on the WEB page, the method further comprises:
determining whether a registration container of the label is arranged on the WEB page;
and if the WEB page is not provided with the registration container of the label, establishing the registration container.
4. The method according to claim 1, wherein after registering the tab of the graphic file on the WEB page, the method further comprises:
receiving a graphic file calling instruction carrying identification information, and calling a graphic file corresponding to the identification information according to the identification information in the graphic file calling instruction and a registered label;
and rendering the called graphic file on a WEB page.
5. The method according to claim 4, wherein the graphic file is provided with a color adaptive attribute and a size adaptive attribute.
6. The method according to claim 5, wherein the rendering the called graphic file on the WEB page comprises:
sequentially traversing parent tags of the called graphic files to obtain color attributes and size attributes in the parent tags;
rendering the graphics file based on the color attributes and the size attributes in the parent tag.
7. The method according to claim 1, wherein after registering the tab of the graphic file on the WEB page, the method further comprises:
displaying the corresponding relation between the identification information corresponding to the registered label and the example graph of the graph file in a preset area of the WEB page; alternatively, the first and second electrodes may be,
and setting a calling control or a calling instruction of the corresponding relation between the identification information corresponding to the registered label and the example graph of the graphic file, wherein the calling control or the calling instruction is used for triggering the corresponding relation between the identification information corresponding to the registered label and the example graph of the graphic file to be displayed.
8. An apparatus for processing a graphics file, comprising:
the label generating module is used for acquiring a graphic file and generating a label of the graphic file based on the content of the graphic file and the identification information of the graphic file;
and the label registration module is used for registering the label of the graphic file on a WEB page, wherein the registered label is used for calling the graphic file based on the identification information of the graphic file.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of processing a graphics file as claimed in any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing a method of processing a graphics file as claimed in any one of claims 1 to 7 when executed by a computer processor.
CN202011448052.7A 2020-12-09 2020-12-09 Graphic file processing method, device, equipment and medium Pending CN112445478A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011448052.7A CN112445478A (en) 2020-12-09 2020-12-09 Graphic file processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011448052.7A CN112445478A (en) 2020-12-09 2020-12-09 Graphic file processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN112445478A true CN112445478A (en) 2021-03-05

Family

ID=74739029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011448052.7A Pending CN112445478A (en) 2020-12-09 2020-12-09 Graphic file processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN112445478A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989242A (en) * 2021-03-30 2021-06-18 多点(深圳)数字科技有限公司 Method for generating and uploading SVG sprite picture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216838A (en) * 2008-01-15 2008-07-09 中兴通讯股份有限公司 XML interface configuration file distribute system and method based on WEB marker
CN102075800A (en) * 2011-01-11 2011-05-25 中兴通讯股份有限公司 File play control method and system based on interactive personnel television set top box
CN102306163A (en) * 2011-08-01 2012-01-04 烟台杰瑞网络商贸有限公司 Dynamic integration technology based on B2B (business to business) platform
CN109472740A (en) * 2017-09-08 2019-03-15 北京京东尚科信息技术有限公司 The method and apparatus for generating figure based on web front end
CN111241349A (en) * 2019-12-31 2020-06-05 中国电力科学研究院有限公司 Wiring diagram data display method and system based on graph conversion

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216838A (en) * 2008-01-15 2008-07-09 中兴通讯股份有限公司 XML interface configuration file distribute system and method based on WEB marker
CN102075800A (en) * 2011-01-11 2011-05-25 中兴通讯股份有限公司 File play control method and system based on interactive personnel television set top box
CN102306163A (en) * 2011-08-01 2012-01-04 烟台杰瑞网络商贸有限公司 Dynamic integration technology based on B2B (business to business) platform
CN109472740A (en) * 2017-09-08 2019-03-15 北京京东尚科信息技术有限公司 The method and apparatus for generating figure based on web front end
CN111241349A (en) * 2019-12-31 2020-06-05 中国电力科学研究院有限公司 Wiring diagram data display method and system based on graph conversion

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989242A (en) * 2021-03-30 2021-06-18 多点(深圳)数字科技有限公司 Method for generating and uploading SVG sprite picture

Similar Documents

Publication Publication Date Title
CN109857486B (en) Method, device, equipment and medium for processing program page data
CN110389807B (en) Interface translation method and device, electronic equipment and storage medium
CN111666776A (en) Document translation method and device, storage medium and electronic equipment
CN113157153A (en) Content sharing method and device, electronic equipment and computer readable storage medium
CN110781437A (en) Method and device for acquiring webpage image loading duration and electronic equipment
CN110795196A (en) Window display method, device, terminal and storage medium
CN115470432A (en) Page rendering method and device, electronic equipment and computer readable medium
US20230367963A1 (en) Character display method and apparatus, electronic device, and computer-readable storage medium
CN115268904A (en) User interface design file generation method, device, equipment and medium
CN112445478A (en) Graphic file processing method, device, equipment and medium
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN112256370A (en) Information display method and device and electronic equipment
CN111708680A (en) Error reporting information analysis method and device, electronic equipment and storage medium
CN111324835A (en) Method and device for rendering user interface component, electronic equipment and storage medium
CN115328429A (en) Display method, display device, electronic apparatus, and storage medium
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN113961280B (en) View display method and device, electronic equipment and computer readable storage medium
CN114742013A (en) Online document display method and device and electronic equipment
CN112579218B (en) User interface display method and device, computer readable medium and electronic equipment
CN113204557A (en) Electronic form importing method, device, equipment and medium
CN110795670A (en) Webpage image monitoring method and device, electronic equipment and readable storage medium
CN111405342B (en) Rich text message display method, device, system, medium and electronic equipment
CN111259287A (en) Page content display method and device, electronic equipment and storage medium
CN110874253A (en) Display method and display system

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