CN110825540A - Ticket image generation method and device - Google Patents

Ticket image generation method and device Download PDF

Info

Publication number
CN110825540A
CN110825540A CN201911111755.8A CN201911111755A CN110825540A CN 110825540 A CN110825540 A CN 110825540A CN 201911111755 A CN201911111755 A CN 201911111755A CN 110825540 A CN110825540 A CN 110825540A
Authority
CN
China
Prior art keywords
ticket
image
generating
request
instruction
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
CN201911111755.8A
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.)
CHINA NATIONAL AVIATION SETTLEMENT Co Ltd
China Travelsky Technology Co Ltd
Original Assignee
CHINA NATIONAL AVIATION SETTLEMENT Co Ltd
China Travelsky 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 CHINA NATIONAL AVIATION SETTLEMENT Co Ltd, China Travelsky Technology Co Ltd filed Critical CHINA NATIONAL AVIATION SETTLEMENT Co Ltd
Priority to CN201911111755.8A priority Critical patent/CN110825540A/en
Publication of CN110825540A publication Critical patent/CN110825540A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour

Landscapes

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

Abstract

The embodiment of the invention discloses a method and a device for generating a ticket image. The method and the device for generating the ticket image can generate an instruction for intercepting the ticket page corresponding to the target ticket when a request for downloading or exporting the ticket image is received, and then the instruction is executed by calling other controls to complete the interception of the ticket image, so that the requirement of civil aviation service interconnection is met, and the convenience of the civil aviation service is improved.

Description

