CN109240660B - Access method of advertisement data, storage medium, electronic device and system - Google Patents

Access method of advertisement data, storage medium, electronic device and system Download PDF

Info

Publication number
CN109240660B
CN109240660B CN201710515495.5A CN201710515495A CN109240660B CN 109240660 B CN109240660 B CN 109240660B CN 201710515495 A CN201710515495 A CN 201710515495A CN 109240660 B CN109240660 B CN 109240660B
Authority
CN
China
Prior art keywords
advertisement
platform
class
data
abstract class
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.)
Active
Application number
CN201710515495.5A
Other languages
Chinese (zh)
Other versions
CN109240660A (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.)
Two Bit Beijing Technology Co ltd
Original Assignee
Wuhan Douyu 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710515495.5A priority Critical patent/CN109240660B/en
Publication of CN109240660A publication Critical patent/CN109240660A/en
Application granted granted Critical
Publication of CN109240660B publication Critical patent/CN109240660B/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/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0277Online advertisement

Abstract

The invention discloses an access method of advertisement data, a storage medium, electronic equipment and a system, and relates to the field of advertisement data access. The method comprises the following steps: defining a uniform advertisement interface; creating an abstract class library and defining an abstract class method; setting an advertisement platform used by an advertisement position, and storing an advertisement position address and a name of the advertisement platform used correspondingly in a cache region; creating a loading class, and acquiring the advertisement platform name corresponding to the received advertisement position address from a buffer area; dynamically creating an advertisement platform class, calling an abstract class method, adding a method for acquiring an advertisement platform into the abstract class method, accessing the advertisement platform, acquiring advertisement data of the advertisement platform, and returning the advertisement data to a client through a uniform advertisement interface. The invention can access the advertisement data of a plurality of advertisement platforms through the uniform advertisement interface, has strong compatibility and simple program logic, and can maintain the uniform advertisement interface only, thereby having good maintainability.

Description

