CN113835684A - Method and device for automatically generating picture configuration file - Google Patents

Method and device for automatically generating picture configuration file Download PDF

Info

Publication number
CN113835684A
CN113835684A CN202111096399.4A CN202111096399A CN113835684A CN 113835684 A CN113835684 A CN 113835684A CN 202111096399 A CN202111096399 A CN 202111096399A CN 113835684 A CN113835684 A CN 113835684A
Authority
CN
China
Prior art keywords
picture
template
target
style attribute
style
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
CN202111096399.4A
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202111096399.4A priority Critical patent/CN113835684A/en
Publication of CN113835684A publication Critical patent/CN113835684A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the specification provides a method and a device for automatically generating a picture configuration file. And receiving template pictures transmitted based on the interactive interface and displaying the template pictures. And receiving a first pattern setting instruction for the template picture sent out based on the interactive interface. And determining the style attribute parameters of the template picture according to the first style setting instruction. And generating a picture configuration file at least based on the template picture and the style attribute parameters thereof.

Description

Method and device for automatically generating picture configuration file
Technical Field
One or more embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method and an apparatus for automatically generating a picture configuration file.
Background
In the conventional technology, when a client dynamically generates a picture for a user, a developer is usually required to set picture description information of the picture to be generated in a coding manner. The picture description information here includes template pictures and their style attribute parameters, etc. This increases the complexity of the client code and the style setting for the template picture is not intuitive enough.
Disclosure of Invention
One or more embodiments of the present disclosure describe a method and an apparatus for automatically generating a picture configuration file, which can provide a template picture of a picture to be generated and a style attribute parameter thereof to a client code in a picture configuration file manner, thereby reducing complexity of the client code and further improving picture generation efficiency.
In a first aspect, a method for automatically generating a picture configuration file is provided, including:
displaying an interactive interface related to the picture style setting;
receiving a template picture transmitted based on the interactive interface and displaying the template picture;
receiving a first pattern setting instruction for the template picture sent based on the interactive interface;
determining the style attribute parameters of the template picture according to the first style setting instruction;
and generating a picture configuration file at least based on the template picture and the style attribute parameters thereof.
In a second aspect, a picture generation method is provided, including:
receiving a picture generation request of a user;
determining variable picture elements in a target picture to be generated according to the picture generation request;
calling the target SDK, and analyzing the picture configuration file to obtain picture description information; the picture description information at least comprises a template picture of the target picture and a style attribute parameter thereof;
and dynamically generating the target picture at least according to the template picture, the style attribute parameters of the template picture and the variable picture elements.
In a third aspect, an apparatus for automatically generating a picture configuration file is provided, including:
the display unit is used for displaying an interactive interface related to the picture style setting;
the receiving unit is used for receiving the template picture transmitted based on the interactive interface and displaying the template picture;
the receiving unit is further used for receiving a first pattern setting instruction which is sent based on the interactive interface and aims at the template picture;
the determining unit is used for determining the style attribute parameters of the template picture according to the first style setting instruction;
and the generating unit is used for generating a picture configuration file at least based on the template picture and the style attribute parameters thereof.
In a fourth aspect, there is provided a picture generating apparatus, including:
the receiving unit is used for receiving a picture generation request of a user;
the determining unit is used for determining each variable picture element in the target picture to be generated according to the picture generation request;
the calling unit is used for calling the target SDK and analyzing the picture configuration file to obtain picture description information; the picture description information at least comprises a template picture of the target picture and a style attribute parameter thereof;
and the generating unit is used for dynamically generating the target picture at least according to the template picture, the style attribute parameters of the template picture and the variable picture elements.
In a fifth aspect, there is provided a computer storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first or second aspect.
In a sixth aspect, there is provided a computing device comprising a memory having stored therein executable code, and a processor that when executing the executable code, implements the method of the first or second aspect.
According to the method and the device for automatically generating the picture configuration file, which are provided by one or more embodiments of the specification, developers can set the style attribute parameters of the template picture through an interactive interface of a visualization platform. Then, the visualization platform can automatically generate a picture configuration file based on the template picture and the style attribute parameters thereof, and provide the picture configuration file for the client code, so that the client code can obtain picture description information such as the template picture and the style attribute parameters thereof by analyzing the picture configuration file, and dynamically generate a target picture based on the picture description information and the variable picture elements obtained in real time. Therefore, the complexity of the client code can be reduced, and the picture generation efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation scenario provided in an embodiment of the present specification;
FIG. 2 is a flowchart of a method for automatically generating a picture configuration file according to an embodiment of the present disclosure;
FIG. 3 illustrates an interactive interface diagram in one embodiment;
FIG. 4 is an interactive diagram of a method for generating a picture according to an embodiment of the present disclosure;
FIG. 5 illustrates a target picture generated in accordance with an embodiment of the present description;
FIG. 6 is a diagram illustrating an apparatus for automatically generating a picture profile according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a picture generation apparatus according to an embodiment of the present disclosure.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings.
In most cases, the client can dynamically generate a target picture requested by the user, such as an electronic work permit, an electronic pass, and the like, based on the Canvas. The target picture is generally composed of a template picture and a variable picture element.
A Canvas is a tag of HTML5, by which a picture can be defined and then drawn on a web page using JavaScript. In some application scenarios, by specifying the position and size of the Canvas, the web page content corresponding to the position and size may be drawn onto the Canvas.
However, Canvas-based drawing tends to increase the complexity of the client code, since JavaScript scripts need to be written.
For this reason, the inventor of the present application proposes that this part of the picture style setting can be extracted from the client code. Specifically, a developer can set the style attribute parameters of the template picture through an interactive interface of the visualization platform. Then, the visualization platform can automatically generate a picture configuration file based on the template picture and the style attribute parameters thereof, and provide the picture configuration file for the client code, so that the client code can obtain picture description information such as the template picture and the style attribute parameters thereof by analyzing the picture configuration file, and dynamically generate a target picture based on the picture description information and the variable picture elements obtained in real time. Therefore, the complexity of the client code can be reduced, and the picture generation efficiency can be improved.
The present invention has been made in view of the above-mentioned problems, and it is an object of the present invention to provide a novel and improved method for manufacturing a display device.
Fig. 1 is a schematic view of an implementation scenario provided in an embodiment of the present specification. In fig. 1, a developer can set a style of a template picture through a visualization platform. Optionally, the style of the changeable picture element may also be set. In particular, the visualization platform may display an interactive interface related to picture style setting. Then, template pictures and style setting instructions for the template pictures, which are transmitted by a developer based on the interactive interface, can be received. Finally, the visualization platform can automatically generate a picture configuration file based at least on the template picture and the style attribute parameters thereof. In one example, the picture profile may be deposited under a fixed path of client code for use when a subsequent target Software Development Kit (SDK) is invoked.
The client of FIG. 1 may have integrated therein a target SDK that may provide Canvas-based drawing functionality. Specifically, when receiving a picture generation request of a user, the client may read a picture configuration file from the fixed path by calling the SDK, and analyze the picture configuration file to obtain picture description information such as a template picture and a style attribute parameter thereof. In addition, the variable picture elements in the target picture to be generated can be obtained from the server side by calling the SDK. And finally, dynamically generating a target picture based on the picture description information obtained by analysis and the variable picture elements obtained in real time.
Fig. 2 is a flowchart of a method for automatically generating a picture configuration file according to an embodiment of the present disclosure. It is to be appreciated that the method can be performed by any apparatus, device, platform, cluster of devices having computing and processing capabilities. Such as the visualization platform of fig. 1. As shown in fig. 2, the method includes at least the following steps.
Step 202, displaying an interactive interface related to the picture style setting.
FIG. 3 illustrates an interactive interface diagram in one embodiment. In FIG. 3, the interactive interface may include a file upload control (e.g., button), a display area, and a style setting control. The style setting control herein may include a font size setting window, a palette, a position setting window, a shape setting window, and a length and width setting window.
It should be appreciated that initially, the style setting control described above appears in a gray, unavailable state.
And step 204, receiving a template picture transmitted based on the interactive interface and displaying the template picture.
In one example, the visualization platform may receive the template picture after the developer clicks a file upload button in the interactive interface and selects the template picture in a pop-up dialog. The visualization platform may then display the template picture in a display area of its interactive interface.
In another example, the developer may also drag the template picture to the dashed box area, so that the visualization platform receives the template picture.
It should be understood that after the template picture is displayed on the interactive interface of the visualization platform, the above controls such as the palette, the position setting window, and the picture length and width setting window become available.
Step 206, receiving a first pattern setting instruction for the template picture sent based on the interactive interface.
The first pattern setting instruction herein may include at least one of: color setting instructions, shape setting instructions, length and width setting instructions, and the like.
Regarding the above color setting instruction, it may be triggered by a developer clicking a certain color (e.g., black) in the palette. Regarding the above-described shape setting instruction, it may be triggered by a developer inputting or selecting a certain shape (e.g., a heart shape) in the shape setting window. The set of instructions for length and width may be triggered by a developer entering or selecting a specific length-width value (e.g., 60 and 20) in a length-width setting window. Or may be triggered by a developer performing a zoom operation on the template picture.
And step 208, determining the style attribute parameters of the template picture according to the first style setting instruction.
Of course, in practical applications, the visualization platform may also receive a sub-picture that is transmitted by a developer based on the interactive interface. The style setting of the sub-picture can refer to the template picture.
It should be noted that, for the sub-picture, the visualization platform may further receive a relative position setting instruction, and the relative position setting instruction may be triggered by a developer inputting or selecting a specific position coordinate (X: 783; Y: 223) in the position setting window. Or may be triggered by the developer performing a drag operation on the sub-picture.
In addition, the visualization platform can also receive and display example elements corresponding to the variable picture elements, which are transmitted by the developer based on the interactive interface. And receiving a second style setting instruction for the example element issued based on the interactive interface.
Wherein, the second style setting instruction may include at least one of the following: a relative position setting instruction, a font size setting instruction, a color setting instruction, a shape setting instruction, and a length and width setting instruction. Here, other instructions than the font size setting instruction may be the same as described above. The font size setting instruction may be triggered by a developer inputting or selecting a specific font size (e.g., a regular font, a small size 4) in the font size setting window.
Step 210, generating a picture configuration file at least based on the template picture and the style attribute parameters thereof.
In one example, the picture configuration file may be generated directly based on the template picture and its style attribute parameters. For the picture configuration file, it may be integrated into the client code, and then the client code obtains the picture description information by parsing the picture configuration file, and dynamically generates the target picture based on the picture description information and the variable picture elements.
In another example, a picture configuration file adapted to the target SDK may be generated based on the template picture and its style attribute parameters, and the format of the picture configuration file corresponding to the target SDK.
The target SDK, also referred to herein as a third-party SDK, is a pre-written software module that provides Canvas-based drawing functionality and may be integrated into the client.
Certainly, in practical application, when the visualization platform further receives the sub-picture and acquires the style attribute parameters of the sub-picture, the image configuration file adapted to the target SDK may be generated based on the template picture, the sub-picture, the respective corresponding style attribute parameters, and the format of the image configuration file corresponding to the target SDK.
In addition, when the visualization platform further receives an example element of the variable picture element and receives a second style setting instruction for the example element, the style attribute parameter of the example element can be used as the style attribute parameter of the variable picture element, and a picture configuration file adapted to the target SDK is generated based on the style attribute parameter of the variable picture element, the template picture and the style attribute parameter thereof, and the format of the picture configuration file corresponding to the target SDK.
In an example, the format of the picture configuration file corresponding to the target SDK may be a JSON format (a lightweight data exchange format). The data format of JSON corresponds to JavaScript. As described above, the Canvas drawing function provided by the target SDK is implemented based on the JavaScript language, so that the document in the JSON format can be conveniently analyzed by the target SDK, and the generation efficiency of the picture can be further improved.
It should be noted that, when the target SDK is called by the client code, the target picture may be dynamically generated according to the picture configuration file generated for the target SDK and the variable picture elements acquired in real time. The specific generation process is described later.
In summary, in the method for automatically generating a picture configuration file provided in the embodiments of the present specification, a developer may set a style attribute parameter of a template picture through an interactive interface of a visualization platform. Then, the visualization platform can automatically generate a picture configuration file based on the template picture and the style attribute parameters thereof, and provide the picture configuration file for the client code, so that the client code can obtain picture description information such as the template picture and the style attribute parameters thereof by analyzing the picture configuration file, and dynamically generate a target picture based on the picture description information and the variable picture elements obtained in real time. Therefore, the complexity of the client code can be reduced, and the picture generation efficiency can be improved.
A method for dynamically generating a picture based on the automatically generated picture profile will be described below.
Fig. 4 is an interaction diagram of a picture generation method according to an embodiment of the present specification. As shown in fig. 4, the method may include:
in step 402, a client receives a picture generation request of a user.
Wherein, the client integrates a target SDK. The target SDK has a picture profile generated according to the method steps shown in fig. 2.
In an example, the picture configuration file may be stored in a fixed path of the client code, and when the target SDK is called subsequently, the corresponding picture configuration file may be read from the fixed path and parsed.
In step 404, the client determines each variable picture element in the target picture to be generated according to the picture generation request.
In one example, the picture generation request may include a user id. Therefore, the client can send a data acquisition request containing the user id to the server by calling the target SDK, and request the user description information from the server. And the client determines variable picture elements in the target picture to be generated at least based on the user description information.
Of course, in practical applications, the variable picture element in the target picture to be generated may also be determined in combination with information such as the current time, which is not limited in this specification.
The variable picture element refers to an interface element which can be dynamically updated in the target picture, such as a user avatar. In one example, the variable picture element may include at least one of: user description information (e.g., name, gender, age, telephone number, job number, etc.), current time, user avatar, and user two-dimensional code, etc.
And 406, the client calls the target SDK to analyze the picture configuration file to obtain the picture description information.
The picture description information at least comprises a template picture of the target picture and a style attribute parameter thereof. In addition, the sub-picture and the attribute style parameter thereof, and/or the style attribute parameter of the variable picture element, etc. can be included.
It should be understood that, in practice, step 406 may be executed first, and then step 404 may be executed; alternatively, step 404 and step 406 are executed in parallel, which is not limited in this specification.
Step 408, the client dynamically generates a target picture according to at least the template picture and the style attribute parameters thereof, and each variable picture element.
In addition, the target picture can be dynamically generated by combining the sub-picture and the attribute style parameter thereof, and/or the style attribute parameter of the variable picture element.
Taking an example of generating a target picture according to the style attribute parameters of the variable picture elements, the template picture and the style attribute parameters thereof, and each variable picture element, a generation process of the target picture is a process of Canvas drawing, and specifically may include: a Canvas is first created. And then drawing the template picture on Canvas according to the style attribute parameters of the template picture. And finally, filling the variable picture elements into the drawn template picture according to the style attribute parameters of the variable picture elements to obtain the target picture.
In a specific example, when performing Canvas drawing, first, the picture static information may be parsed into recognizable objects, such as pictures (including template pictures, sub-pictures, and the like), picture patterns (such as color, length, width, and the like), and text patterns (such as size, color, position, and the like). And correspondingly filling the variable picture elements into corresponding values of the recognizable objects. And creating a Canvas according to the recognizable object information, then drawing the Canvas according to the styles and positions of the pictures and the characters, and finally outputting the target picture.
In summary, in the picture generation method provided in the embodiments of the present specification, the client obtains the picture description information such as the template picture and the style attribute parameters thereof by analyzing the picture configuration file automatically generated in advance, and dynamically generates the target picture based on the picture description information and the variable picture elements obtained in real time. Therefore, the complexity of the client code can be reduced, and the picture generation efficiency can be improved.
Fig. 5 illustrates a target picture generated according to an embodiment of the present description. In fig. 4, the interface elements labeled 1, 2, 3, 4, and 5 are all referred to as variable picture elements, which are populated into the template picture in a dynamic manner. It should be understood that when it is desired to generate a first name: the electronic employee's badge of "lie four" then the interface elements labeled 1, 2, 3, 4 and 5 in the figure will change accordingly.
Corresponding to the method for automatically generating a picture configuration file, an embodiment of the present specification further provides an apparatus for automatically generating a picture configuration file, as shown in fig. 6, the apparatus may include:
a display unit 602, configured to display an interactive interface related to the picture style setting.
The receiving unit 604 is configured to receive a template picture incoming based on the interactive interface and display the template picture.
The receiving unit 604 is further configured to receive a first pattern setting instruction for the template picture issued based on the interactive interface.
The determining unit 606 is configured to determine the style attribute parameter of the template picture according to the first style setting instruction.
The first pattern setting instruction herein may include at least one of: color setting instructions, shape setting instructions, length and width setting instructions, and the like.
A generating unit 608, configured to generate a picture-adapted configuration file based on at least the template picture and the style attribute parameter thereof.
The generating unit 608 may specifically be configured to:
and generating a picture configuration file adaptive to the target SDK at least based on the template picture and the style attribute parameters thereof and the format of the picture configuration file corresponding to the target SDK. The target SDK is used for being integrated into the client, so that when the target SDK is called by a client code, a target picture is dynamically generated according to the picture configuration file and the variable picture elements acquired in real time.
The variable picture element may include at least one of: user description information, current time, user head portrait, user two-dimensional code and the like.
The receiving unit 604 is further configured to receive and display an example element corresponding to the variable picture element, which is incoming based on the interactive interface.
The receiving unit 604 is further configured to receive a second style setting instruction for the example element issued based on the interactive interface.
The determining unit 606 is further configured to determine the style attribute parameter of the example element according to the second style setting instruction.
Wherein the second style setting instruction may include at least one of: relative position setting instructions, font size setting instructions, color setting instructions, shape setting instructions, length and width setting instructions, and the like.
The generating unit 608 is further specifically configured to:
and taking the style attribute parameters of the example elements as the style attribute parameters of the variable picture elements, and generating a picture configuration file adaptive to the target SDK based on the style attribute parameters of the variable picture elements, the template picture and the style attribute parameters thereof and the format of the picture configuration file corresponding to the target SDK.
The functions of each functional module of the device in the above embodiments of the present description may be implemented through each step of the above method embodiments, and therefore, a specific working process of the device provided in one embodiment of the present description is not repeated herein.
The device for automatically generating the picture configuration file provided by one embodiment of the specification can reduce the complexity of a client code, and further can improve the picture generation efficiency.
Corresponding to the above image generation method, an embodiment of the present specification further provides an image generation device, which is disposed at a client. The client has integrated therein a target SDK with a picture profile generated according to the method steps shown in fig. 2. As shown in fig. 7, the apparatus may include:
a receiving unit 702, configured to receive a picture generation request of a user.
A determining unit 704, configured to determine, according to the picture generation request, each variable picture element in the target picture to be generated.
Wherein the picture generation request at least comprises a user identification. The determining unit 704 is specifically configured to:
sending a data acquisition request to a server according to the user identification;
receiving user description information returned by a server;
and determining each variable picture element in the target picture to be generated at least according to the user description information.
And the calling unit 706 is configured to call the target SDK, and analyze the picture configuration file to obtain the picture description information. The picture description information at least comprises a template picture of the target picture and a style attribute parameter thereof.
A generating unit 708, configured to dynamically generate the target picture according to at least the template picture and the style attribute parameters thereof, and each variable picture element.
Wherein the picture description information may further include a style attribute parameter of the variable picture element. The generating unit 708 is specifically configured to:
creating a Canvas;
drawing the template picture on Canvas according to the style attribute parameters of the template picture;
and filling each variable picture element into the drawn template picture according to the style attribute parameter of each variable picture element to obtain the target picture.
The functions of each functional module of the device in the above embodiments of the present description may be implemented through each step of the above method embodiments, and therefore, a specific working process of the device provided in one embodiment of the present description is not repeated herein.
The picture generation device provided by one embodiment of the present specification can greatly improve the picture generation efficiency.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in connection with fig. 2 or fig. 4.
According to an embodiment of yet another aspect, there is also provided a computing device comprising a memory and a processor, the memory having stored therein executable code, the processor, when executing the executable code, implementing the method described in connection with fig. 2 or fig. 4.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied in hardware or may be embodied in software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in a server. Of course, the processor and the storage medium may reside as discrete components in a server.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above-mentioned embodiments, objects, technical solutions and advantages of the present specification are further described in detail, it should be understood that the above-mentioned embodiments are only specific embodiments of the present specification, and are not intended to limit the scope of the present specification, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present specification should be included in the scope of the present specification.