Ticket image generation method and device
Technical Field
The invention relates to the field of data processing, in particular to a method and a device for generating a ticket image.
Background
At present, the electronization of the civil aviation system is very perfect, and the traditional paper air ticket is gradually replaced by an electronic air ticket. The electronic ticket is stored in the database in an abstract data form in the settlement system, but a settlement person cannot conveniently and intuitively know ticket information when checking the data of the electronic ticket. Therefore, abstract electronic ticket data need to be displayed according to the traditional ticket image format and layout mode.
The existing method for generating the ticket image can conveniently display the electronic ticket data to the user in the form of a page, but does not support the downloading and exporting of the ticket image/image. In the modern society of social information interconnection and electronic development, the conventional method for generating the ticket image cannot meet the normal business requirements, so that the development of the convenience of the civil aviation business is greatly discounted.
Disclosure of Invention
In view of this, the present invention provides the following technical solutions:
a method for generating a ticket image, comprising:
receiving a data request for acquiring a ticket image;
generating a screenshot instruction for intercepting a ticket page corresponding to the ticket information according to the ticket information in the data request;
calling a first control to execute the screenshot command to obtain a ticket image;
and returning the ticket image to the sender of the data request.
Optionally, before the receiving the data request for obtaining the ticket image, the method further includes:
receiving a first calling request sent by a front-end page, and returning a page corresponding to the first calling request;
and receiving query information input by a user, and returning a ticket page corresponding to the query information.
Optionally, before the receiving the data request for obtaining the ticket image, the method further includes:
receiving a second calling request sent by a first system, and returning a page corresponding to the second calling request;
and receiving query information sent by the first system, and returning a ticket page corresponding to the query information.
Optionally, the generating a screenshot instruction for intercepting a ticket page corresponding to the ticket information according to the ticket information in the data request includes:
generating a URL (uniform resource locator) containing the ticket information according to the ticket information in the data request;
and generating a screenshot code instruction for intercepting the page corresponding to the URL.
Optionally, the invoking the first control to execute the screenshot instruction to obtain a ticket image includes:
and calling a simulation browser control to run the screenshot code instruction to obtain a ticket image.
Optionally, the simulated browser control may be PhantomJs, selenium, or headset Chrome.
A ticket image generating apparatus comprising:
the request receiving module is used for receiving a data request for acquiring the ticket image;
the instruction generating module is used for generating a screenshot instruction for intercepting a ticket page corresponding to the ticket information according to the ticket information in the data request;
the instruction execution module is used for calling the first control to execute the screenshot instruction and obtaining a ticket image;
and the image returning module is used for returning the ticket image to the sender of the data request.
Optionally, the method further includes:
the request processing module is used for receiving a calling request sent by a first system/front-end page and returning a page corresponding to the calling request;
and the query processing module is used for receiving query information sent by the first system/front-end page and returning a ticket page corresponding to the query information.
Optionally, the instruction generating module includes:
the URL generating module is used for generating a URL containing the ticket information according to the ticket information in the data request;
and the code generation module is used for generating a screenshot code instruction for intercepting the page corresponding to the URL.
Optionally, the instruction execution module is specifically configured to: and calling a simulation browser control to run the screenshot code instruction to obtain a ticket image.
According to the technical scheme, compared with the prior art, the embodiment of the invention discloses a method and a device for generating a ticket image. The method and the device for generating the ticket image can generate an instruction for intercepting the ticket page corresponding to the target ticket when a request for downloading or exporting the ticket image is received, and then the instruction is executed by calling other controls to complete the interception of the ticket image, so that the requirement of civil aviation service interconnection is met, and the convenience of the civil aviation service is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for generating a ticket image according to an embodiment of the present invention;
FIG. 2 is a flowchart of another exemplary method for generating a ticket image according to the present invention;
FIG. 3 is a schematic diagram of a page for a user to input query information;
FIG. 4 is a schematic diagram of a ticket image corresponding to the query information returned by the system;
FIG. 5 is a flowchart illustrating a method for generating a ticket image according to another embodiment of the present invention;
FIG. 6 is a flowchart illustrating data interaction between a user and a ticket image according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating data interaction between a third-party system and a ticket image request according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a ticket image generating apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of another apparatus for generating a ticket image according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an instruction generating module according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for generating a ticket image according to an embodiment of the present invention, and referring to fig. 1, the method for generating a ticket image may include:
step 101: a data request for obtaining a ticket image is received.
The execution main body of the method for generating a ticket image according to this embodiment may be a server of a ticket image system or a server for providing ticket data for a user.
The data request can come from the server of the ticket image system or the front-end page of the server for providing the ticket data for the user, and can also come from other business systems, wherein the other business systems can be internal compilation systems of civil aviation systems, and can also be third-party systems, such as public security systems.
The data request comprises ticket information, so that the server can determine which ticket image the data request sender wants to obtain.
Step 102: and generating a screenshot instruction for intercepting a ticket page corresponding to the ticket information according to the ticket information in the data request.
In this embodiment, the ticket image system may be a B/S architecture system, the front-end page is developed by using HTML5 and CSS technologies, and the back-end (i.e., a server of the ticket image system or a server for providing ticket data for a user) is developed by using a spring mvc framework. Thus, the ticket can be drawn in the form of a web page through HTML5 and CSS technology; however, the page image is presented by means of HTML5, which only supports direct access of the user at the front-end system, and background downloads and other system requests cannot be normally realized. Therefore, in this implementation, when a data request for obtaining a ticket image is received, that is, when the ticket image needs to be downloaded or exported, a screenshot instruction for intercepting a ticket page corresponding to the ticket information needs to be generated according to the ticket information in the data request, and the screenshot instruction may be executed by another subsystem or control.
Step 103: and calling the first control to execute the screenshot command to obtain a ticket image.
In this embodiment, the first control may be a simulated browser control, and may be, but is not limited to, any of the following: PhantomJs, selenium browser automated test framework, and headset Chrome. PhantomJS is a server side JavaScript API based on WebKit, can simulate the access of a browser on the server side, and executes the operation of webpage screenshot without directly opening the browser; the selenium is a browser automation test framework. Therefore, the method for generating the ticket image disclosed in this embodiment is a method for generating the ticket image in a background manner by screenshot on a web page, and specifically, the method can simulate a browser to access and screenshot by means of a third-party tool, and can also ensure that the ticket image generated at the back end is the same as the ticket data viewed by the user at the front section.
Step 104: and returning the ticket image to the sender of the data request.
And after the ticket image is obtained, returning the ticket image to a sender of the data request so as to facilitate a user or other systems to carry out subsequent processing and goods arrangement according to the ticket influence.
In this embodiment, the method for generating the certificate image can generate an instruction for intercepting the ticket page corresponding to the target ticket when receiving a request for downloading or exporting the ticket image, and then complete the interception of the ticket image by calling other controls to execute the instruction, so that the requirement of civil aviation service interconnection is met, and the convenience of the civil aviation service is improved.
Based on the above embodiment of the present disclosure, fig. 2 is a flowchart of another method for generating a ticket image according to the embodiment of the present disclosure, and as shown in fig. 2, the method for generating a ticket image may include:
step 201: receiving a first calling request sent by a front-end page, and returning a page corresponding to the first calling request.
The first call request may be a call request sent by the front-end page to an image back-end service (a server of the ticket image system or a server for providing ticket data for a user) after receiving a query request input by the user, the image back-end service returns a corresponding query page to the front-end page after receiving the first call request, and the user may input a query condition, such as a ticket ID, on the query page to which the user belongs.
Step 202: and receiving query information input by a user, and returning a ticket page corresponding to the query information.
In an illustrative example, a page on which a user inputs query information is shown in fig. 3, and the returned ticket image corresponding to the query information is shown in fig. 4.
Step 203: receiving a data request for acquiring a ticket image from a front-end page;
step 204: and generating a screenshot instruction for intercepting a ticket page corresponding to the ticket information according to the ticket information in the data request.
Step 205: and calling the first control to execute the screenshot command to obtain a ticket image.
Step 206: and returning the ticket image to the user.
Wherein the user may be a user device.
Of course, in another implementation manner, the data request for acquiring a ticket image may also be sent to a server of the ticket image system by another system or a server for providing ticket data for a user, and before receiving the data request for acquiring a ticket image, similar to the flow shown in fig. 2, the method may further include: receiving a second calling request sent by a first system, and returning a page corresponding to the second calling request; and receiving query information sent by the first system, and returning a ticket page corresponding to the query information. The first system may be other subsystems in the ticket imaging system or a third-party system.
In the embodiment, the method for generating the ticket image can generate an instruction for intercepting the ticket page corresponding to the target ticket when a user needs to download the ticket image or other systems need to export the ticket image, and then, the instruction is executed by calling other controls to complete the interception of the ticket image, so that the requirement of civil aviation service interconnection is met, and the convenience of the civil aviation service is improved.
Fig. 5 is a flowchart of another method for generating a ticket image according to an embodiment of the present invention, and referring to fig. 5, the method for generating a ticket image may include:
step 501: a data request for obtaining a ticket image is received.
Step 502: and generating a URL (uniform resource locator) containing the ticket information according to the ticket information in the data request.
The background system may first obtain an address for displaying the detailed information of the configured ticket image, for example: https:// 10.1.5.203/image/index? route ═ tkiamges/imagedetail/% s/zh-hans/detail; then, the ticket id is replaced into the URL to generate a complete address of the details of the accessible ticket image. For example: https:// 10.1.5.203/image/index? route ═ tkiamges/imagedetail/1613535417 _82920698_ I/zh-hans/detail.
Step 503: and generating a screenshot code instruction for intercepting the page corresponding to the URL.
Specifically, the screenshot code instruction may be a dynamic javascript file. Some necessary parameters are set in the javascript code. Creating a page, setting the size of the page, putting the URL generated in the previous step into a javascript code, opening the page by using a simulation browser control, judging whether the rendering of the page is finished or not by using a timer, and finally performing screenshot operation and storing the picture.
Step 504: and calling a simulation browser control to run the screenshot code instruction to obtain a ticket image.
Step 505: and returning the ticket image to the sender of the data request.
In the above embodiment, how to generate the screenshot instruction by the background system is described in detail, and the process of simulating the browser control to execute the screenshot instruction to complete screenshot is described.
In addition, the background is often required to generate and download the ticket images in a large batch in business, and the execution efficiency of the system can be greatly improved by the ticket image generation method disclosed by the embodiment. Meanwhile, the image generation of the foreground and the background can be realized only by the same set of codes, so that for developers, the implementation of the scheme avoids repeated development, and the development efficiency is greatly improved.
Fig. 6 is a flowchart illustrating data interaction of a user downloading a ticket image according to an embodiment of the present invention, which is helpful for better understanding the method for generating a ticket image disclosed in the present application with reference to fig. 6 and the following description. Fig. 6 shows an exemplary data interaction process for a user to download a ticket image. Referring to fig. 6, a PhantomJS executable file may be deployed to a designated location on a server in advance, and executable rights may be configured; in the normal use process, a user inquires ticket results on a page; the user selects to view the image data of a certain ticket in the list; then the front-end system opens a detail page to display the ticket image data, and in the front-end system, the ticket image can be drawn in a front-end webpage by adopting the technologies of HTML5 and CSS; the user clicks a exporting button and selects to export a PDF or PNG image; the front-end system transmits the id of the ticket to be exported to the background system; after receiving the ticket id, the background system generates a complete url according to a preset rule, wherein the url is a real url of a foreground accessing the ticket image detail page; dynamically generating a javascript file which can be executed by PhantomJS by a background system according to url of an image to be displayed, customizing important data such as the size of a screen to be captured, completeness of image display and the like in the javascript file, and amplifying an area to be captured through javascript codes in the javascript file to ensure the definition of the captured image; the background system executes a javascript file in java codes by calling a process of PhantomJS, and acquires a screenshot according to url; the background system creates a PNG file to store the acquired screenshot; the background system prepares a returned data file according to the file type selected and exported by the user, PNG or PDF; if the user selects the PNG, the PNG file generated by screenshot can be directly returned to the front-end system; and if the user selects the PDF background system, generating a PDF file, storing the screenshot data into the PDF, and returning the PDF to the front-end system.
When the PhantomJS is deployed on the background server of the image system, the PhantomJS simultaneously supports the Linux and Windows systems, so the background server of the image system can deploy the Linux or Windows system. PhantomJS mainly includes one executable file. In the case of the Linux system, the execution authority of the executable file needs to be guaranteed.
The background system calls the PhantomJS Process to run the javascript code, and specifically, the system calls the PhantomJS Process to run through the Process of the java code to obtain the screenshot file, and the screenshot file is stored in the system.
Fig. 7 is a data interaction flow chart of a third-party system requesting a ticket image according to an embodiment of the present invention, which is helpful for better understanding of the method for generating a ticket image disclosed in the present application with reference to fig. 7 and the following description. Fig. 7 shows an exemplary data interaction process for requesting a ticket image by a third-party system. Referring to fig. 7, the third party system calls a service interface for image data query, and transmits query conditions such as time, ticket number, and airline company; the image system returns detailed information of ticket data in json format, including id data of the ticket; the third-party system transmits the ticket id of the image picture to be generated to the image background system; after receiving the ticket id, the image background system dynamically generates a url address of the accessible ticket image details; dynamically generating a javascript file by the ticket image system; the ticket image system calls a PhantomJS process to generate a screenshot according to the URL; the system saves the screenshot into a PNG picture; the imaging system returns the PNG picture to the third-party system.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
The method is described in detail in the embodiments disclosed above, and the method of the present invention can be implemented by various types of apparatuses, so that the present invention also discloses an apparatus, and the following detailed description will be given of specific embodiments.
Fig. 8 is a schematic structural diagram of a ticket image generating apparatus according to an embodiment of the present invention, and referring to fig. 8, the ticket image generating apparatus 80 may include:
the request receiving module 801 is configured to receive a data request for obtaining a ticket image.
The execution main body of the apparatus for generating a ticket image according to this embodiment may be a server of a ticket image system or a server for providing ticket data to a user.
The data request can come from the server of the ticket image system or the front-end page of the server for providing the ticket data for the user, and can also come from other business systems, wherein the other business systems can be internal compilation systems of civil aviation systems, and can also be third-party systems, such as public security systems.
The data request comprises ticket information, so that the server can determine which ticket image the data request sender wants to obtain.
An instruction generating module 802, configured to generate, according to the ticket information in the data request, a screenshot instruction for intercepting a ticket page corresponding to the ticket information.
In this implementation, when a data request for obtaining a ticket image is received, that is, when the ticket image needs to be downloaded or exported, a screenshot instruction for intercepting a ticket page corresponding to the ticket information needs to be generated according to the ticket information in the data request, and the screenshot instruction can be executed and completed by other subsystems or controls.
The instruction executing module 803 is configured to invoke the first control to execute the screenshot instruction, so as to obtain a ticket image.
In this embodiment, the first control may be a simulated browser control, and may be, but is not limited to, any of the following: PhantomJs, selenium and Headless Chrome. Therefore, the method for generating the ticket image disclosed in this embodiment is a method for generating the ticket image in a background manner by screenshot on a web page, and specifically, the method can simulate a browser to access and screenshot by means of a third-party tool, and can also ensure that the ticket image generated at the back end is the same as the ticket data viewed by the user at the front section.
An image returning module 804, configured to return the ticket image to the sender of the data request.
And after the ticket image is obtained, returning the ticket image to a sender of the data request so as to facilitate a user or other systems to carry out subsequent processing and goods arrangement according to the ticket influence.
In this embodiment, the ticket image generating device can generate an instruction for intercepting a ticket page corresponding to a target ticket when receiving a request for downloading or exporting a ticket image, and then execute the instruction by calling other controls to complete the interception of the ticket image, so that the requirement of civil aviation service interconnection is met, and the convenience of the civil aviation service is improved.
Fig. 9 is a schematic structural diagram of another apparatus for generating a ticket image according to an embodiment of the present invention, and referring to fig. 9, the apparatus 90 for generating a ticket image may include:
the request processing module 901 is configured to receive a call request sent by a first system/front-end page, and return a page corresponding to the call request.
The first call request may be a call request sent by the front-end page to an image back-end service (a server of the ticket image system or a server for providing ticket data for a user) after receiving a query request input by the user, the image back-end service returns a corresponding query page to the front-end page after receiving the first call request, and the user may input a query condition, such as a ticket ID, on the query page to which the user belongs.
The query processing module 902 is configured to receive query information sent by the first system/front-end page, and return a ticket page corresponding to the query information.
The request receiving module 801 is configured to receive a data request for obtaining a ticket image.
An instruction generating module 802, configured to generate, according to the ticket information in the data request, a screenshot instruction for intercepting a ticket page corresponding to the ticket information.
The instruction executing module 803 is configured to invoke the first control to execute the screenshot instruction, so as to obtain a ticket image.
An image returning module 804, configured to return the ticket image to the sender of the data request.
In the embodiment, the ticket image generating device can generate an instruction for intercepting a ticket page corresponding to a target ticket when a user needs to download the ticket image or other systems need to export the ticket image, and then, the instruction is executed by calling other controls to complete the interception of the ticket image, so that the requirement of civil aviation service interconnection is met, and the convenience of the civil aviation service is improved.
Fig. 10 is a schematic structural diagram of an instruction generating module disclosed in the embodiment of the present invention, and referring to fig. 10, the instruction generating module 802 may include:
a URL generating module 1001, configured to generate a URL including the ticket information according to the ticket information in the data request.
The background system can firstly obtain the address for displaying the detailed information of the configured ticket image, and then replace the ticket id into the URL to generate a complete address for the detailed information of the accessible ticket image.
A code generating module 1002, configured to generate a screenshot code instruction for intercepting a page corresponding to the URL.
Specifically, the screenshot code instruction may be a dynamic javascript file. Some necessary parameters are set in the javascript code. Creating a page, setting the size of the page, putting the URL generated in the previous step into a javascript code, opening the page by using a simulation browser control, judging whether the rendering of the page is finished or not by using a timer, and finally performing screenshot operation and storing the picture.
The instruction execution module 803 is specifically operable to: and calling a simulation browser control to run the screenshot code instruction to obtain a ticket image.
In the above embodiment, how to generate the screenshot instruction by the background system is described in detail, and the process of simulating the browser control to execute the screenshot instruction to complete screenshot is described.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of generating a ticket image, comprising:
receiving a data request for acquiring a ticket image;
generating a screenshot instruction for intercepting a ticket page corresponding to the ticket information according to the ticket information in the data request;
calling a first control to execute the screenshot command to obtain a ticket image;
and returning the ticket image to the sender of the data request.
2. The method of claim 1, further comprising, prior to receiving a request for obtaining data for a ticket image:
receiving a first calling request sent by a front-end page, and returning a page corresponding to the first calling request;
and receiving query information input by a user, and returning a ticket page corresponding to the query information.
3. The method of claim 1, further comprising, prior to receiving a request for obtaining data for a ticket image:
receiving a second calling request sent by a first system, and returning a page corresponding to the second calling request;
and receiving query information sent by the first system, and returning a ticket page corresponding to the query information.
4. The method for generating a ticket image according to claim 1, wherein generating a screenshot instruction for intercepting a ticket page corresponding to the ticket information according to the ticket information in the data request comprises:
generating a URL (uniform resource locator) containing the ticket information according to the ticket information in the data request;
and generating a screenshot code instruction for intercepting the page corresponding to the URL.
5. The method for generating a ticket image according to claim 4, wherein the invoking the first control to execute the screenshot instruction to obtain the ticket image comprises:
and calling a simulation browser control to run the screenshot code instruction to obtain a ticket image.
6. The method of claim 5, wherein the simulated browser control is PhantomJs, selenium, or Headless Chrome.
7. An apparatus for generating a ticket image, comprising:
the request receiving module is used for receiving a data request for acquiring the ticket image;
the instruction generating module is used for generating a screenshot instruction for intercepting a ticket page corresponding to the ticket information according to the ticket information in the data request;
the instruction execution module is used for calling the first control to execute the screenshot instruction and obtaining a ticket image;
and the image returning module is used for returning the ticket image to the sender of the data request.
8. The apparatus for generating a document image according to claim 7, further comprising:
the request processing module is used for receiving a calling request sent by a first system/front-end page and returning a page corresponding to the calling request;
and the query processing module is used for receiving query information sent by the first system/front-end page and returning a ticket page corresponding to the query information.
9. The apparatus of claim 7, wherein the command generation module comprises:
the URL generating module is used for generating a URL containing the ticket information according to the ticket information in the data request;
and the code generation module is used for generating a screenshot code instruction for intercepting the page corresponding to the URL.
10. The apparatus of claim 9, wherein the instruction execution module is specifically configured to: and calling a simulation browser control to run the screenshot code instruction to obtain a ticket image.
CN201911111755.8A 2019-11-14 2019-11-14 Ticket image generation method and device Pending CN110825540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911111755.8A CN110825540A (en) 2019-11-14 2019-11-14 Ticket image generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911111755.8A CN110825540A (en) 2019-11-14 2019-11-14 Ticket image generation method and device

