CN115529472B - Playing area limiting method and device, electronic equipment and storage medium - Google Patents

Playing area limiting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115529472B
CN115529472B CN202211496781.9A CN202211496781A CN115529472B CN 115529472 B CN115529472 B CN 115529472B CN 202211496781 A CN202211496781 A CN 202211496781A CN 115529472 B CN115529472 B CN 115529472B
Authority
CN
China
Prior art keywords
address
video playing
terminal
area
segments
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
CN202211496781.9A
Other languages
Chinese (zh)
Other versions
CN115529472A (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.)
Guangzhou Qianjun Network Technology Co ltd
Original Assignee
Guangzhou Qianjun 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 Guangzhou Qianjun Network Technology Co ltd filed Critical Guangzhou Qianjun Network Technology Co ltd
Priority to CN202211496781.9A priority Critical patent/CN115529472B/en
Publication of CN115529472A publication Critical patent/CN115529472A/en
Application granted granted Critical
Publication of CN115529472B publication Critical patent/CN115529472B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • H04N21/2541Rights Management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25808Management of client data
    • H04N21/25816Management of client data involving client authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25808Management of client data
    • H04N21/25841Management of client data involving the geographical location of the client

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Graphics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a playing area limiting method, a playing area limiting device, electronic equipment and a storage medium, which can store the latest IP information segments acquired from an IP information server in a video playing application at intervals of preset time, wherein each latest IP information segment at least comprises the following steps: IP address number section and area code for representing the area of IP address number section. And then responding to a video playing request of a user in the video playing application, and acquiring a terminal IP address of a user terminal where the video playing application is located. And determining a target area code corresponding to the IP address of the terminal based on the IP address number segment and the IP address of the terminal. And then judging whether the target area represented by the target area code is within the area range of the video playing service corresponding to the video playing request. And sending display data corresponding to the judgment result to the video playing application based on the judgment result. The dependence on the IP information service is effectively reduced, and the time consumption of playing interface response is also reduced.

Description