Claims (18)

1. A method of automatically generating a picture profile, comprising:
displaying an interactive interface related to the picture style setting;
receiving a template picture transmitted based on the interactive interface and displaying the template picture;
receiving a first pattern setting instruction for the template picture sent based on the interactive interface;
determining the style attribute parameters of the template picture according to the first style setting instruction;
and generating a picture configuration file at least based on the template picture and the style attribute parameters thereof.
2. The method of claim 1, wherein the generating a picture profile comprises:
generating a picture configuration file adapted to the target SDK at least based on the template picture and the style attribute parameters thereof and the format of the picture configuration file corresponding to the target SDK; and the target SDK is used for being integrated into the client, so that when the target SDK is called by a client code, a target picture is dynamically generated according to the picture configuration file and the variable picture elements acquired in real time.
3. The method of claim 2, further comprising:
receiving and displaying example elements corresponding to the variable picture elements and transmitted based on the interactive interface;
receiving a second style setting instruction for the example element issued based on the interactive interface;
determining style attribute parameters of the example element according to the second style setting instruction;
the generating of the picture configuration file adapted to the target SDK includes:
and taking the style attribute parameters of the example elements as the style attribute parameters of the variable picture elements, and generating a picture configuration file adaptive to the target SDK based on the style attribute parameters of the variable picture elements, the template picture and the style attribute parameters thereof and the format of the picture configuration file corresponding to the target SDK.
4. The method according to claim 3, wherein the second pattern setting instruction comprises at least one of: a relative position setting instruction, a font size setting instruction, a color setting instruction, a shape setting instruction, and a length and width setting instruction.
5. The method of claim 2, wherein the variable picture element comprises at least one of: user description information, current time, user head portrait and user two-dimensional code.
6. A picture generation method, performed by a client having integrated therein a target SDK having a picture profile generated according to the method of claim 1; the method comprises the following steps:
receiving a picture generation request of a user;
determining variable picture elements in a target picture to be generated according to the picture generation request;
calling the target SDK, and analyzing the picture configuration file to obtain picture description information; the picture description information at least comprises a template picture of the target picture and a style attribute parameter thereof;
and dynamically generating the target picture at least according to the template picture, the style attribute parameters of the template picture and the variable picture elements.
7. The method of claim 6, wherein the picture generation request includes a user identification; determining, according to the picture generation request, each variable picture element in the target picture to be generated, including:
sending a data acquisition request to a server according to the user identification;
receiving user description information returned by the server;
and determining each variable picture element in the target picture to be generated at least according to the user description information.
8. The method of claim 6, wherein the picture description information further comprises a style attribute parameter of the changeable picture element; the dynamically generating the target picture comprises:
creating a Canvas;
drawing the template picture on the Canvas according to the style attribute parameters of the template picture;
and filling the variable picture elements into the drawn template picture according to the style attribute parameters of the variable picture elements to obtain the target picture.
9. An apparatus for automatically generating a picture profile, comprising:
the display unit is used for displaying an interactive interface related to the picture style setting;
the receiving unit is used for receiving the template picture transmitted based on the interactive interface and displaying the template picture;
the receiving unit is further used for receiving a first pattern setting instruction which is sent based on the interactive interface and aims at the template picture;
the determining unit is used for determining the style attribute parameters of the template picture according to the first style setting instruction;
and the generating unit is used for generating a picture configuration file at least based on the template picture and the style attribute parameters thereof.
10. The apparatus according to claim 9, wherein the generating unit is specifically configured to:
generating a picture configuration file adapted to the target SDK at least based on the template picture and the style attribute parameters thereof and the format of the picture configuration file corresponding to the target SDK; and the target SDK is used for being integrated into the client, so that when the target SDK is called by a client code, a target picture is dynamically generated according to the picture configuration file and the variable picture elements acquired in real time.
11. The apparatus of claim 10, wherein,
the receiving unit is further used for receiving and displaying example elements corresponding to the variable picture elements and transmitted based on the interactive interface;
the receiving unit is further used for receiving a second style setting instruction for the example element issued based on the interactive interface;
the determining unit is further configured to determine a style attribute parameter of the example element according to the second style setting instruction;
the generating unit is specifically configured to:
and taking the style attribute parameters of the example elements as the style attribute parameters of the variable picture elements, and generating a picture configuration file adaptive to the target SDK based on the style attribute parameters of the variable picture elements, the template picture and the style attribute parameters thereof and the format of the picture configuration file corresponding to the target SDK.
12. The apparatus of claim 11, wherein the second pattern setting instructions comprise at least one of: a relative position setting instruction, a font size setting instruction, a color setting instruction, a shape setting instruction, and a length and width setting instruction.
13. The apparatus of claim 10, wherein the variable picture element comprises at least one of: user description information, current time, user head portrait and user two-dimensional code.
14. A picture generation device provided at a client, the client having integrated therein a target SDK having a picture profile generated according to the method of claim 1; the device comprises:
the receiving unit is used for receiving a picture generation request of a user;
the determining unit is used for determining each variable picture element in the target picture to be generated according to the picture generation request;
the calling unit is used for calling the target SDK and analyzing the picture configuration file to obtain picture description information; the picture description information at least comprises a template picture of the target picture and a style attribute parameter thereof;
and the generating unit is used for dynamically generating the target picture at least according to the template picture, the style attribute parameters of the template picture and the variable picture elements.
15. The apparatus of claim 14, wherein the picture generation request includes a user identification; the determining unit is specifically configured to:
sending a data acquisition request to a server according to the user identification;
receiving user description information returned by the server;
and determining each variable picture element in the target picture to be generated at least according to the user description information.
16. The apparatus of claim 14, wherein the picture description information further comprises a style attribute parameter of the changeable picture element; the generating unit is specifically configured to:
creating a Canvas;
drawing the template picture on the Canvas according to the style attribute parameters of the template picture;
and filling the variable picture elements into the drawn template picture according to the style attribute parameters of the variable picture elements to obtain the target picture.
17. A computer-readable storage medium, on which a computer program is stored, wherein the computer program causes a computer to carry out the method of any one of claims 1-8 when the computer program is carried out in the computer.
18. A computing device comprising a memory and a processor, wherein the memory has stored therein executable code that when executed by the processor implements the method of any of claims 1-8.
CN202111096399.4A 2021-09-16 2021-09-16 Method and device for automatically generating picture configuration file Pending CN113835684A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111096399.4A CN113835684A (en) 2021-09-16 2021-09-16 Method and device for automatically generating picture configuration file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111096399.4A CN113835684A (en) 2021-09-16 2021-09-16 Method and device for automatically generating picture configuration file