Access method of advertisement data, storage medium, electronic device and system
Technical Field
The invention relates to the field of advertisement data access, in particular to an advertisement data access method, a storage medium, electronic equipment and a system.
Background
With the development of internet communication, more and more advertisement platforms can issue advertisements through the internet and display advertisement information on advertisement positions of internet websites, so that the internet websites need to access advertisement data of the multiple advertisement platforms.
At present, a method for accessing advertisement data of a plurality of advertisement platforms to an internet website includes: a special advertisement interface is defined for each advertisement platform, and the internet website accesses the advertisement information of the corresponding advertisement platform from the special advertisement interface and displays the advertisement information on the advertisement position.
However, in the above process, the internet website needs to develop a set of interface access program for each advertisement interface, and as the number of advertisement platforms increases, the number of interfaces also increases, and the number of interface access programs also increases, so that the robustness and maintainability of the program code are poor.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide an advertisement data access method, a storage medium, electronic equipment and an advertisement data access system.
In order to achieve the purpose, the invention adopts the technical scheme that:
the invention provides an access method of advertisement data, which comprises the following steps:
s1: defining a uniform advertisement interface;
s2: creating an abstract class library, and defining an abstract class method in the abstract class;
s3: setting an advertisement platform used by at least one advertisement position, establishing a cache region, and storing an advertisement position address and a name of the advertisement platform used correspondingly in the cache region;
s4: creating a loading class, wherein the loading class receives the advertisement space address and acquires the advertisement platform name corresponding to the received advertisement space address from the buffer area;
s5: and dynamically creating a corresponding advertisement platform class according to the name of the advertisement platform, wherein the advertisement platform class inherits the abstract class library, calling the abstract class method, adding a method for acquiring the advertisement platform into the abstract class method, accessing the advertisement platform by using the method for acquiring the advertisement platform, acquiring the advertisement data of the advertisement platform, and returning the advertisement data to the client through the uniform advertisement interface.
Based on the above technical solution, in step S3, a plurality of advertisement slots are set to use different advertisement platforms, and each advertisement slot address and the name of the corresponding advertisement platform are stored in the cache region.
Based on the above technical solution, the formats of the advertisement data fields returned to the client by the unified advertisement interface in step S5 are the same.
On the basis of the above technical solution, the advertisement data field returned to the client in step S5 includes the address of the advertisement resource, the skipped advertisement page, and the displayed text.
The invention also provides a storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method of accessing advertisement data.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor realizes the steps of the access method of the advertisement data when executing the computer program.
The invention also provides an advertisement data access system, which comprises an interface definition module, an abstract class creation module, a display setting module, a platform loading module and a data access module;
the interface definition module is configured to: defining a uniform advertisement interface;
the abstract class creation module is to: creating an abstract class library, and defining an abstract class method in the abstract class;
the display setting module is used for: setting an advertisement platform used by at least one advertisement position, establishing a cache region, and storing an advertisement position address and a name of the advertisement platform used correspondingly in the cache region;
the platform loading module is used for: creating a loading class, wherein the loading class receives the advertisement space address and acquires the advertisement platform name corresponding to the received advertisement space address from the buffer area;
the data access module is used for: and dynamically creating a corresponding advertisement platform class according to the name of the advertisement platform, wherein the advertisement platform class inherits the abstract class library, calling the abstract class method, adding a method for acquiring the advertisement platform into the abstract class method, accessing the advertisement platform by using the method for acquiring the advertisement platform, acquiring the advertisement data of the advertisement platform, and returning the advertisement data to the client through the uniform advertisement interface.
On the basis of the technical scheme, the display setting module is used for setting a plurality of advertisement slots to use different advertisement platforms and storing each advertisement slot address and the name of the corresponding advertisement platform in the cache region.
On the basis of the technical scheme, the formats of the advertisement data fields returned to the client by the data access module are the same.
On the basis of the technical scheme, the advertisement data fields returned to the client by the data access module comprise the address of the advertisement resource, the skipped advertisement page and the displayed characters.
Compared with the prior art, the invention has the advantages that:
(1) the access method of the advertisement data of the invention can access the advertisement data of a plurality of advertisement platforms through the uniform advertisement interface, thereby enabling the advertisement position to access the advertisement data of different advertisement platforms, having good expansibility and universality, strong compatibility and simple program logic, and moreover, the front-end developer of the client only needs to process the uniform advertisement interface data, thereby having very convenient maintenance and good maintainability;
(2) the access method of the advertisement data of the invention can access the advertisement data of the new advertisement platform only by changing the name of the advertisement platform used by the advertisement position address in the cache region and automatically obtaining the new advertisement platform name from the cache region by the loading class and carrying out the operation of the step S5, thereby not only having simple mode of switching the advertisement platform and being convenient for operation, but also completing the switching in a short time and having high switching efficiency.
(3) The position of each advertisement position is different, which directly influences the exposure rate, audience degree and attention degree of the advertisement information, and the advertisement platform can select the corresponding advertisement position according to the self demand.
Drawings
FIG. 1 is a flowchart of an access method of advertisement data according to an embodiment of the present invention;
fig. 2 is a connection block diagram of an electronic device in an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Referring to fig. 1, an embodiment of the present invention provides an advertisement data access method, including the following steps:
s1: defining a uniform advertisement interface named GetAdInfo, and returning advertisement data to a client according to a uniform data field format by the advertisement interface, wherein the client is a browser or an APP;
s2: creating an abstract class library AdFactory, defining an abstract class method GetAD in the abstract class, adopting the abstract class technology of PHP, and when accessing an advertisement platform, only needing to inherit the AdFactory and internally realize the GetAD method;
s3: setting an advertisement platform used by at least one advertisement position, establishing a cache region by adopting a REDIS cache database technology, and storing an advertisement position address ID and a name of the advertisement platform used correspondingly in the cache region;
s4: creating a loading class AdLoader, receiving the advertisement slot address by the loading class, and acquiring the advertisement platform name corresponding to the received advertisement slot address from the buffer area;
s5: and dynamically creating a corresponding advertisement platform class according to the name of the advertisement platform, wherein the advertisement platform class inherits the abstract class library, calling the abstract class method, adding the method for acquiring the advertisement platform into the abstract class method, accessing the advertisement platform by using the method for acquiring the advertisement platform, acquiring the advertisement data of the advertisement platform, and returning the advertisement data to the client through a uniform advertisement interface.
Taking the arbibar as an example, when the arbibar needs to be accessed to the advertising platform, only a class of the arbabaad needs to be created, the class of the arbabaad inherits the AdFactory, then, according to an interface definition of the arbabar for outputting the advertising data, a method for obtaining the arbabar advertising platform is added to the abstract class method GetAD, the GetAD method is directly called, the arbabar advertising platform is accessed, and the advertising data is obtained.
On one hand, the method for accessing the advertisement data in the embodiment of the invention uses the uniform advertisement interface to access the data of a plurality of advertisement platforms in an abstract type mode, has good expansibility and universality, strong compatibility and simple program logic, and moreover, a front-end developer of a client only needs to process the uniform advertisement interface data, so that the method is very convenient to maintain and good in maintainability.
On the other hand, in the access method of the advertisement data in the embodiment of the present invention, the name of the advertisement platform used by the address of the advertisement slot only needs to be changed in the cache region, the loading class automatically obtains the name of the new advertisement platform from the cache region, and the operation of step S5 is performed to access the advertisement data of the new advertisement platform.
The fields of the advertisement data returned to the client by the unified advertisement interface in step S5 have the same format, and the fields of the advertisement data returned to the client include the address of the advertisement resource, the skipped advertisement page, and the displayed text.
In the embodiment of the invention, according to the actual requirement of the content released by the advertisement platform, the advertisement data field returned to the client can only comprise the address of the advertisement resource, the client user can view and copy the address on the advertisement position and open the address in the browser, namely the advertisement information released by the advertisement platform can be seen on the opened webpage; the advertisement data field returned to the client can only comprise a skipped advertisement page, a client user can click the advertisement page on an advertisement position, the client can automatically skip to the advertisement page, and advertisement information released by an advertisement platform can be seen on the advertisement page; the advertisement data field returned to the client can only comprise displayed characters, and the client user can directly see character advertisement information released by the advertisement platform on the advertisement position so as to achieve the purpose of releasing the advertisement by the advertisement platform.
The position of each advertisement position is different, which directly influences the exposure rate, audience degree and attention degree of the advertisement information, and the advertisement platform can select the corresponding advertisement position according to the self demand.
According to the practical situation, when a plurality of advertisement positions exist, the same advertisement platform can be used for the plurality of advertisement positions, different advertisement platforms can be used, and the address of each advertisement position and the name of the corresponding advertisement platform are stored in the cache region.
The embodiment of the invention also provides a storage medium, wherein a computer program is stored on the storage medium, and the computer program realizes the access method of the advertisement data when being executed by a processor. The storage medium includes various media capable of storing program codes, such as a usb disk, a removable hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a magnetic disk, or an optical disk.
Referring to fig. 2, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements the steps of the above advertisement data access method when executing the computer program.
The embodiment of the invention also provides an advertisement data access system which comprises an interface definition module, an abstract class creation module, a display setting module, a platform loading module and a data access module.
The interface definition module is used for: a uniform advertising interface is defined.
The abstract class creation module is to: creating an abstract class library, and defining an abstract class method in the abstract class.
The display setting module is used for: different advertisement platforms are used for setting a plurality of advertisement positions, and the address of each advertisement position and the name of the corresponding used advertisement platform are stored in a cache region.
The platform loading module is used for: and creating a loading class, receiving the advertisement position address by the loading class, and acquiring the advertisement platform name corresponding to the received advertisement position address from the buffer area.
The data access module is used for: and dynamically creating a corresponding advertisement platform class according to the name of the advertisement platform, wherein the advertisement platform class inherits the abstract class library, calling an abstract class method, adding a method for acquiring the advertisement platform into the abstract class method, accessing the advertisement platform by using the method for acquiring the advertisement platform, acquiring advertisement data of the advertisement platform, and returning the advertisement data to the client through a uniform advertisement interface.
The advertisement data fields returned to the client by the data access module have the same format, comprise the address of the advertisement resource, the skipped advertisement page and the displayed characters, and can select one or more advertisement data fields according to the advertisement information issued by the advertisement platform.
It should be noted that: in the system provided in the embodiment of the present invention, when performing inter-module communication, only the division of each functional module is illustrated, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the system is divided into different functional modules to complete all or part of the above described functions.
The present invention is not limited to the above-described embodiments, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements are also considered to be within the scope of the present invention. Those not described in detail in this specification are within the skill of the art.