Playing area limiting method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of mobile live broadcast, in particular to a playing area limiting method and device, electronic equipment and a storage medium.
Background
The mobile live broadcast is a live broadcast mode that a main broadcast uses mobile equipment to push audio and video data, and audiences use playing equipment to watch received audio and video contents. Due to the copyright limitation of the playing area of the live content, etc., the playing area where the audience is located needs to be limited. Therefore, when the audience uses the terminal device to play the live broadcast address, the live broadcast server needs to judge the access source of the audience, and the audience which is not in the broadcast area range does not allow the live broadcast content to be played. The existing limiting method needs to acquire the IP address in the server from the playing service request IP information service interface for comparison when the playing area is judged each time, if the IP information service is abnormal, the playing service is seriously influenced, and the time consumption of acquiring the IP address through the network request interface is high because the IP address is acquired through the interface analysis mode.
Disclosure of Invention
In order to solve the problems of influence on the playing service and high time consumption in the prior art, the invention provides a playing area limiting method, a playing area limiting device, electronic equipment and a storage medium, and the method, the device, the electronic equipment and the storage medium have the characteristics of effectively reducing the dependence on the IP information service, reducing the time consumption of playing interface response and the like.
According to a specific embodiment of the present invention, a method for limiting a play area includes:
storing latest IP information segments acquired from an IP information server in a video playing application at preset time intervals, wherein each latest IP information segment at least comprises: the IP address number section and the area code representing the area where the IP address number section is located;
responding to a video playing request of a user in the video playing application, and acquiring a terminal IP address of a user terminal where the video playing application is located;
determining a target area code corresponding to the terminal IP address based on the IP address number section and the terminal IP address;
judging whether the target area represented by the target area code is within the area range of the video playing service corresponding to the video playing request;
and sending display data corresponding to the judgment result to the video playing application based on the judgment result.
Further, the sending, to the video playing application, display data corresponding to the determination result based on the determination result includes:
if the target area is within the area range of the video playing service, transmitting audio and video data corresponding to the video playing request to the video playing application;
and if the target area is not in the area range of the video playing service, sending an error code corresponding to the video playing request to the video playing application.
Further, the IP address number segment includes: the starting point IP address and the end point IP address, the latest IP information segment obtained from the IP information server is stored in the video playing application at preset time intervals, and the method comprises the following steps:
storing the starting IP address, the destination IP address and the corresponding region code of each IP address number segment as three fields in the same row of an IP address list;
and taking the front preset number segments of each IP address in the IP address list as dictionary keys, and taking the rest segments as dictionary values to be stored in the video playing application.
Further, the storing the first preset number of segments of each IP address in the IP address list as keys of a dictionary, and the remaining segments as values of the dictionary in the video playing application includes:
and taking the first two segments of each IP address in the IP address list as dictionary keys, and taking the second two segments as dictionary values to be stored in the video playing application.
Further, the determining a target area code corresponding to the terminal IP address based on the IP address number segment and the terminal IP address includes:
taking the first two segments of the terminal IP address as a lookup key, and acquiring all target value groups corresponding to the lookup key from the dictionary, wherein each target value group comprises a start IP address value and an end IP address value in the same IP address number segment;
taking the last two segments of the terminal IP address as search values, and determining a target value group where the search values are located from all the target value groups;
and taking the area code of the IP address number segment corresponding to the target value set in which the search value is positioned as the target area code.
Further, the determining, with the last two segments of the terminal IP address as lookup values, a target value group in which the lookup values are located from all the target value groups includes:
and comparing the numerical values of the last two segments of the terminal IP address with the numerical value of the corresponding position in each target value group respectively to determine the target value group in which the search value is located.
Further, the determining whether the target area represented by the target area code is within the area range of the video playing service corresponding to the video playing request includes:
determining whether the target region code is within a playable region code set of the video playback service.
According to an embodiment of the present invention, a play area limiting device includes:
an address updating module, configured to store, in a video playing application, latest IP information segments obtained from an IP information server at preset time intervals, where each of the latest IP information segments at least includes: the IP address number segment and the area code representing the area where the IP address number segment is located;
the address acquisition module is used for responding to a video playing request of a user in the video playing application and acquiring a terminal IP address of a user terminal where the video playing application is located;
a region code determining module, configured to determine, based on the IP address number segment and the terminal IP address, a target region code corresponding to the terminal IP address;
the playing determining module is used for judging whether the target area represented by the target area code is within the area range of the video playing service corresponding to the video playing request; and
and the data display module is used for sending display data corresponding to the judgment result to the video playing application based on the judgment result.
According to a specific embodiment of the present invention, there is provided an electronic device including: a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the playing area limiting method.
According to a specific embodiment of the present invention, a storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the play area limiting method as described above.
The playing area limiting method, the playing area limiting device, the electronic equipment and the storage medium provided by the invention can store the latest IP information segment acquired from the IP information server in the video playing application at preset time intervals, wherein each latest IP information segment at least comprises the following steps: IP address number section and area code for representing the area of IP address number section. And then responding to a video playing request of a user in the video playing application, and acquiring a terminal IP address of a user terminal where the video playing application is located. And determining a target area code corresponding to the IP address of the terminal based on the IP address number segment and the IP address of the terminal. And then judging whether the target area represented by the target area code is within the area range of the video playing service corresponding to the video playing request. And sending display data corresponding to the judgment result to the video playing application based on the judgment result. The playing area limiting method, the playing area limiting device, the electronic equipment and the storage medium realize the limitation of the live playing area by regularly pulling the IP information base and analyzing the geographic information corresponding to the IP of the audience terminal in the application, effectively reduce the dependence on IP information service and simultaneously reduce the time consumed by the response of the playing interface.
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 embodiments or the prior art descriptions 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 flow diagram of a play area limiting method provided in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram providing for the storage of IP addresses in accordance with an illustrative embodiment;
FIG. 3 is a flow diagram of a lookup of a region code provided in accordance with an exemplary embodiment;
FIG. 4 is a block diagram of a playback area limiting device provided in accordance with an exemplary embodiment;
FIG. 5 is a block diagram of an electronic device provided in accordance with an exemplary embodiment;
fig. 6 is a block diagram of a list of IP addresses provided in accordance with an exemplary embodiment.
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.
Referring to fig. 1, an embodiment of the present invention provides a play area limiting method, which may include the following steps:
101. storing the latest IP information segments acquired from the IP information server in the video playing application at preset time intervals, wherein each latest IP information segment at least comprises: IP address number section and area code for representing the area of IP address number section.
When the video playing application in the user terminal is started, the IP information base can be pulled from the IP information server at preset time intervals, such as 30 minutes, 1 hour, and the like, and the content of the IP information segment in the IP information base is stored in the video playing application. The IP information segment in the IP information base can be stored according to the IP address number segment and can be divided into 3 fields: a start IP address, an end IP address, and a region code. For example, data of 36.110.204.0, 36.110.204.31 and 3901 correspond to 32 IP addresses of which the IP addresses range from 36.110.204.0 to 36.110.204.31, the corresponding region code is 3901, and the region represented by the region code is Ningxia.
102. And responding to a video playing request of a user in the video playing application, and acquiring a terminal IP address of a user terminal where the video playing application is located.
When the fact that a user wants to open a video link in a video playing application or play audio and video needing playing area limitation is identified, a terminal IP address of a user terminal installed in the video playing application, such as a smart phone, a tablet, a computer and the like, is determined by obtaining a video playing request sent by the application.
103. And determining a target area code corresponding to the IP address of the terminal based on the IP address number segment and the IP address of the terminal.
According to the IP address of the terminal, a target area code corresponding to the IP address of the terminal, namely the area code of the equipment used by the user can be determined in an IP information base in the video playing application.
104. And judging whether the target area represented by the target area code is within the area range of the video playing service corresponding to the video playing request.
The target region code is determined to be within the set of playable region codes based on the extent of the region defined by the video playback service, such as the set of playable region codes. And further determines whether the user terminal needs to be restricted
105. And sending display data corresponding to the judgment result to the video playing application based on the judgment result.
For example, when the target area is within the area range of the video playing service, the audio/video data corresponding to the video playing request is sent to the video playing application, so that the video content and the playing sound can be displayed in the video playing application.
And when the target area is not in the area range of the video playing service, sending an error code corresponding to the video playing request to the video playing application. Such as "play right is not acquired, play is prohibited" and so on. The playing area limiting method does not need to determine the area code by requesting the IP information service interface every time, can effectively reduce the dependence on the IP information service and reduce the time consumption of playing interface response.
It is understood that the duration of the preset time interval can be adjusted by those skilled in the art according to the practical application, and the invention is not limited thereto.
As a possible implementation manner of the foregoing embodiment, referring to fig. 2, the step of periodically storing the latest IP information segment obtained from the IP information server in the video playing application may include the following steps:
201. the start IP address, the end IP address, and the corresponding area code of each IP address number segment are stored as three fields in the same row of the IP address list.
202. And taking the front preset number segments of each IP address in the IP address list as the keys of the dictionary, and taking the rest segments as the values of the dictionary to be stored in the video playing application.
Specifically, the IP information segment is the minimum unit in the information data service of the geographic location corresponding to the IP address, and the specific format thereof can be shown in fig. 6:
the specific regions represented are as follows:
the region represented by the sections 1.0.0 to 1.0.0.255 is the United states;
the area represented by the sections 1.0.1.0 to 1.0.3.255 is the province of Fujian province in China;
the regions denoted by paragraphs 128.127.32.0 to 128.127.47.255 are the Netherlands;
the sections 255.255.255.0 to 255.255.255.255 also indicate the United states.
And caching the first two segments of the 4 segments of the IP address in the table as the keys of the dictionary and the lists of all data of the last two segments as values in the application according to the dictionary data structure.
Referring to fig. 3, determining a target area code corresponding to a terminal IP address based on an IP address number segment and the terminal IP address may include the steps of:
301. and taking the first two segments of the terminal IP address as a lookup key, and acquiring all target value groups corresponding to the lookup key from the dictionary, wherein each target value group comprises a value of a starting IP address and a value of an ending IP address in the same IP address number segment.
If the IP address of the terminal is 1.0.0.27, taking 1.0 as a lookup key, all the target value groups corresponding to the lookup key are obtained from the dictionary, for example, the target value group is obtained as the value in the following two groups:
values of 1.0.0 to 1.0.0.255 are 0.0 and 0.255, and values of 1.0.1.0 to 1.0.3.255 are 1.0 and 3.255.
302. And taking the last two segments of the terminal IP address as search values, and determining a target value set in which the search values are located from all the target value sets.
The values of the last two segments of the terminal IP address can be compared with the value of the corresponding position in each target value group respectively to determine the target value group in which the search value is located, for example:
0.27 is compared as a lookup value with (0.0 and 0.255) and (1.0 and 3.255), respectively, to determine within which range 0.27 is, it can be seen that 0.27 is within (0.0 and 0.255).
303. And taking the area code of the IP address number section corresponding to the target value group where the search value is located as the target area code.
The corresponding IP address number of (0.0 and 0.255) may be divided into: the area code 50 corresponding to 1.0.0 to 1.0.0.255 is used as the target area code.
Based on the same design concept, the embodiment of the present invention shown in fig. 4 further provides a playing area limiting apparatus, which can implement the steps of the playing area limiting method when the apparatus is running, and the apparatus may include:
an address updating module 401, configured to store, in the video playing application, latest IP information segments obtained from the IP information server at preset time intervals, where each latest IP information segment at least includes: IP address number section and area code for representing the area of IP address number section.
The address obtaining module 402 is configured to, in response to a video playing request of a user in a video playing application, obtain a terminal IP address of a user terminal where the video playing application is located.
A region code determining module 403, configured to determine a target region code corresponding to the terminal IP address based on the IP address number segment and the terminal IP address.
The playing determining module 404 is configured to determine whether the target area represented by the target area code is within an area range of the video playing service corresponding to the video playing request. And
and a data display module 405, configured to send, to the video playing application, display data corresponding to the determination result based on the determination result.
Further, the data presentation module 405 includes:
and the first display submodule is used for sending audio and video data corresponding to the video playing request to the video playing application if the target area is within the area range of the video playing service. And
and the second display submodule is used for sending an error code corresponding to the video playing request to the video playing application if the target area is not in the area range of the video playing service.
Further, the address update module 401 includes:
and the table storage submodule is used for storing the starting IP address, the destination IP address and the corresponding area code of each IP address number segment as three fields in the same row of the IP address list. And
and the dictionary storage submodule is used for taking the front preset number segments of each IP address in the IP address list as the keys of the dictionary, and taking the rest segments as the values of the dictionary to be stored in the video playing application.
The dictionary storage submodule is specifically used for taking the first two segments of each IP address in the IP address list as the keys of the dictionary, and taking the second two segments as the values of the dictionary to be stored in the video playing application.
Further, the area code determining module 403 includes:
and the first searching submodule is used for taking the first two sections of the terminal IP address as searching keys and acquiring all target value groups corresponding to the searching keys from the dictionary, wherein each target value group comprises a value of a starting IP address and a value of a terminal IP address in the same IP address number section.
And the second searching submodule is used for determining the target value set where the searching value is located from all the target value sets by taking the last two sections of the terminal IP address as the searching values. And
and the area code determining submodule is used for taking the area code of the IP address number section corresponding to the target value set of the search value as the target area code.
The second lookup submodule is further specifically configured to compare the values of the last two segments of the terminal IP address with the values corresponding to two values in each target value group, so as to determine the target value group in which the lookup value is located.
Further, the play determination module 404 is specifically configured to determine whether the target area code is in a playable area code set of the video playing service.
The playing area limiting device has the same beneficial effects as the playing area limiting method, and the specific implementation manner of the playing area limiting device can refer to the embodiment of the playing area limiting method, which is not described herein again.
As shown in fig. 5, an embodiment of the present invention further provides an electronic device, which may include: a memory 501 and a processor 502.
A memory 501 for storing programs.
A processor 502, configured to execute the program, and implement the steps of the playing area limiting method as described in the above embodiments.
Embodiments of the present invention also provide a storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the play area limiting method as described in the above embodiments.
According to the playing area limiting method and device, the electronic equipment and the storage medium, the live playing area is limited in a mode of analyzing the geographic information corresponding to the IP of the audience in the application by regularly pulling the IP information base, dependence on IP information service is effectively reduced, and meanwhile time consumed by playing interface response is reduced.
While, for purposes of simplicity of explanation, the methodologies are shown and described as a series of acts, it will be appreciated by those skilled in the art that the claimed subject matter is not limited by the order of acts, as some steps may, in accordance with the claimed subject matter, occur in other orders and/or concurrently. 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.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The steps in the method of each embodiment of the present invention may be sequentially adjusted, combined, and deleted according to actual needs, and the technical features described in each embodiment may be replaced or combined.
The modules and sub-modules in the device and the terminal of the embodiments of the present invention can be combined, divided and deleted according to actual needs.
In the embodiments provided in the present invention, it should be understood that the disclosed terminal, apparatus and method may be implemented in other ways. For example, the above-described terminal embodiments are merely illustrative, and for example, the division of a module or a sub-module is only one logical function division, and other division manners may be available in actual implementation, for example, a plurality of sub-modules or modules may be combined or integrated into another module, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules or sub-modules described as separate components may or may not be physically separate, and the components described as modules or sub-modules may or may not be physical modules or sub-modules, may be located in one place, or may be distributed on a plurality of network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, each functional module or sub-module in each embodiment of the present invention may be integrated into one processing module, or each module or sub-module may exist alone physically, or two or more modules or sub-modules may be integrated into one module. The integrated modules or sub-modules may be implemented in the form of hardware, or may be implemented in the form of software functional modules or sub-modules.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software unit executed by a processor, or in a combination of the two. The software cells may be located 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 (9)