Publications (1)

Publication Number Publication Date
CN110825540A true CN110825540A (en) 2020-02-21

Family

ID=69555069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911111755.8A Pending CN110825540A (en) 2019-11-14 2019-11-14 Ticket image generation method and device

Country Status (1)

Country Link
CN (1) CN110825540A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462125A (en) * 2013-09-18 2015-03-25 腾讯科技(深圳)有限公司 Method and device for generating webpage screenshot
US20150194008A1 (en) * 2011-03-21 2015-07-09 Intralot S.A. Integrated Lottery Systems and Services Ordering lottery tickets using mobile devices
CN106227780A (en) * 2016-07-18 2016-12-14 中国科学院信息工程研究所 Automatization's sectional drawing evidence collecting method of a kind of magnanimity webpage and system
CN106681621A (en) * 2016-12-09 2017-05-17 北京超雷科技中心(有限合伙) Webpage evidence preservation system and method
CN107665102A (en) * 2017-09-08 2018-02-06 金蝶软件(中国)有限公司 Method, apparatus, storage medium and the system of mobile print data
CN109491744A (en) * 2018-11-06 2019-03-19 成都知道创宇信息技术有限公司 A kind of webpage capture system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150194008A1 (en) * 2011-03-21 2015-07-09 Intralot S.A. Integrated Lottery Systems and Services Ordering lottery tickets using mobile devices
CN104462125A (en) * 2013-09-18 2015-03-25 腾讯科技(深圳)有限公司 Method and device for generating webpage screenshot
CN106227780A (en) * 2016-07-18 2016-12-14 中国科学院信息工程研究所 Automatization's sectional drawing evidence collecting method of a kind of magnanimity webpage and system
CN106681621A (en) * 2016-12-09 2017-05-17 北京超雷科技中心(有限合伙) Webpage evidence preservation system and method
CN107665102A (en) * 2017-09-08 2018-02-06 金蝶软件(中国)有限公司 Method, apparatus, storage medium and the system of mobile print data
CN109491744A (en) * 2018-11-06 2019-03-19 成都知道创宇信息技术有限公司 A kind of webpage capture system and method