Claims (10)

1. An access method of advertisement data is characterized by comprising the following steps:
s1: defining a uniform advertisement interface;
s2: creating an abstract class library, and defining an abstract class method in the abstract class;
s3: setting an advertisement platform used by at least one advertisement position, establishing a cache region, and storing an advertisement position address and a name of the advertisement platform used correspondingly in the cache region;
s4: creating a loading class, wherein the loading class receives the advertisement space address and acquires the advertisement platform name corresponding to the received advertisement space address from the buffer area;
s5: and dynamically creating a corresponding advertisement platform class according to the name of the advertisement platform, wherein the advertisement platform class inherits the abstract class library, calling the abstract class method, adding a method for acquiring the advertisement platform into the abstract class method, accessing the advertisement platform by using the method for acquiring the advertisement platform, acquiring the advertisement data of the advertisement platform, and returning the advertisement data to the client through the uniform advertisement interface.
2. The method for accessing advertisement data according to claim 1, wherein: in step S3, a plurality of advertisement slots are set to use different advertisement platforms, and the address of each advertisement slot and the name of the advertisement platform used correspondingly are stored in the cache area.
3. The method for accessing advertisement data according to claim 1, wherein: the fields of the advertisement data returned to the client by the unified advertisement interface in step S5 have the same format.
4. The method for accessing advertisement data according to claim 1, wherein: the advertisement data fields returned to the client in step S5 include the address of the advertisement resource, the skipped advertisement page, and the displayed text.
5. A storage medium having a computer program stored thereon, characterized in that: the computer program when executed by a processor implements the steps of the method of any of claims 1 to 4.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executed on the processor, wherein: the processor, when executing the computer program, realizes the steps of the method of any of the preceding claims 1 to 4.
7. An advertisement data access system, characterized by: the system comprises an interface definition module, an abstract class creation module, a display setting module, a platform loading module and a data access module;
the interface definition module is configured to: defining a uniform advertisement interface;
the abstract class creation module is to: creating an abstract class library, and defining an abstract class method in the abstract class;
the display setting module is used for: setting an advertisement platform used by at least one advertisement position, establishing a cache region, and storing an advertisement position address and a name of the advertisement platform used correspondingly in the cache region;
the platform loading module is used for: creating a loading class, wherein the loading class receives the advertisement space address and acquires the advertisement platform name corresponding to the received advertisement space address from the buffer area;
the data access module is used for: and dynamically creating a corresponding advertisement platform class according to the name of the advertisement platform, wherein the advertisement platform class inherits the abstract class library, calling the abstract class method, adding a method for acquiring the advertisement platform into the abstract class method, accessing the advertisement platform by using the method for acquiring the advertisement platform, acquiring the advertisement data of the advertisement platform, and returning the advertisement data to the client through the uniform advertisement interface.
8. The advertisement data access system of claim 7, wherein: the display setting module is used for setting a plurality of advertisement positions to use different advertisement platforms and storing the address of each advertisement position and the name of the corresponding advertisement platform in the cache region.
9. The advertisement data access system of claim 7, wherein: and the formats of the advertisement data fields returned to the client by the data access module are the same.
10. The advertisement data access system of claim 7, wherein: the advertisement data field returned to the client by the data access module comprises the address of the advertisement resource, the skipped advertisement page and the displayed characters.
CN201710515495.5A 2017-06-29 2017-06-29 Access method of advertisement data, storage medium, electronic device and system Active CN109240660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710515495.5A CN109240660B (en) 2017-06-29 2017-06-29 Access method of advertisement data, storage medium, electronic device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710515495.5A CN109240660B (en) 2017-06-29 2017-06-29 Access method of advertisement data, storage medium, electronic device and system

