CN113031950A - Picture generation method, device, equipment and medium - Google Patents

Picture generation method, device, equipment and medium Download PDF

Info

Publication number
CN113031950A
CN113031950A CN202110475713.3A CN202110475713A CN113031950A CN 113031950 A CN113031950 A CN 113031950A CN 202110475713 A CN202110475713 A CN 202110475713A CN 113031950 A CN113031950 A CN 113031950A
Authority
CN
China
Prior art keywords
picture
data
structured
preset
target
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.)
Granted
Application number
CN202110475713.3A
Other languages
Chinese (zh)
Other versions
CN113031950B (en
Inventor
刘华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110475713.3A priority Critical patent/CN113031950B/en
Publication of CN113031950A publication Critical patent/CN113031950A/en
Application granted granted Critical
Publication of CN113031950B publication Critical patent/CN113031950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure relates to a picture generation method, a device, equipment and a medium, wherein the method comprises the following steps: acquiring picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of a user when the webpage side draws a target picture; judging whether the picture drawing data meet preset conditions or not based on the structured data; and if the picture drawing data are determined to meet the preset conditions, performing secondary drawing based on the picture drawing data to obtain a target picture and storing the target picture. By adopting the technical scheme, the picture generation is completed by the server, so that the picture content stored in the server can be ensured to meet the preset condition on the basis of ensuring that the user draws the picture with a certain degree of freedom, the verification cost is reduced, the success rate of the picture generation is further improved, and the user experience is improved.

Description

Picture generation method, device, equipment and medium
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a method, an apparatus, a device, and a medium for generating a picture.
Background
In online webpage application, a user can draw a picture in a self-defined manner by using a web technology and spread the picture on the network, and the method is a common picture sharing mode.
In a conventional user-defined picture generation scheme, picture binary data can be uploaded to a server after a picture is drawn through a web technology, a sharing link is obtained, and picture sharing is carried out. In the prior art, in order to help a user generate and share a related picture, picture recognition can be performed in an Artificial solution or Artificial Intelligence (AI) recognition mode, but the problems of high cost and high delay exist, and the success rate of picture generation is low.
Disclosure of Invention
To solve the technical problem or at least partially solve the technical problem, the present disclosure provides a picture generation method, apparatus, device, and medium.
The embodiment of the disclosure provides a picture generation method, which includes:
acquiring picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of the user when the webpage end draws a target picture;
judging whether the picture drawing data meet preset conditions or not based on the structured data;
and if the picture drawing data are determined to meet the preset conditions, performing secondary drawing based on the picture drawing data to obtain the target picture and storing the target picture.
The embodiment of the present disclosure further provides an image generating device, where the device includes:
the drawing data acquisition module is used for acquiring picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of the user when the webpage end draws a target picture;
the judging module is used for judging whether the picture drawing data meets a preset condition or not based on the structured data;
and the picture generation module is used for performing secondary drawing on the basis of the picture drawing data to obtain the target picture and storing the target picture if the picture drawing data is determined to meet the preset condition.
An embodiment of the present disclosure further provides an electronic device, which includes: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instructions from the memory and executing the instructions to realize the picture generation method provided by the embodiment of the disclosure.
The embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program for executing the picture generation method provided by the embodiment of the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: according to the picture generation scheme provided by the embodiment of the disclosure, picture drawing data generated by drawing a target picture at a webpage end by a user is acquired; the picture drawing data is structured data generated by intercepting the drawing operation of a user when the webpage side draws a target picture; judging whether the picture drawing data meet preset conditions or not based on the structured data; and if the picture drawing data are determined to meet the preset conditions, performing secondary drawing based on the picture drawing data to obtain a target picture and storing the target picture. By adopting the technical scheme, the server can intercept and acquire the structured picture drawing data of the webpage end through the drawing operation of the user, and generate and store the picture when the preset condition is met through data verification.
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 picture generation method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another picture generation method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of picture generation provided by an embodiment of the present disclosure;
fig. 4 is a timing diagram of picture generation provided by the embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an image generating apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present 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.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
In online webpage application, a user can draw a picture in a self-defined manner by using a Web technology and spread the picture on the network, and the method is a common picture sharing mode. A conventional user-defined picture generation scheme such as poster generation is characterized in that two sharing modes are provided after a picture is drawn locally through a Web technology, the first sharing mode is to store the picture locally, a user opens the local picture through other social channels or other application programs to share the picture, the second sharing mode is to upload binary data of the picture to a server to further acquire a sharing link of the picture, and the picture is shared through the sharing link
The operation link of the first sharing mode is too long, which affects the user experience, thereby hindering the content propagation, while the second sharing mode has high efficiency, but there is a case that the picture is not satisfactory. At present, for the above problems, picture recognition can be performed in an Artificial solution or Artificial Intelligence (AI) recognition mode, but the Artificial solution delay is high and the labor cost is high, and the training cost of AI recognition is also high, so that the success rate of picture generation is low. In view of the foregoing problems, an embodiment of the present disclosure provides a method for generating an image, and the method is described below with reference to specific embodiments.
Fig. 1 is a flowchart of a picture generation method provided in an embodiment of the present disclosure, where the method may be executed by a picture generation apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method is applied to a server, and includes:
step 101, obtaining picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of a user when the webpage end draws the target picture.
The Web page end can be a terminal provided with a Web application program, the Web application program is an application program which can be accessed through the Web, and a user can easily access the application program only by a browser. The target picture refers to a picture drawn by a user at a network end in a customized manner, and the specific type is not limited, for example, the target picture may be a poster.
The picture drawing data refers to operation data, content data and the like related to a picture generated by intercepting a drawing operation of a user when the user draws a target picture at a webpage end, and belongs to structured data, and the structured data can be data expressed by adopting a fixed format. In the embodiment of the present disclosure, the structured data may include structured text data and structured picture data, that is, the picture drawing data may include structured text data, structured picture data, and the like, where the structured text data and the structured picture data are both expressed in a fixed format, and the specific format is not limited, the structured text data refers to data related to text content included in the target picture, and the structured picture data refers to data related to a specific material picture selected by the user in the target picture.
Illustratively, the structured text data may be represented as "[ { action:" filStyle ", value:" red "}, { action: ' filText ', value: [" this is text content ",0,0] }", where "action: filStyle" represents fill color, "value:" red "," action: "filText '" represents drawing text, "value:" text content ",0,0 ]" represents drawing content and drawing start point coordinates. The structured picture data can be expressed as "[ { action:" image ", value [" http:// image.com/123.png ",0, 100] }", wherein "action:" image "represents a drawing picture, and" value: [ "http:// image.com/123.png",0, 100] represents coordinates of linking and drawing of a material picture.
In the embodiment of the disclosure, while the user draws the target picture at the webpage, the user can obtain the structured data intercepted by the proxy layer of the webpage for the drawing operation of the user, that is, the picture drawing data is obtained from the drawing interface. The Proxy layer (Proxy) may be an intermediate layer provided in the web page side for automatically collecting data transmitted by the drawing interface, and may be specifically implemented by rewriting code on the drawing interface of the web page side. The method and the device for intercepting the data of the drawing interface realize the interception of the data of the drawing interface by utilizing the characteristic that the proxy layer in the Web technology can proxy the operation of all JavaScript objects. The drawing interface may be a programming interface of a drawing plug-in, for example, the drawing plug-in may be Canvas, and the drawing of the picture is realized by encapsulating some methods for drawing the graph.
The user draws the target picture by using the drawing plug-in at the webpage end, the user can select the content of the drawn picture, specifically, the content of the drawn picture can comprise text content, material pictures and the like, the text content can comprise text color, text font, text size and the like, the material pictures can be preset, and the number of the material pictures is not limited. The proxy layer of the webpage end can intercept the structured data in the drawing interface in the drawing process of the target picture until the drawing of the target picture is completed, and can send the picture drawing data to the server, and the server can receive the picture drawing data.
And 102, judging whether the picture drawing data meets a preset condition or not based on the structured data.
The preset condition is a condition for judging whether the picture drawing data meets relevant regulations.
In the embodiment of the present disclosure, based on the structured data, determining whether the picture drawing data meets a preset condition includes: respectively checking the structured text data and the structured picture data to determine a checking result; and judging whether the picture drawing data meets a preset condition or not based on the verification result of the structured text data and the structured picture data.
Optionally, verifying the structured text data, and determining a verification result, including: analyzing the structured text data, acquiring text information in the structured text data, matching the text information with preset keywords, and determining a verification result of the structured text data based on the matching result; or inputting the structured text data into a preset verification model for verification, and determining a verification result. The preset keywords can be understood as keywords which do not meet the requirements, and can be specifically set according to actual conditions, and the number of the preset keywords is not limited. The preset verification model refers to a pre-trained deep learning model for verifying the structured text data.
Specifically, when the server verifies the structured text data in the picture drawing data, the server may analyze the structured text data first, extract text information from the structured text data, and then match the text information with a preset keyword, wherein if the text information includes the preset keyword, the verification result is that the verification fails; and if the text information does not comprise the preset key words, the verification result is that the verification is passed. That is, if there is an unsatisfactory keyword in the text message, it indicates that the structured text data does not satisfy the content requirement, and the verification fails. Or, the server may input the structured text data into a preset verification model for verification, so as to obtain a verification result. It is to be understood that the above-mentioned verification of the structured text data may be performed by the present server or an external server, and is not limited in particular.
Optionally, the preset keyword is a game keyword, and further includes: and if the matching degree of the text information in the structured text data and the game keywords is smaller than the matching degree threshold value, determining that the verification result of the structured text data is verification failure, and sending prompt information including the game keywords to the webpage end. The preset keywords can also be scene associated words of a fixed scene, when the matching degree of the text information in the structured text data and the preset keywords is greater than or equal to a matching degree threshold value, the matching is determined to be successful, and the verification result is that the verification is passed; if the matching degree of the structured text data and the preset keywords is smaller than the matching degree threshold value, determining that the matching is failed, indicating that the structured text data is not associated with the game keywords or the association is weak, and if the verification result is that the verification fails, sending prompt information related to the game keywords to a webpage end to be displayed to a user, wherein the prompt information can be used for informing the user of rules of the keywords or can be used for activities such as game drawing and the like including the game keywords. When the verification fails, the user is reminded to reconfigure the text information in the picture by displaying the prompt information to the user, so that the experience effect of the user is improved.
Optionally, the structured picture data is verified, and a verification result is determined, including analyzing the structured picture data, and obtaining a material picture in the structured picture data; judging whether domain names of picture links of all material pictures in the structured picture data are all within a preset domain name range and/or whether the picture links of all the material pictures are effective, and if so, determining that the structured picture data pass verification; otherwise, determining that the structured picture data check fails. The preset domain name range refers to a domain name range of a preset material picture, and the domain name can be from the preset domain name range because the material picture is provided by the server.
When the server checks the structured picture data in the picture drawing data, the server can firstly analyze the structured picture data, extract material pictures from the structured picture data, determine domain names of picture links of all the material pictures in the structured picture data, judge whether the domain names are all in a preset domain name range, if so, indicate that all the material pictures are preset pictures, and determine that the checking result of the structured picture data is that the checking is passed; if the domain name of the picture link of at least one material picture is not in the preset domain name range, the situation that the material picture which does not meet the requirement possibly exists is indicated, and the verification result of the structured picture data is determined to be failed. Or the server can judge the effectiveness of the picture link of each material picture, and when the picture link of each material picture is effective, the verification result of the structured picture data is determined to be verified; and if the picture link of at least one material picture is invalid, determining that the verification result of the structured picture data fails to be verified.
Specifically, after the verification results of the structured text data and the structured picture data are respectively determined, whether the picture drawing data meets the preset condition can be judged according to the verification results of the structured text data and the structured picture data.
And 103, if the picture drawing data are determined to meet the preset conditions, performing secondary drawing based on the picture drawing data to obtain a target picture and storing the target picture.
In the embodiment of the present disclosure, determining that the picture drawing data meets the preset condition may include: and if the structured text data and the structured picture data pass verification, determining that the picture drawing data meets the preset condition. And when the server determines that the verification results of the structured text data and the structured picture data are both verified, determining that the picture drawing data meet the preset condition, performing secondary drawing through the picture drawing data to restore the drawing process of the target picture, generating the target picture and storing the target picture.
Optionally, the image generating method according to the embodiment of the present disclosure may further include: and if the picture drawing data is determined not to meet the preset conditions, sending preset prompt information and/or standby pictures to the webpage end. If the verification result of the structured text data or the structured picture data is that the verification fails, it can be determined that the picture drawing data does not meet the preset condition, and at this time, at least one of preset prompt information and a standby picture can be sent to the webpage end, so that the webpage end is displayed to the user. The preset prompting information and/or the standby picture may be determined according to actual conditions, and are not limited specifically, for example, the preset prompting information may be related requirements for picture drawing, and the standby picture may be an exemplary picture. According to the scheme, when the picture drawing does not meet the preset condition, the picture is rejected to be generated, meanwhile, the related prompt and the picture can be displayed for the user, the user is helped to draw the picture again, and the experience effect of the user is improved.
Optionally, the image generating method according to the embodiment of the present disclosure may further include: and generating a target picture address of the target picture based on the storage position of the target picture, and sending the target picture address to the webpage end so as to enable the webpage end to share the target picture address. The target picture address refers to a Uniform Resource Locator (URL) generated by the server for accessing the target picture.
The server generates a target picture and stores the target picture in a disk, names a file name for the storage position of the target picture, generates an address and binds the file name to obtain the address of the target picture, and returns the address of the target picture to the webpage end. The user can access the stored target picture through the target picture address, and the server can inquire the target picture through the file name bound to the target picture address and return the target picture to the webpage end. In addition, the user can share the target picture address at the webpage end, so that the target picture can be shared.
The embodiment of the disclosure can solve the problem of content verification of the user-defined picture, namely, ensure that the user has a certain degree of freedom to define the picture, and simultaneously ensure that the picture generated and stored in the server is compliant, and the server performs judgment and picture generation, thereby reducing the cost.
According to the picture generation scheme provided by the embodiment of the disclosure, picture drawing data generated by drawing a target picture at a webpage end by a user is acquired; the picture drawing data is structured data generated by intercepting the drawing operation of a user when the webpage side draws a target picture; judging whether the picture drawing data meet preset conditions or not based on the structured data; and if the picture drawing data are determined to meet the preset conditions, performing secondary drawing based on the picture drawing data to obtain a target picture and storing the target picture. By adopting the technical scheme, the server can intercept and acquire the structured picture drawing data of the webpage end through the drawing operation of the user, and generate and store the picture when the preset condition is met through data verification.
Fig. 2 is a schematic flow chart of another picture generation method provided in the embodiment of the present disclosure, and the embodiment further specifically describes the picture generation method on the basis of the above embodiment. As shown in fig. 2, the method includes:
step 201, obtaining picture drawing data generated by drawing a target picture at a webpage end by a user.
The picture drawing data is structured data generated by intercepting the drawing operation of a user when the webpage end draws the target picture. The structured data includes structured text data and structured picture data.
Step 202, checking the structured text data and the structured picture data respectively, and determining a checking result.
Optionally, verifying the structured text data, and determining a verification result, including: analyzing the structured text data, acquiring text information in the structured text data, matching the text information with preset keywords, and determining a verification result of the structured text data based on the matching result; or inputting the structured text data into a preset verification model for verification, and determining a verification result. Optionally, the preset keyword is a game keyword, and further includes: and if the matching degree of the text information in the structured text data and the game keywords is smaller than the matching degree threshold value, determining that the verification result of the structured text data is verification failure, and sending prompt information including the game keywords to the webpage end.
Optionally, the verifying the structured picture data and determining the verification result include: analyzing the structured picture data to obtain a material picture in the structured picture data; judging whether domain names of picture links of all material pictures in the structured picture data are all within a preset domain name range and/or whether the picture links of all the material pictures are effective, and if so, determining that the structured picture data pass verification; otherwise, determining that the structured picture data check fails.
Step 203, whether the verification results of the structured text data and the structured picture data are both verified, if yes, step 204 is executed; otherwise, step 206 is performed.
If the structured text data and the structured picture data are determined to be verified, executing step 204; if the structured text data or the structured picture data fails to be checked, it indicates that the target picture may include content that does not meet the requirements, and step 206 is performed.
And 204, determining that the picture drawing data meet a preset condition, and performing secondary drawing based on the picture drawing data to obtain a target picture and storing the target picture.
Step 205, generating a target picture address of the target picture based on the storage position of the target picture, and sending the target picture address to the webpage end, so that the webpage end shares the target picture address.
And step 206, sending preset prompt information and/or standby pictures to the webpage end.
Next, the picture generation method will be further described with a specific example. Exemplarily, fig. 3 is a schematic diagram of picture generation provided by the embodiment of the present disclosure, and fig. 4 is a timing diagram of picture generation provided by the embodiment of the present disclosure. Referring to fig. 3 and 4, a specific process of generating a picture may include: 1) and drawing the picture by the user, wherein the user draws the picture by utilizing a programming interface of a Web technology Canvas. During the drawing process, the user can select the contents of the drawing picture, including: text (color, font, size, etc.) and pictures (only from server-defined sources); 2) and the bypass drawing operation is to add the automatic collection interface calling data through a programming interface of the code rewriting Canvas. Rewriting the Canvas, and utilizing the characteristic that Proxy can Proxy the operation of all JavaScript objects in the web technology to intercept the operation of the Canvas API. 3) And submitting the drawing data to the server, wherein after the user finishes the drawing operation, the bypassed drawing data is submitted to the server at one time. 4) And (4) text verification, if the text in the drawing data meets the content requirement, continuing drawing the picture, otherwise, failing. Text verification, which can be provided by an external server, is usually recognized by means of keyword matching. 5) And (4) checking the picture, namely checking whether the domain name of the picture data (picture link) in the drawing data is a resource within a preset domain name range, if so, continuing to draw the picture, and otherwise, failing. 6) The picture is saved and a link is generated. And after the server finishes drawing the picture, storing the picture, generating a Uniform Resource Locator (URL), and allowing the user to access the stored picture resource through the URL and share the picture through sharing the URL.
In the embodiment of the disclosure, the drawing data of the picture is structurally stored based on the Web technology, and is verified through a back-end server, so that the self-defined text content meets the preset requirement, and the self-defined picture link meets the requirement of the domain name range; the picture drawing is completed by the server, the picture drawing process is restored through the structured data, and the picture is generated and stored. The method and the device for sharing the personalized pictures can ensure that the user can generate the pictures through online webpage customization and store the pictures to the server, and generate the links capable of being shared at will, so that the user can freely share the personalized pictures and can ensure that the shared contents meet the requirements.
According to the picture generation scheme provided by the embodiment of the disclosure, picture drawing data of a webpage end are obtained, the structured text data and the structured picture data are respectively verified, when the verification results of the structured text data and the structured picture data are both verified, the picture drawing data are determined to meet preset conditions, secondary drawing is carried out based on the picture drawing data to obtain a target picture and store the target picture, a target picture address of the target picture is generated based on the storage position of the target picture, and the target picture address is sent to the webpage end, so that the webpage end shares the target picture address; and when the verification result of the structured text data or the structured picture data is that the verification fails, sending preset prompt information and/or a standby picture to the webpage end. By adopting the technical scheme, the server can intercept and acquire the structured picture drawing data of the webpage end through the drawing operation of the user, and generate and store the picture when the preset condition is met through data verification.
Fig. 5 is a schematic structural diagram of a picture generating apparatus provided in an embodiment of the present disclosure, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 5, the apparatus includes:
the drawing data acquisition module 301 is used for acquiring picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of the user when the webpage end draws a target picture;
a judging module 302, configured to judge whether the picture drawing data meets a preset condition based on the structured data;
and the picture generation module 303 is configured to perform secondary drawing based on the picture drawing data to obtain the target picture and store the target picture if it is determined that the picture drawing data meets a preset condition.
Optionally, the structured data includes structured text data and structured picture data, and the determining module 302 is specifically configured to:
respectively checking the structured text data and the structured picture data to determine a checking result;
and judging whether the picture drawing data meets a preset condition or not based on the verification result of the structured text data and the structured picture data.
Optionally, the picture generating module 303 is specifically configured to:
and if the structured text data and the structured picture data pass verification, determining that the picture drawing data meets a preset condition.
Optionally, the picture generating module 303 is specifically configured to:
analyzing the structured text data, acquiring text information in the structured text data, matching the text information with preset keywords, and determining a verification result of the structured text data based on a matching result; or,
and inputting the structured text data into a preset verification model for verification, and determining a verification result.
Optionally, the picture generating module 303 is specifically configured to:
analyzing the structured picture data to obtain a material picture in the structured picture data;
judging whether domain names of picture links of all material pictures in the structured picture data are all within a preset domain name range and/or whether the picture links of all the material pictures are effective, and if so, determining that the structured picture data pass verification; otherwise, determining that the structured picture data fails to check.
Optionally, the preset keywords are game keywords, and the image generation module 303 is specifically configured to:
and if the matching degree of the text information in the structured text data and the game keywords is smaller than a matching degree threshold value, determining that the verification result of the structured text data is verification failure, and sending prompt information including the game keywords to the webpage end.
Optionally, the apparatus further includes a prompt module, configured to:
and if the picture drawing data is determined not to meet the preset conditions, sending preset prompt information and/or standby pictures to the webpage end.
Optionally, the apparatus further includes a sharing module, configured to:
and generating a target picture address of the target picture based on the storage position of the target picture, and sending the target picture address to the webpage end so as to enable the webpage end to share the target picture address.
The picture generation device provided by the embodiment of the disclosure can execute the picture generation method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure, and specifically, referring to fig. 6 below, a schematic structural diagram of an electronic device 400 suitable for implementing an embodiment of the present disclosure is shown. The electronic device 400 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals 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-mounted terminal (e.g., a car navigation terminal), and the like, and fixed terminals such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 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. 6, the electronic device 400 may include a processing means (e.g., a central processing unit, a 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 means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 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. 6 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, when executed by the processing device 401, performs the above-described functions defined in the picture generation method of the embodiment of the present disclosure.
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 picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of the user when the webpage end draws a target picture; judging whether the picture drawing data meet preset conditions or not based on the structured data; and if the picture drawing data are determined to meet the preset conditions, performing secondary drawing based on the picture drawing data to obtain the target picture and storing the target picture.
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 an element does not in some cases constitute a limitation on the element 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, there is provided a picture generation method including:
acquiring picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of the user when the webpage end draws a target picture;
judging whether the picture drawing data meet preset conditions or not based on the structured data;
and if the picture drawing data are determined to meet the preset conditions, performing secondary drawing based on the picture drawing data to obtain the target picture and storing the target picture.
According to one or more embodiments of the present disclosure, in a picture generation method provided by the present disclosure, the structured data includes structured text data and structured picture data, and based on the structured data, determining whether the picture drawing data meets a preset condition includes:
respectively checking the structured text data and the structured picture data to determine a checking result;
and judging whether the picture drawing data meets a preset condition or not based on the verification result of the structured text data and the structured picture data.
According to one or more embodiments of the present disclosure, in a picture generation method provided by the present disclosure, determining that picture drawing data satisfies a preset condition includes:
and if the structured text data and the structured picture data pass verification, determining that the picture drawing data meets a preset condition.
According to one or more embodiments of the present disclosure, in the image generating method provided by the present disclosure, verifying the structured text data and determining a verification result includes:
analyzing the structured text data, acquiring text information in the structured text data, matching the text information with preset keywords, and determining a verification result of the structured text data based on a matching result; or,
and inputting the structured text data into a preset verification model for verification, and determining a verification result.
According to one or more embodiments of the present disclosure, in the picture generation method provided by the present disclosure, verifying the structured picture data and determining a verification result includes:
analyzing the structured picture data to obtain a material picture in the structured picture data;
judging whether domain names of picture links of all material pictures in the structured picture data are all within a preset domain name range and/or whether the picture links of all the material pictures are effective, and if so, determining that the structured picture data pass verification; otherwise, determining that the structured picture data fails to check.
According to one or more embodiments of the present disclosure, in the image generating method provided by the present disclosure, the preset keyword is a game keyword, and the method further includes:
and if the matching degree of the text information in the structured text data and the game keywords is smaller than a matching degree threshold value, determining that the verification result of the structured text data is verification failure, and sending prompt information including the game keywords to the webpage end.
According to one or more embodiments of the present disclosure, the method for generating a picture further includes:
and if the picture drawing data is determined not to meet the preset conditions, sending preset prompt information and/or standby pictures to the webpage end.
According to one or more embodiments of the present disclosure, the method for generating a picture further includes:
and generating a target picture address of the target picture based on the storage position of the target picture, and sending the target picture address to the webpage end so as to enable the webpage end to share the target picture address.
According to one or more embodiments of the present disclosure, there is provided a picture generation apparatus including:
the drawing data acquisition module is used for acquiring picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of the user when the webpage end draws a target picture;
the judging module is used for judging whether the picture drawing data meets a preset condition or not based on the structured data;
and the picture generation module is used for performing secondary drawing on the basis of the picture drawing data to obtain the target picture and storing the target picture if the picture drawing data is determined to meet the preset condition.
According to one or more embodiments of the present disclosure, in the picture generating apparatus provided by the present disclosure, the structured data includes structured text data and structured picture data, and the determining module is specifically configured to:
respectively checking the structured text data and the structured picture data to determine a checking result;
and judging whether the picture drawing data meets a preset condition or not based on the verification result of the structured text data and the structured picture data.
According to one or more embodiments of the present disclosure, in the picture generation apparatus provided by the present disclosure, the picture generation module is specifically configured to:
and if the structured text data and the structured picture data pass verification, determining that the picture drawing data meets a preset condition.
According to one or more embodiments of the present disclosure, in the picture generation apparatus provided by the present disclosure, the picture generation module is specifically configured to:
analyzing the structured text data, acquiring text information in the structured text data, matching the text information with preset keywords, and determining a verification result of the structured text data based on a matching result; or,
and inputting the structured text data into a preset verification model for verification, and determining a verification result.
According to one or more embodiments of the present disclosure, in the picture generation apparatus provided by the present disclosure, the picture generation module is specifically configured to:
analyzing the structured picture data to obtain a material picture in the structured picture data;
judging whether domain names of picture links of all material pictures in the structured picture data are all within a preset domain name range and/or whether the picture links of all the material pictures are effective, and if so, determining that the structured picture data pass verification; otherwise, determining that the structured picture data fails to check.
According to one or more embodiments of the present disclosure, in the image generating device provided by the present disclosure, the preset keyword is a game keyword, and the image generating module is specifically configured to:
and if the matching degree of the text information in the structured text data and the game keywords is smaller than a matching degree threshold value, determining that the verification result of the structured text data is verification failure, and sending prompt information including the game keywords to the webpage end.
According to one or more embodiments of the present disclosure, in an image generating apparatus provided by the present disclosure, the apparatus further includes a prompting module, configured to:
and if the picture drawing data is determined not to meet the preset conditions, sending preset prompt information and/or standby pictures to the webpage end.
According to one or more embodiments of the present disclosure, in an image generating apparatus provided by the present disclosure, the apparatus further includes a sharing module, configured to:
and generating a target picture address of the target picture based on the storage position of the target picture, and sending the target picture address to the webpage end so as to enable the webpage end to share the target picture address.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize the picture generation method provided by the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing any of the picture generation methods provided by the present disclosure.
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 (11)

1. A picture generation method, comprising:
acquiring picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of the user when the webpage end draws a target picture;
judging whether the picture drawing data meet preset conditions or not based on the structured data;
and if the picture drawing data are determined to meet the preset conditions, performing secondary drawing based on the picture drawing data to obtain the target picture and storing the target picture.
2. The method of claim 1, wherein the structured data comprises structured text data and structured picture data, and wherein determining whether the picture drawing data satisfies a preset condition based on the structured data comprises:
respectively checking the structured text data and the structured picture data to determine a checking result;
and judging whether the picture drawing data meets a preset condition or not based on the verification result of the structured text data and the structured picture data.
3. The method of claim 2, wherein determining that the picture drawing data meets a preset condition comprises:
and if the structured text data and the structured picture data pass verification, determining that the picture drawing data meets a preset condition.
4. The method of claim 2, wherein verifying the structured text data to determine a verification result comprises:
analyzing the structured text data, acquiring text information in the structured text data, matching the text information with preset keywords, and determining a verification result of the structured text data based on a matching result; or,
and inputting the structured text data into a preset verification model for verification, and determining a verification result.
5. The method of claim 2, wherein verifying the structured picture data to determine a verification result comprises:
analyzing the structured picture data to obtain a material picture in the structured picture data;
judging whether domain names of picture links of all material pictures in the structured picture data are all within a preset domain name range and/or whether the picture links of all the material pictures are effective, and if so, determining that the structured picture data pass verification; otherwise, determining that the structured picture data fails to check.
6. The method of claim 4, wherein the predetermined keywords are game keywords, further comprising:
and if the matching degree of the text information in the structured text data and the game keywords is smaller than a matching degree threshold value, determining that the verification result of the structured text data is verification failure, and sending prompt information including the game keywords to the webpage end.
7. The method of claim 1, further comprising:
and if the picture drawing data is determined not to meet the preset conditions, sending preset prompt information and/or standby pictures to the webpage end.
8. The method of claim 1, further comprising:
and generating a target picture address of the target picture based on the storage position of the target picture, and sending the target picture address to the webpage end so as to enable the webpage end to share the target picture address.
9. A picture generation apparatus, comprising:
the drawing data acquisition module is used for acquiring picture drawing data generated by drawing a target picture at a webpage end by a user; the picture drawing data is structured data generated by intercepting the drawing operation of the user when the webpage end draws a target picture;
the judging module is used for judging whether the picture drawing data meets a preset condition or not based on the structured data;
and the picture generation module is used for performing secondary drawing on the basis of the picture drawing data to obtain the target picture and storing the target picture if the picture drawing data is determined to meet the preset condition.
10. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the picture generation method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the picture generation method according to any one of claims 1 to 8.
CN202110475713.3A 2021-04-29 2021-04-29 Picture generation method, device, equipment and medium Active CN113031950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110475713.3A CN113031950B (en) 2021-04-29 2021-04-29 Picture generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110475713.3A CN113031950B (en) 2021-04-29 2021-04-29 Picture generation method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN113031950A true CN113031950A (en) 2021-06-25
CN113031950B CN113031950B (en) 2024-05-28

Family

ID=76455119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110475713.3A Active CN113031950B (en) 2021-04-29 2021-04-29 Picture generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113031950B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117056630A (en) * 2023-08-28 2023-11-14 广东保伦电子股份有限公司 Webpage layout picture display method, system, terminal equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341403A (en) * 2016-08-30 2017-01-18 竞技世界(北京)网络技术有限公司 Identifying code theft preventing method
CN109656652A (en) * 2018-11-21 2019-04-19 平安科技(深圳)有限公司 Webpage graph making method, apparatus, computer equipment and storage medium
WO2019127660A1 (en) * 2017-12-30 2019-07-04 惠州学院 Method and system for identifying harmful pictures based on user id
CN109992698A (en) * 2019-04-11 2019-07-09 北京字节跳动网络技术有限公司 Data processing method, device, electronic equipment and readable storage medium storing program for executing
CN110097612A (en) * 2019-04-02 2019-08-06 北京大麦地信息技术有限公司 A kind of method and device of online graphing element
US20200387557A1 (en) * 2016-08-26 2020-12-10 Symmetric Co., Ltd. System, program, and recording medium for displaying web pages

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200387557A1 (en) * 2016-08-26 2020-12-10 Symmetric Co., Ltd. System, program, and recording medium for displaying web pages
CN106341403A (en) * 2016-08-30 2017-01-18 竞技世界(北京)网络技术有限公司 Identifying code theft preventing method
WO2019127660A1 (en) * 2017-12-30 2019-07-04 惠州学院 Method and system for identifying harmful pictures based on user id
CN109656652A (en) * 2018-11-21 2019-04-19 平安科技(深圳)有限公司 Webpage graph making method, apparatus, computer equipment and storage medium
CN110097612A (en) * 2019-04-02 2019-08-06 北京大麦地信息技术有限公司 A kind of method and device of online graphing element
CN109992698A (en) * 2019-04-11 2019-07-09 北京字节跳动网络技术有限公司 Data processing method, device, electronic equipment and readable storage medium storing program for executing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
徐萌: ""基于云平台的视频网站数据分析技术研究与实现"", 《中国优秀硕士学位论文全文数据库(信息科技辑)》, pages 1 - 89 *
林文强: ""基于深度学习的小学校园设计布局自动生成研究"", 《中国优秀硕士学位论文全文数据库 (工程科技Ⅱ辑)》, pages 1 - 148 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117056630A (en) * 2023-08-28 2023-11-14 广东保伦电子股份有限公司 Webpage layout picture display method, system, terminal equipment and medium

Also Published As

Publication number Publication date
CN113031950B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN111459364B (en) Icon updating method and device and electronic equipment
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN111596991A (en) Interactive operation execution method and device and electronic equipment
CN110781437A (en) Method and device for acquiring webpage image loading duration and electronic equipment
CN112965673A (en) Content printing method, device, equipment and storage medium
CN110674481B (en) Account registration method, device, equipment and storage medium of application program
CN111597107A (en) Information output method and device and electronic equipment
CN111754600A (en) Poster image generation method and device and electronic equipment
CN111209432A (en) Information acquisition method and device, electronic equipment and computer readable medium
CN110764983A (en) Test method, device, medium and electronic equipment
CN113031950B (en) Picture generation method, device, equipment and medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111461967B (en) Picture processing method, device, equipment and computer readable medium
CN113297453A (en) Network request response method and device, electronic equipment and storage medium
CN112380819A (en) Document editing method and device and electronic equipment
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN111798251A (en) Verification method and device of house source data and electronic equipment
CN111797822A (en) Character object evaluation method and device and electronic equipment
CN112084441A (en) Information retrieval method and device and electronic equipment
CN111311358A (en) Information processing method and device and electronic equipment
CN112203158B (en) Image display method, device, system, equipment and medium
CN111259287B (en) Page content display method and device, electronic equipment and storage medium
CN111897620A (en) Interaction method and device and electronic equipment
CN112149019A (en) Method, apparatus, electronic device, and computer-readable medium for displaying information
CN110795670A (en) Webpage image monitoring method and device, electronic equipment and readable storage medium

Legal Events

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