Publications (1)

Publication Number Publication Date
CN113835684A true CN113835684A (en) 2021-12-24

Family

ID=78959733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111096399.4A Pending CN113835684A (en) 2021-09-16 2021-09-16 Method and device for automatically generating picture configuration file

Country Status (1)

Country Link
CN (1) CN113835684A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020095459A1 (en) * 2000-12-22 2002-07-18 Laux Thorsten O. Method and apparatus for providing a client by a server with an instruction data set in a predetermined format in response to a content data request message by a client
US20080082911A1 (en) * 2006-10-03 2008-04-03 Adobe Systems Incorporated Environment-Constrained Dynamic Page Layout
CN106104602A (en) * 2016-06-22 2016-11-09 北京小米移动软件有限公司 Card display packing and device
CN109324836A (en) * 2017-07-27 2019-02-12 阿里巴巴集团控股有限公司 The processing method of the generation method and device of personalized photo, personalized splashette
CN109885795A (en) * 2019-01-25 2019-06-14 平安科技(深圳)有限公司 A kind of end Web animation configuration method and device
CN110032720A (en) * 2018-12-28 2019-07-19 万康源(天津)基因科技有限公司 A kind of visualization report typesetting and automatic generation method and system based on XML
CN111475163A (en) * 2020-06-22 2020-07-31 腾讯科技(深圳)有限公司 Method, device and equipment for generating code file of view template and storage medium
US20200257756A1 (en) * 2019-02-08 2020-08-13 Oracle International Corporation Client-side customization and rendering of web content
CN112819923A (en) * 2019-11-18 2021-05-18 腾讯科技(深圳)有限公司 Method and device for generating electronic business card and computer storage medium
US20210150125A1 (en) * 2019-11-19 2021-05-20 Salesforce.Com, Inc. Methods and systems for programmatic creation of an interactive demonstration presentation for an envisioned software product

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020095459A1 (en) * 2000-12-22 2002-07-18 Laux Thorsten O. Method and apparatus for providing a client by a server with an instruction data set in a predetermined format in response to a content data request message by a client
US20080082911A1 (en) * 2006-10-03 2008-04-03 Adobe Systems Incorporated Environment-Constrained Dynamic Page Layout
CN106104602A (en) * 2016-06-22 2016-11-09 北京小米移动软件有限公司 Card display packing and device
CN109324836A (en) * 2017-07-27 2019-02-12 阿里巴巴集团控股有限公司 The processing method of the generation method and device of personalized photo, personalized splashette
CN110032720A (en) * 2018-12-28 2019-07-19 万康源(天津)基因科技有限公司 A kind of visualization report typesetting and automatic generation method and system based on XML
CN109885795A (en) * 2019-01-25 2019-06-14 平安科技(深圳)有限公司 A kind of end Web animation configuration method and device
US20200257756A1 (en) * 2019-02-08 2020-08-13 Oracle International Corporation Client-side customization and rendering of web content
CN112819923A (en) * 2019-11-18 2021-05-18 腾讯科技(深圳)有限公司 Method and device for generating electronic business card and computer storage medium
US20210150125A1 (en) * 2019-11-19 2021-05-20 Salesforce.Com, Inc. Methods and systems for programmatic creation of an interactive demonstration presentation for an envisioned software product
CN111475163A (en) * 2020-06-22 2020-07-31 腾讯科技(深圳)有限公司 Method, device and equipment for generating code file of view template and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
冯钧;盛震宇;唐志贤;: "基于XML Schema的Web界面生成方法", 计算机工程与设计, no. 04, 16 April 2013 (2013-04-16) *
纪陵;蒋衍君;施广德;: "基于SVG的电力系统图形互操作研究", 电力自动化设备, no. 07, 10 July 2011 (2011-07-10) *
蒋彭;: "一种基于Struts技术的图片管理系统设计", 制造业自动化, no. 20, 25 October 2011 (2011-10-25) *