Publications (2)

Publication Number Publication Date
CN109240660A CN109240660A (en) 2019-01-18
CN109240660B true CN109240660B (en) 2022-06-17

Family

ID=65083160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710515495.5A Active CN109240660B (en) 2017-06-29 2017-06-29 Access method of advertisement data, storage medium, electronic device and system

Country Status (1)

Country Link
CN (1) CN109240660B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111031358B (en) * 2019-12-13 2022-07-12 北京奇艺世纪科技有限公司 Data playing method and device, electronic equipment and storage medium
CN113347469A (en) * 2021-06-01 2021-09-03 广州欢网科技有限责任公司 Television APP advertisement playing method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6144944A (en) * 1997-04-24 2000-11-07 Imgis, Inc. Computer system for efficiently selecting and providing information
CN102520967A (en) * 2011-12-28 2012-06-27 深圳市融创天下科技股份有限公司 Method, system and mobile terminal for creating and using mobile platform plug-in component
CN103051932A (en) * 2012-12-19 2013-04-17 深圳市九洲电器有限公司 Method and system for acquiring advertising information of interactive digital television

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6144944A (en) * 1997-04-24 2000-11-07 Imgis, Inc. Computer system for efficiently selecting and providing information
CN102520967A (en) * 2011-12-28 2012-06-27 深圳市融创天下科技股份有限公司 Method, system and mobile terminal for creating and using mobile platform plug-in component
CN103051932A (en) * 2012-12-19 2013-04-17 深圳市九洲电器有限公司 Method and system for acquiring advertising information of interactive digital television