Similar Documents

Publication Publication Date Title
US10705942B1 (en) Simulated testing of API
CN106933722B (en) Webpage application monitoring method, server and system
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN106897053B (en) Code publishing method and device
JP2015524966A (en) Evaluation of application compatibility
CN105335132B (en) Method, device and system for customizing application program function
CN107832052B (en) Method and device for displaying preview page, storage medium and electronic equipment
CN107577622B (en) Method, device and storage medium for simulating rear-end interface
CN106874519A (en) Webpage representation method and apparatus
CN111736740B (en) Picture hot area generation method, device and equipment and storage medium
US10417317B2 (en) Web page profiler
CN109582317B (en) Method and apparatus for debugging hosted applications
CN111045653A (en) System generation method and device, computer readable medium and electronic equipment
CN113535267A (en) Applet page configuration method and device, electronic equipment and storage medium
US10951486B2 (en) Terminal device, UI expansion method, and UI expansion program
GB2539758A (en) Techniques for evaluating applications through use of an auxiliary application
CN112395027A (en) Widget interface generation method and device, storage medium and electronic equipment
CN114036439A (en) Website building method, device, medium and electronic equipment
CN107391118B (en) Web application user experience platform system
US11853685B2 (en) Transformation of resource files using mapped keys for tracking content location
CN114756228A (en) Page processing method, device, equipment and storage medium
CN111222067B (en) Information generation method and device
CN111079048A (en) Page loading method and device
CN110955449A (en) Method and device for releasing gray scale of client
CN110825540A (en) Ticket image generation method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200221

RJ01 Rejection of invention patent application after publication