Similar Documents

Publication Publication Date Title
CN111462281B (en) Poster generation method, device, equipment and storage medium
CN110096277B (en) Dynamic page display method and device, electronic equipment and storage medium
CN108279964B (en) Method and device for realizing covering layer rendering, intelligent equipment and storage medium
CN109117760B (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN111488149A (en) Table rendering method and device based on canvas element and computer equipment
CN114003160B (en) Data visual display method, device, computer equipment and storage medium
JP7213291B2 (en) Method and apparatus for generating images
WO2023082654A1 (en) Method, apparatus and device for generating service interaction diagram, and storage medium
CN111208998A (en) Method and device for automatically laying out data visualization large screen and storage medium
JPWO2018203374A1 (en) Line drawing automatic coloring program, line drawing automatic coloring device and program for graphical user interface
CN111223155B (en) Image data processing method, device, computer equipment and storage medium
US10930033B1 (en) Content aware tracing for generating vector drawings
CN110471700B (en) Graphic processing method, apparatus, storage medium and electronic device
CN110674437A (en) Method and device for converting webpage data into PDF (Portable document Format) attachment
CN111240776B (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
CN107506597A (en) Medical files acquisition methods, terminal and server
CN113835684A (en) Method and device for automatically generating picture configuration file
CN116954450A (en) Screenshot method and device for front-end webpage, storage medium and terminal
KR102003221B1 (en) System for generating note data and method for generating note data using the system
CN115329720A (en) Document display method, device, equipment and storage medium
CN111913711B (en) Video rendering method and device
US11074392B2 (en) Information processing apparatus and non-transitory computer readable medium for switching between an attribute information mode and an image information mode
CN114283422A (en) Handwritten font generation method and device, electronic equipment and storage medium
CN111597151A (en) File generation method and device, computer equipment and storage medium
US20100079474A1 (en) Methods for rendering source content of a file for display on a destination figure

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