1. A play area limiting method, comprising:
storing latest IP information segments acquired from an IP information server in a video playing application at preset time intervals, wherein each latest IP information segment at least comprises: the IP address number section and the area code representing the area where the IP address number section is located;
responding to a video playing request of a user in the video playing application, and acquiring a terminal IP address of a user terminal where the video playing application is located;
determining a target area code corresponding to the terminal IP address based on the IP address number section and the terminal IP address;
judging whether the target area represented by the target area code is within the area range of the video playing service corresponding to the video playing request;
sending display data corresponding to the judgment result to the video playing application based on the judgment result;
the IP address number section comprises: the method comprises the following steps that a start point IP address and an end point IP address are stored in a video playing application at preset time intervals, and the method comprises the following steps:
storing the starting IP address, the ending IP address and the corresponding area code of each IP address number segment as three fields in the same row of an IP address list;
and taking the front preset number of segments of each IP address in the IP address list as dictionary keys, and taking the rest segments as dictionary values to be stored in the video playing application.
2. The method according to claim 1, wherein the sending presentation data corresponding to the determination result to the video playback application based on the determination result comprises:
if the target area is within the area range of the video playing service, transmitting audio and video data corresponding to the video playing request to the video playing application;
and if the target area is not in the area range of the video playing service, sending an error code corresponding to the video playing request to the video playing application.
3. The method according to claim 1, wherein the storing the first segment of the preset number of IP addresses in the IP address list as a key of a dictionary, and the remaining segments as values of the dictionary in the video playing application comprises:
and taking the first two segments of each IP address in the IP address list as dictionary keys, and taking the second two segments as dictionary values to be stored in the video playing application.
4. The method of claim 3, wherein the determining a target area code corresponding to the terminal IP address based on the IP address number segment and the terminal IP address comprises:
taking the first two segments of the terminal IP address as a lookup key, and acquiring all target value groups corresponding to the lookup key from the dictionary, wherein each target value group comprises a start IP address value and an end IP address value in the same IP address number segment;
taking the last two segments of the terminal IP address as search values, and determining a target value set where the search values are located from all the target value sets;
and taking the area code of the IP address number segment corresponding to the target value set in which the search value is positioned as the target area code.
5. The method of claim 4, wherein determining the set of target values from all the sets of target values, using the last two segments of the terminal IP address as lookup values, comprises:
and comparing the numerical values of the last two segments of the terminal IP address with the numerical value of the corresponding position in each target value group respectively to determine the target value group in which the search value is located.
6. The method according to any one of claims 1 to 5, wherein the determining whether the target area represented by the target area code is within a geographic area of a video playing service corresponding to the video playing request comprises:
determining whether the target region code is within a playable region code set of the video playback service.
7. A playback-area restricting apparatus, comprising:
an address updating module, configured to store, in a video playing application, latest IP information segments obtained from an IP information server at preset time intervals, where each of the latest IP information segments at least includes: the IP address number section and the area code representing the area where the IP address number section is located;
the address acquisition module is used for responding to a video playing request of a user in the video playing application and acquiring a terminal IP address of a user terminal where the video playing application is located;
a region code determining module, configured to determine, based on the IP address number segment and the terminal IP address, a target region code corresponding to the terminal IP address;
the playing determining module is used for judging whether the target area represented by the target area code is within the area range of the video playing service corresponding to the video playing request; and
the data display module is used for sending display data corresponding to the judgment result to the video playing application based on the judgment result;
the IP address number section comprises: the starting point IP address and the end point IP address, the latest IP information segment obtained from the IP information server is stored in the video playing application at preset time intervals, and the method comprises the following steps:
storing the starting IP address, the destination IP address and the corresponding region code of each IP address number segment as three fields in the same row of an IP address list;
and taking the front preset number of segments of each IP address in the IP address list as dictionary keys, and taking the rest segments as dictionary values to be stored in the video playing application.
8. An electronic device, comprising: a memory and a processor;
the memory is used for storing programs;
the processor, configured to execute the program, and implement the steps of the play-out region limiting method according to any one of claims 1 to 6.
9. A storage medium having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the play area limiting method as claimed in any one of claims 1 to 6.
CN202211496781.9A 2022-11-28 2022-11-28 Playing area limiting method and device, electronic equipment and storage medium Active CN115529472B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211496781.9A CN115529472B (en) 2022-11-28 2022-11-28 Playing area limiting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211496781.9A CN115529472B (en) 2022-11-28 2022-11-28 Playing area limiting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115529472A CN115529472A (en) 2022-12-27
CN115529472B true CN115529472B (en) 2023-03-31