Also Published As

Publication number Publication date
CN109240660A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN109542427B (en) System customization method and device, electronic equipment and storage medium
US9286273B1 (en) Method and system for implementing a website builder
KR20140078676A (en) Custom optimization of web pages
CN107656729B (en) List view updating apparatus, method and computer-readable storage medium
CN105488125A (en) Page access method and apparatus
CN103605502A (en) Form page display method and server
CN103530338A (en) Frame for carrying out page rendering on calculation equipment and page generation method
CN111767499A (en) Page configuration method and device
CN113703862A (en) Configuration-based interface calling method, device, equipment and storage medium
CN109240660B (en) Access method of advertisement data, storage medium, electronic device and system
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN111158777B (en) Component calling method, device and computer readable storage medium
CN111026945B (en) Multi-platform crawler scheduling method, device and storage medium
US20130318425A1 (en) Method for copying multiple content between applications
CN111325012A (en) word report generation method and system
US20150142576A1 (en) Methods and mobile devices for displaying an adaptive advertisement object and systems for generating the adaptive advertisement object
CN112104544B (en) Method and device for sending dynamic mail based on Freemarker
US9230022B1 (en) Customizable result sets for application program interfaces
CN109582411A (en) Graphical user interface creating method, device, computer equipment and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium
US9146720B1 (en) Binary file application processing
CN113608737A (en) Page generation method, device, equipment and medium
CN112148450A (en) Data processing method, device, equipment and storage medium
US10685392B1 (en) System and method for visualization of subscription items in an item universe
CN112068814A (en) Method, device, system and medium for generating executable file

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
TR01 Transfer of patent right

Effective date of registration: 20230811

Address after: 102600 D033, 1st floor, building 2, No.18 Keyuan Road, economic development zone, Daxing District, Beijing

Patentee after: Two bit (Beijing) Technology Co.,Ltd.

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right