Family

ID=84705280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211496781.9A Active CN115529472B (en) 2022-11-28 2022-11-28 Playing area limiting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115529472B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2877881A1 (en) * 2012-03-23 2013-09-26 This Technology, Llc Method for delivering fair advertising inventory splits given position preferences

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8832726B2 (en) * 2010-11-17 2014-09-09 Verizon Patent And Licensing Inc. Video streaming entitlement determined based on the location of the viewer
CN102316372B (en) * 2011-09-29 2013-07-10 深圳市九洲电器有限公司 Television program playing control method, set-top box and server
WO2014010102A1 (en) * 2012-07-13 2014-01-16 Telefonaktiebolaget L M Ericsson (Publ) Technique for distributing a message to mobile terminals that are located in a destination area
US9882945B2 (en) * 2013-03-14 2018-01-30 Synacor, Inc. Media sharing communications system
CN103605772A (en) * 2013-11-27 2014-02-26 乐视网信息技术(北京)股份有限公司 Multimedia file playing control method and player
CN105049893B (en) * 2015-07-08 2018-06-19 无锡天脉聚源传媒科技有限公司 A kind of video broadcasting method and device
CN105430431B (en) * 2015-11-06 2018-11-13 华为技术有限公司 multimedia data playing method and device
CN106028064A (en) * 2016-06-24 2016-10-12 武汉斗鱼网络科技有限公司 Live broadcasting video streaming playing address authorization verification method and system
US10496993B1 (en) * 2017-02-15 2019-12-03 Square, Inc. DNS-based device geolocation
JP6929181B2 (en) * 2017-09-27 2021-09-01 キヤノン株式会社 Devices and their control methods and programs
CN110769307A (en) * 2018-07-27 2020-02-07 比亚迪股份有限公司 Playing control method and device and playing controller
EP3672260A1 (en) * 2018-12-21 2020-06-24 Nagravision SA Device location determination
CN111225228B (en) * 2020-01-15 2022-04-12 深圳拙河科技有限公司 Video live broadcast method, device, equipment and medium
CN112800470A (en) * 2021-02-20 2021-05-14 和芯星通科技(北京)有限公司 Management method and system of differential data, server and client
CN114245182B (en) * 2021-12-16 2023-11-21 上海哔哩哔哩科技有限公司 Live video stream acquisition method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2877881A1 (en) * 2012-03-23 2013-09-26 This Technology, Llc Method for delivering fair advertising inventory splits given position preferences

Also Published As

Publication number Publication date
CN115529472A (en) 2022-12-27

Similar Documents

Publication Publication Date Title
US20220171803A1 (en) Inserting information into playing content
CN107967357B (en) Friend pushing method and system and terminal equipment
US8595330B2 (en) Method, system and apparatus for uploading and downloading a caption file
US9680891B2 (en) System, method and network device for streaming data from a network
CN103888837A (en) Video information pushing method and device
CN113055451B (en) Resource downloading method and device, electronic equipment and storage medium
KR100805308B1 (en) Method for contents recommendation service in mobile communication terminal and mobile communication terminal therefor
CN106713985B (en) Method and device for recommending network video
CN101743746A (en) Method for displaying internet television information of broadcasting receiver and broadcasting receiver enabling the method
KR20080034038A (en) Method, system and receiving terminal for broadcasting contents in digital broadcast
KR100666941B1 (en) Method for Managing duplicated downloading the Identical Contents
CN113490039B (en) Screen-throwing joint broadcasting method, device, system, electronic equipment and storage medium
US20080195857A1 (en) Techniques For Automatic Registration Of Appliances
US20160198232A1 (en) Method and Apparatus for Setting Language Type
CN115529472B (en) Playing area limiting method and device, electronic equipment and storage medium
CN105760436B (en) The processing method and processing device of audio data
CN110582024A (en) method and device for playing video
CN108989426B (en) HLS protocol-based stream pulling method, system, client and storage medium
CN102143123B (en) Method for simultaneously realizing downloading and playing, client, server and system
CN101155280A (en) Device, method, and computer program product for structuring digital-content program
CN105578297A (en) Audio and radio file fragment type repeat play method and system at WEB end
CN115243066A (en) Information pushing method and device, electronic equipment and computer readable medium
CN112672191A (en) Double-list advertisement playing method and device, computer equipment and storage medium
CN110881132B (en) Method and related device for checking distance between live broadcast rooms
US20080256176A1 (en) Internet radio system and the broadcasting method thereof

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