CN111339158B - Method and device for processing information, electronic equipment and storage medium - Google Patents

Method and device for processing information, electronic equipment and storage medium Download PDF

Info

Publication number
CN111339158B
CN111339158B CN202010106268.9A CN202010106268A CN111339158B CN 111339158 B CN111339158 B CN 111339158B CN 202010106268 A CN202010106268 A CN 202010106268A CN 111339158 B CN111339158 B CN 111339158B
Authority
CN
China
Prior art keywords
writing
information
identifier
time period
frequency control
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
CN202010106268.9A
Other languages
Chinese (zh)
Other versions
CN111339158A (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010106268.9A priority Critical patent/CN111339158B/en
Publication of CN111339158A publication Critical patent/CN111339158A/en
Application granted granted Critical
Publication of CN111339158B publication Critical patent/CN111339158B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2477Temporal data queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • 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/21Server components or server architectures
    • H04N21/226Characteristics of the server or Internal components of the server
    • H04N21/2265Server identification by a unique number or address, e.g. serial number
    • 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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23109Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion by placing content in organized collections, e.g. EPG data repository
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4332Content storage operation, e.g. storage operation in response to a pause request, caching operations by placing content in organized collections, e.g. local EPG data repository
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Measuring Fluid Pressure (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure provides a method, a device, an electronic device and a storage medium for information processing, wherein the method comprises the following steps: when receiving writing information, acquiring writing position information corresponding to the writing information; judging whether the number of the written information corresponding to the written position information reaches a set threshold value or not in a preset time period corresponding to the current time; if the set threshold is reached, recording the corresponding frequency control state identifier of the writing position information in the preset time period as a first identifier; the first identifier is used for indicating that updating of the writing quantity of the writing information is stopped. Embodiments of the present disclosure relieve the pressure of accumulating counts.

Description

Method and device for processing information, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of internet live broadcasting, and in particular relates to a method, a device, electronic equipment and a storage medium for information processing.
Background
With the continuous development of internet technology, live broadcast technology is operated, a live broadcast platform provides a plurality of live broadcast rooms, and users can watch live video streams sent by a host broadcast in the current live broadcast room after entering the live broadcast room.
In a live broadcasting room, the interaction form of users and a host is mainly comment information, when the users speak intensively, a large amount of concurrent information enters a database corresponding to the live broadcasting room, so that the performance of the database is affected, the problems of unsmooth live broadcasting pictures in the live broadcasting room, slow information display and the like are caused, and the flash back of a live broadcasting application program is also caused when the problems are serious, so that the user experience is seriously affected.
Based on the above, the information quantity in the live broadcasting room is controlled frequently, namely, the information quantity written in a unit time is controlled, when the information quantity reaches a threshold value, the information is prohibited from being rewritten, in the process, the information quantity to be written needs to be accumulated with a base number, whether the information is prohibited from being written is confirmed by judging whether the value of the accumulated count is larger than the threshold value, and the memory needs to store the value of the accumulated count.
Disclosure of Invention
Embodiments of the present disclosure provide at least one method for information processing to relieve the stress of accumulated counts.
In a first aspect, an embodiment of the present disclosure provides a method for performing information processing, the method including:
when receiving writing information, acquiring writing position information corresponding to the writing information;
judging whether the number of the written information corresponding to the written position information reaches a set threshold value or not in a preset time period corresponding to the current time;
if the set threshold is reached, recording the corresponding frequency control state identifier of the writing position information in the preset time period as a first identifier; the first identifier is used for indicating that updating of the writing quantity of the writing information is stopped.
In one possible implementation manner, after the writing position information corresponding to the writing information is acquired, the method further includes:
acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is the first identifier, stopping updating the writing quantity of the writing information.
In a possible implementation manner, after obtaining the frequency control state identifier of the writing position information in a preset time period corresponding to the current time, the method further includes:
and if the frequency control state identifier is a second identifier for indicating to update the writing quantity of the writing information, updating the writing quantity of the writing information.
In one possible implementation manner, the writing location information includes live room information, and the determining whether the number of writing information corresponding to the writing location information reaches a set threshold value in a preset period corresponding to the current time includes:
and judging whether the number of the written information corresponding to the live broadcasting room information reaches a set threshold value or not in a preset time period corresponding to the current time.
In one possible embodiment, the method further comprises:
and deleting the frequency control state identifiers except for the preset time period corresponding to the current time according to the set time period.
In a second aspect, an embodiment of the present disclosure provides a method for performing information processing, the method including:
when receiving writing information, acquiring writing position information corresponding to the writing information;
acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is a first identifier for indicating to stop updating the writing quantity of the writing information, stopping updating the writing quantity of the writing information.
In a third aspect, an embodiment of the present disclosure provides an apparatus for performing information processing, the apparatus including:
the information acquisition module is used for acquiring writing position information corresponding to the writing information when the writing information is received;
the threshold judging module is used for judging whether the number of the written information corresponding to the written position information reaches a set threshold value or not in a preset time period corresponding to the current time;
the state recording module is used for recording the frequency control state identifier corresponding to the writing position information in the preset time period as a first identifier if the writing position information reaches the set threshold value; the first identifier is used for indicating that updating of the writing quantity of the writing information is stopped.
In a possible implementation manner, the device further includes a control module, where after the obtaining module obtains the writing location information corresponding to the writing information, the control module is configured to:
acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is the first identifier, stopping updating the writing quantity of the writing information.
In one possible implementation manner, after obtaining the frequency control state identifier of the writing position information in the preset time period corresponding to the current time, the control module is further configured to:
and if the frequency control state identifier is a second identifier for indicating to update the writing quantity of the writing information, updating the writing quantity of the writing information.
In one possible implementation manner, the writing location information includes live room information, and the threshold value judging module, when used for judging whether the number of writing information corresponding to the writing location information reaches a set threshold value in a preset time period corresponding to the current time, includes:
and judging whether the number of the written information corresponding to the live broadcasting room information reaches a set threshold value or not in a preset time period corresponding to the current time.
In one possible implementation manner, the apparatus further includes a state deletion module, where the state deletion module is configured to:
and deleting the frequency control state identifiers except for the preset time period corresponding to the current time according to the set time period.
In a fourth aspect, an embodiment of the present disclosure provides an apparatus for performing information processing, the apparatus including:
the information acquisition module is used for acquiring writing position information corresponding to the writing information when the writing information is received;
the state acquisition module is used for acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and the control module is used for stopping updating the writing quantity of the writing information if the frequency control state identifier is a first identifier for indicating to stop updating the writing quantity of the writing information.
In a fifth aspect, embodiments of the present disclosure provide an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the method according to the first or second aspect.
In a sixth aspect, embodiments of the present disclosure provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the first or second aspect.
According to the information processing method provided by the embodiment of the disclosure, when new writing information is received, writing position information corresponding to the writing information is obtained, then whether the number of the writing information corresponding to the writing position information reaches a set threshold value or not is judged in a preset time period corresponding to the current time, after the fact that the number of the writing information reaches the set threshold value is confirmed, a frequency control state identifier corresponding to the writing position information in the preset time period is recorded as a first identifier for indicating to stop updating the writing number of the writing information, when the writing information is received again, the fact that the writing number of the writing information is stopped to be updated can be judged based on the first identifier, the process of accumulated counting can be saved, and therefore the memory does not need to continuously update the stored value of accumulated counting and does not need to access the memory to obtain the value of accumulated counting, and performance pressure caused to the memory is reduced.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the embodiments are briefly described below, which are incorporated in and constitute a part of the specification, these drawings showing embodiments consistent with the present disclosure and together with the description serve to illustrate the technical solutions of the present disclosure. It is to be understood that the following drawings illustrate only certain embodiments of the present disclosure and are therefore not to be considered limiting of its scope, for the person of ordinary skill in the art may admit to other equally relevant drawings without inventive effort.
FIG. 1 shows a flow chart of a method for information processing provided by an embodiment of the present disclosure;
FIG. 2 illustrates another method flow diagram for information processing provided by embodiments of the present disclosure;
fig. 3 is a schematic diagram of an apparatus for performing information processing according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of another apparatus for performing information processing according to an embodiment of the present disclosure;
fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the disclosure;
fig. 6 shows a schematic structural diagram of another electronic device provided in an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. The components of the embodiments of the present disclosure, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
In some application scenarios, such as a live broadcast scenario, a large amount of information may be received concurrently in a very short period of time for the same live broadcast room, if a large amount of concurrent information enters a database of a client where the live broadcast room is located, the performance of the database is affected, resulting in poor live broadcast effect, so that in general, the amount of information in the live broadcast room is controlled by taking frequency control into consideration, that is, the amount of information written in a unit duration is controlled, and the written amount may be stored and updated by a memory, so that whether to allow message writing is determined based on the amount of information counted in the unit duration by the memory.
Based on the above-mentioned study, the present disclosure provides a method for performing information processing, when new writing information is received, writing position information corresponding to the writing information is obtained, then, whether the number of writing information corresponding to the writing position information reaches a set threshold value in a preset time period corresponding to the current time is judged, after the fact that the number reaches the set threshold value is determined, a frequency control state identifier corresponding to the writing position information in the preset time period is recorded as a first identifier for indicating to stop updating the writing number of the writing information, so that when the writing information is received again, based on the first identifier, it is judged that the writing number of the writing information is stopped to be updated, and the process of cumulative counting can be saved, so that the memory does not need to update the stored numerical value of the cumulative count continuously, and the memory does not need to be accessed to obtain the numerical value of the cumulative count, and the performance pressure caused to the memory is reduced.
For the sake of understanding the present embodiment, first, a detailed description will be given of a method for performing information processing disclosed in an embodiment of the present disclosure, where an execution subject of the method for performing information processing provided in the embodiment of the present disclosure is generally a computer device having a certain computing capability, where the computer device includes, for example: a server or other processing device, in some possible implementations, the method of information processing may be implemented by way of a processor invoking computer readable instructions stored in a memory.
The method for performing information processing according to the embodiment of the present disclosure will be described below by taking an execution subject as a server as an example.
Referring to fig. 1, a flowchart of a method for performing information processing according to an embodiment of the present disclosure is shown, where the method includes steps S101 to S103, where:
s101, when the writing information is received, the writing position information corresponding to the writing information is acquired.
The writing information is information that the server receives the writing information to be written in the designated position, and the writing information may include writing position information corresponding to the writing information, for example, an identification code indicating the writing position information.
The embodiment of the disclosure is applicable to live broadcast scenes and scenes in which bullet screens are published during film watching, and when the embodiment of the disclosure is applied to live broadcast scenes, the writing position information refers to the live broadcasting room information to be displayed by writing information, for example, the live broadcasting room information can be represented by a live broadcasting room identification code carried by the writing information.
S102, judging whether the number of the written information corresponding to the written position information reaches a set threshold value in a preset time period corresponding to the current time.
The embodiment of the disclosure may preset a plurality of time period sequences, for example, the live broadcast duration is from 9:00 to 10:00, and the time period that may be set may include 9:00 to 9:01, …, and 9:59 to 10:00; if the current time is 9:00, it may be determined that the preset time period corresponding to the current time is 9:00-9:01, where the current time refers to the current time of the server executing the information processing method.
The embodiment of the disclosure stores the number of writing information stored in the preset time by a memory, such as a cache Redis, a non-relational database NoSQL, etc., where the number of writing information corresponding to the writing position information may be obtained in a preset time period corresponding to the current time stored in the memory, and then the obtained number of writing information is compared with a set threshold, so as to determine whether the number of writing information reaches the set threshold.
The set threshold value and the set time period can be determined through a large number of experiments in advance, for example, the set time period and the set threshold value are continuously adjusted, so that the live broadcast effect of a large number of live broadcast rooms is tested, and the proper set threshold value and the proper set time period are selected.
S103, if the set threshold is reached, recording the corresponding frequency control state identifier of the written position information in a preset time period as a first identifier; the first flag is used to indicate that updating of the number of writes of the written information is stopped.
The frequency control state identifier corresponding to the writing position information in the preset time period can record the frequency state identifier through a pre-established hash table, and specifically, the frequency control state identifier corresponding to each writing position information in each preset time period can be stored in the hash table in the form of key value pairs.
For example, the frequency control status identifier recorded in the hash table may have a default value, where the default value may be represented by a second identifier, and when the number of pieces of writing information corresponding to the writing position information reaches a set threshold value in a preset period of time corresponding to the current time, the second identifier is updated to be the first identifier by using the hash table.
The first identifier may be represented by a set character, for example, by "wire" or "1", or by another character, which is not limited herein.
For example, if the writing position information is the live broadcasting room001 and the preset time period corresponding to the current time is 9:01-9:02, the number of writing information corresponding to the live broadcasting room001 between 9:01-9:02 can be indicated in the hash table by "key=9:01-9:02:room001, value=" wire "to reach the set threshold value.
When it is determined that the frequency control state identifier corresponding to the writing position information in the preset time period is recorded as the first identifier, it is indicated that the number of writing information corresponding to the writing position information in the preset time period corresponding to the current time reaches the set threshold, at this time, the new writing information received again in the preset time period is not displayed in the live broadcasting room, and can be regarded as invalid writing information, the invalid writing information does not need to be counted and stored, and the memory does not need to update the writing number of the writing information.
In the method for performing information processing disclosed in S101 to S103, when new writing information is received, writing position information corresponding to the writing information is obtained, then whether the number of the writing information corresponding to the writing position information reaches a set threshold value in a preset time period corresponding to the current time is judged, after the fact that the number of the writing information reaches the set threshold value is confirmed, a frequency control state identifier corresponding to the writing position information in the preset time period is recorded as a first identifier for indicating that the writing number of the writing information is stopped to be updated, when the writing information is received again afterwards, it can be judged that the writing number of the writing information is stopped to be updated based on the first identifier, and the process of accumulated counting can be saved, so that the memory does not need to update the stored value of the accumulated counting any more, and the memory does not need to be accessed to obtain the value of the accumulated counting any more, and performance pressure caused to the memory is reduced.
The above S101 to S103 are described in detail below with reference to specific examples.
After the writing position information corresponding to the writing information is obtained in step S101, the method for performing information processing provided in the embodiment of the present disclosure further includes:
(1) Acquiring a frequency control state identifier of the written position information in a preset time period corresponding to the current time;
(2) If the frequency control state identifier is the first identifier, stopping updating the writing quantity of the writing information;
(3) And if the frequency control state identifier is a second identifier for indicating to update the writing quantity of the writing information, updating the writing quantity of the writing information.
After receiving the writing information and acquiring the writing position information corresponding to the writing information, the frequency control state identification of the writing position information in the preset time period corresponding to the current time can be acquired, so that whether the writing information quantity of the writing position information in the preset time period corresponding to the current time reaches a set threshold value or not is determined.
The first identifier is explained in detail above, when the frequency control state identifier is determined to be the first identifier, it is explained that the number of the written information of the written position information in the preset time period corresponding to the current time reaches the set threshold value, the written information is defaulted to be invalid written information at the moment, the received written information can be discarded, and the written information is not stored or displayed in a live broadcasting room for a live broadcasting scene, and meanwhile, when the written information is received, the written number of the written information is not indicated to be updated by the memory, so that the access frequency of the memory in the preset time period corresponding to the current time can be reduced, and the performance pressure caused to the memory is reduced.
Conversely, when the frequency control state identifier is the second identifier for indicating to update the writing quantity of the writing information, it is indicated that the writing information quantity of the writing position information in the preset time period corresponding to the current time does not reach the set threshold, that is, the writing information received at this time is valid writing information, and for the live broadcast scene, the writing information can be stored and displayed in the live broadcast room, and meanwhile, the memory is indicated to update the writing quantity of the writing information.
In addition, when the first identifier herein is denoted by "wire", the second identifier herein may be denoted by "false"; when the first identifier is denoted by "1", the second identifier herein may be denoted by "0".
Taking a specific scenario as an example, for example, the writing location information includes live broadcast room information, and when judging whether the number of writing information corresponding to the writing location information reaches a set threshold value in a preset time period corresponding to the current time, the method includes:
and judging whether the number of the written information corresponding to the information in the live broadcasting room reaches a set threshold value or not in a preset time period corresponding to the current time.
The live room information here may represent a specific live room, such as live room 001.
The above-mentioned frequency status identifier may be recorded by a hash table, in order to prevent that a large amount of expiration information stored in the hash table affects the storage effect of the hash table, the method for performing information processing according to the embodiment of the present disclosure further includes:
and deleting the frequency control state identifiers except for the preset time period corresponding to the current time according to the set time period.
Here, it is proposed that, every set time period, for example, every one hour, the frequency control state identifier outside the preset time period corresponding to the current time stored in the hash table may be deleted, that is, the expired frequency control state identifier is deleted.
For example, when the current time is 9:00 and the preset time period corresponding to the current time is 9:00-9:01, and the current time reaches the deletion period, the frequency control state identifier except for 9:00-9:01 is deleted, wherein the frequency control state identifier before 9:00 stored in the hash table is the frequency control state identifier which is out of date, and the frequency control state identifier before 9:00 stored in the hash table can be deleted.
The embodiment of the disclosure also provides a method for processing information, as shown in fig. 2, the method includes the following specific steps S201 to S203:
s201, when write-in information is received, write-in position information corresponding to the write-in information is obtained;
s202, acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and S203, if the frequency control state identifier is a first identifier for indicating to stop updating the writing quantity of the writing information, stopping updating the writing quantity of the writing information.
The detailed process is described in detail in the foregoing, and is not described in detail herein.
The method for processing information provided by the embodiment of the present disclosure is described below with reference to an embodiment of a specific live broadcast scenario:
first, assuming that a set threshold of the number of written information corresponding to the live broadcasting room001 in a set period is N, the live broadcasting room ID of the live broadcasting room001 is 001, the number of written information is counted and stored by caching Redis, and the frequency control state identifier corresponding to the live broadcasting room001 in the set period is stored by a hash table.
When the written information is received, the live broadcasting room information corresponding to the written information is obtained to obtain the live broadcasting room001, at the moment, the frequency control state identification of the live broadcasting room001 in the set time period corresponding to the current time is stored in the hash table, if the obtained frequency control state identification is a first identification 'wire', it is indicated that the number of the written information of the live broadcasting room001 in the preset time period corresponding to the current time reaches the upper limit N, a counting instruction is not sent to the cache Redis, namely the cache Redis does not update the written number of the written information.
If the obtained frequency control state identifier is a second identifier "false", which indicates that the number of the written information in the preset time period corresponding to the current time in the live broadcasting room001 does not reach the upper limit N, a counting instruction is sent to the cache dis, that is, the cache dis updates the written number of the written information.
In this process, the frequency control status identifier stored in the hash table about the expiration of the live broadcasting room001 may be deleted according to a set time period.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Based on the same technical concept, the embodiment of the disclosure further provides a device for performing information processing corresponding to the method for performing information processing, and since the principle of solving the problem of the device in the embodiment of the disclosure is similar to that of the method for performing information processing in the embodiment of the disclosure, the implementation of the device can refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 3, a schematic diagram of an apparatus 300 for performing information processing according to an embodiment of the disclosure is shown, where the apparatus includes: an information acquisition module 301, a threshold judgment module 302, and a state recording module 303.
The information obtaining module 301 is configured to obtain writing position information corresponding to writing information when receiving the writing information;
a threshold value judging module 302, configured to judge whether the number of writing information corresponding to the writing position information reaches a set threshold value in a preset time period corresponding to the current time;
the state recording module 303 is configured to record, as a first identifier, a frequency control state identifier corresponding to the written location information in a preset time period if the set threshold is reached; the first flag is used to indicate that updating of the number of writes of the written information is stopped.
In one possible embodiment, the apparatus 300 for performing information processing further includes a control module 304, where after the information obtaining module 301 obtains the writing location information corresponding to the writing information, the control module 304 is configured to:
acquiring a frequency control state identifier of the written position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is the first identifier, stopping updating the writing quantity of the writing information.
In one possible implementation, after obtaining the frequency control status identifier of the writing location information in the preset period corresponding to the current time, the control module 304 is further configured to:
and if the frequency control state identifier is a second identifier for indicating to update the writing quantity of the writing information, updating the writing quantity of the writing information.
In one possible implementation, the writing location information includes live room information, and the threshold determining module 302 includes, when determining whether the number of writing information corresponding to the writing location information reaches the set threshold in a preset period corresponding to the current time, the determining module further includes:
and judging whether the number of the written information corresponding to the information in the live broadcasting room reaches a set threshold value or not in a preset time period corresponding to the current time.
In one possible implementation, the apparatus 300 for performing information processing further includes a state deletion module 305, where the state deletion module 305 is configured to:
and deleting the frequency control state identifiers except for the preset time period corresponding to the current time according to the set time period.
Referring to fig. 4, a schematic diagram of an apparatus 400 for performing information processing according to an embodiment of the disclosure is provided, where the apparatus includes: an information acquisition module 401, a state acquisition module 402, and a control module 403.
The information obtaining module 401 is configured to obtain writing position information corresponding to writing information when receiving the writing information;
a state acquisition module 402, configured to acquire a frequency control state identifier of the writing location information in a preset time period corresponding to the current time;
the control module 403 is configured to stop updating the writing quantity of the writing information if the frequency control status identifier is a first identifier for indicating to stop updating the writing quantity of the writing information.
Corresponding to the method for processing information in fig. 1, the embodiment of the disclosure further provides an electronic device 500, as shown in fig. 5, which is a schematic structural diagram of the electronic device 500 provided in the embodiment of the disclosure, including:
a processor 51, a memory 52, and a bus 53; memory 52 is used to store execution instructions, including memory 521 and external storage 522; the memory 521 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 51 and data exchanged with the external memory 522 such as a hard disk, and the processor 51 exchanges data with the external memory 522 through the memory 521, and when the electronic device 500 is operated, the processor 51 and the memory 52 communicate with each other through the bus 53, so that the processor 51 executes the following instructions:
when the writing information is received, writing position information corresponding to the writing information is obtained;
judging whether the number of the written information corresponding to the written position information reaches a set threshold value or not in a preset time period corresponding to the current time;
if the set threshold value is reached, recording a frequency control state identifier corresponding to the written position information in a preset time period as a first identifier; the first flag is used to indicate that updating of the number of writes of the written information is stopped.
In one possible implementation manner, after the writing location information corresponding to the writing information is obtained, the instructions executed by the processor 51 further include:
acquiring a frequency control state identifier of the written position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is the first identifier, stopping updating the writing quantity of the writing information.
In one possible implementation manner, after obtaining the frequency control state identifier of the writing position information in the preset time period corresponding to the current time, the instruction executed by the processor further includes:
and if the frequency control state identifier is a second identifier for indicating to update the writing quantity of the writing information, updating the writing quantity of the writing information.
In one possible implementation, the written location information includes live room information, and the instructions executed by the processor include:
and judging whether the number of the written information corresponding to the information in the live broadcasting room reaches a set threshold value or not in a preset time period corresponding to the current time.
In one possible implementation, the instructions executed by the processor further comprise:
and deleting the frequency control state identifiers except for the preset time period corresponding to the current time according to the set time period.
Corresponding to the method for processing information in fig. 2, the embodiment of the disclosure further provides an electronic device 600, as shown in fig. 6, which is a schematic structural diagram of the electronic device 600 provided in the embodiment of the disclosure, including:
a processor 61, a memory 62, and a bus 63; memory 62 is used to store execution instructions, including memory 621 and external memory 622; the memory 621 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 61 and data exchanged with the external memory 622 such as a hard disk, the processor 61 exchanges data with the external memory 622 through the memory 621, and when the electronic device 600 is operated, the processor 61 and the memory 62 communicate with each other through the bus 63, so that the processor 61 executes the following instructions:
when the writing information is received, writing position information corresponding to the writing information is obtained;
acquiring a frequency control state identifier of the written position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is a first identifier for indicating to stop updating the writing quantity of the writing information, stopping updating the writing quantity of the writing information.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method for information processing described in the method embodiments above. Wherein the storage medium may be a volatile or nonvolatile computer readable storage medium.
The computer program product of the method for performing information processing provided in the embodiment of the disclosure includes a computer readable storage medium storing program code, where the program code includes instructions for performing the steps of the method for performing information processing described in the embodiment of the method, and the detailed description of the embodiment of the method is omitted herein.
The disclosed embodiments also provide a computer program which, when executed by a processor, implements any of the methods of the previous embodiments. The computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present disclosure, and are not intended to limit the scope of the disclosure, but the present disclosure is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, it is not limited to the disclosure: any person skilled in the art, within the technical scope of the disclosure of the present disclosure, may modify or easily conceive changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features thereof; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the disclosure, and are intended to be included within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (12)

1. A method of information processing, the method comprising:
when receiving writing information, acquiring writing position information corresponding to the writing information;
judging whether the number of the written information corresponding to the written position information reaches a set threshold value or not in a preset time period corresponding to the current time;
if the set threshold is reached, recording the corresponding frequency control state identifier of the writing position information in the preset time period as a first identifier; the first identifier is used for indicating to stop updating the writing quantity of the writing information;
the writing position information includes live broadcasting room information, and the judging whether the number of writing information corresponding to the writing position information reaches a set threshold value in a preset time period corresponding to the current time includes:
and judging whether the number of the written information corresponding to the live broadcasting room information reaches a set threshold value or not in a preset time period corresponding to the current time.
2. The method according to claim 1, wherein after obtaining the writing position information corresponding to the writing information, the method further comprises:
acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is the first identifier, stopping updating the writing quantity of the writing information.
3. The method of claim 2, wherein after obtaining the frequency control status identifier of the writing location information in a preset period of time corresponding to the current time, the method further comprises:
and if the frequency control state identifier is a second identifier for indicating to update the writing quantity of the writing information, updating the writing quantity of the writing information.
4. A method according to any one of claims 1 to 3, wherein the method further comprises:
and deleting the frequency control state identifiers except for the preset time period corresponding to the current time according to the set time period.
5. A method of information processing, the method comprising:
when receiving writing information, acquiring writing position information corresponding to the writing information;
acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is a first identifier for indicating to stop updating the writing quantity of the writing information, stopping updating the writing quantity of the writing information.
6. An apparatus for processing information, the apparatus comprising:
the information acquisition module is used for acquiring writing position information corresponding to the writing information when the writing information is received;
the threshold judging module is used for judging whether the number of the written information corresponding to the written position information reaches a set threshold value or not in a preset time period corresponding to the current time;
the state recording module is used for recording the frequency control state identifier corresponding to the writing position information in the preset time period as a first identifier if the writing position information reaches the set threshold value; the first identifier is used for indicating to stop updating the writing quantity of the writing information;
the writing position information comprises live broadcasting room information, and the threshold judging module is used for judging whether the number of writing information corresponding to the writing position information reaches a set threshold value or not in a preset time period corresponding to the current time or not:
and judging whether the number of the written information corresponding to the live broadcasting room information reaches a set threshold value or not in a preset time period corresponding to the current time.
7. The apparatus of claim 6, further comprising a control module configured to, after the obtaining module obtains the write location information corresponding to the write information:
acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and if the frequency control state identifier is the first identifier, stopping updating the writing quantity of the writing information.
8. The apparatus of claim 7, wherein after obtaining the frequency control status identification of the writing location information within a preset time period corresponding to a current time, the control module is further configured to:
and if the frequency control state identifier is a second identifier for indicating to update the writing quantity of the writing information, updating the writing quantity of the writing information.
9. The apparatus according to any one of claims 6 to 8, further comprising a state deletion module configured to:
and deleting the frequency control state identifiers except for the preset time period corresponding to the current time according to the set time period.
10. An apparatus for processing information, the apparatus comprising:
the information acquisition module is used for acquiring writing position information corresponding to the writing information when the writing information is received;
the state acquisition module is used for acquiring a frequency control state identifier of the writing position information in a preset time period corresponding to the current time;
and the control module is used for stopping updating the writing quantity of the writing information if the frequency control state identifier is a first identifier for indicating to stop updating the writing quantity of the writing information.
11. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine-readable instructions executable by said processor, said processor and said memory communicating over the bus when the electronic device is running, said machine-readable instructions when executed by said processor performing the steps of the method according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 5.
CN202010106268.9A 2020-02-21 2020-02-21 Method and device for processing information, electronic equipment and storage medium Active CN111339158B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010106268.9A CN111339158B (en) 2020-02-21 2020-02-21 Method and device for processing information, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010106268.9A CN111339158B (en) 2020-02-21 2020-02-21 Method and device for processing information, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111339158A CN111339158A (en) 2020-06-26
CN111339158B true CN111339158B (en) 2023-05-16

Family

ID=71181821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010106268.9A Active CN111339158B (en) 2020-02-21 2020-02-21 Method and device for processing information, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111339158B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112099812B (en) * 2020-09-18 2022-08-23 厦门紫光展锐科技有限公司 Flash material identification and identification method, system, equipment and medium
CN112307005B (en) * 2020-11-11 2022-08-02 天津汇商共达科技有限责任公司 Write-in checking method and device
CN113792031B (en) * 2021-10-11 2024-02-13 小红书科技有限公司 Key value data processing method, system, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105471933A (en) * 2014-08-07 2016-04-06 腾讯科技(深圳)有限公司 Server overload protecting method, server overload protecting system and server
CN106937136A (en) * 2017-03-29 2017-07-07 武汉斗鱼网络科技有限公司 Data delay method and system based on statistical information between network direct broadcasting
CN106993234A (en) * 2017-03-22 2017-07-28 北京潘达互娱科技有限公司 Barrage display methods and device
CN110191348A (en) * 2018-02-23 2019-08-30 武汉斗鱼网络科技有限公司 The processing method and processing device of interactive message in net cast

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8934351B2 (en) * 2011-03-24 2015-01-13 Fujitsu Ten Limited Communication apparatus and communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105471933A (en) * 2014-08-07 2016-04-06 腾讯科技(深圳)有限公司 Server overload protecting method, server overload protecting system and server
CN106993234A (en) * 2017-03-22 2017-07-28 北京潘达互娱科技有限公司 Barrage display methods and device
CN106937136A (en) * 2017-03-29 2017-07-07 武汉斗鱼网络科技有限公司 Data delay method and system based on statistical information between network direct broadcasting
CN110191348A (en) * 2018-02-23 2019-08-30 武汉斗鱼网络科技有限公司 The processing method and processing device of interactive message in net cast

Also Published As

Publication number Publication date
CN111339158A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN111339158B (en) Method and device for processing information, electronic equipment and storage medium
US20200076576A1 (en) Method and apparatus for creating a finite blockchain
CN112714359B (en) Video recommendation method and device, computer equipment and storage medium
CN114329298B (en) Page presentation method and device, electronic equipment and storage medium
CN110826799B (en) Service prediction method, device, server and readable storage medium
CN110597825A (en) Data processing method and device based on block chain and node equipment
CN110851535B (en) Data processing method and device based on block chain, storage medium and terminal
CN105893471B (en) Data processing method and electronic equipment
CN110908880A (en) Embedded point code injection method, event reporting method and related equipment thereof
CN107423095B (en) Data processing method and device adaptive to hardware, storage medium and computer equipment
CN111901619A (en) Message pushing method and device
CN110401869A (en) A kind of net cast method, system and electronic equipment and storage medium
US10674188B2 (en) Playback apparatus, method of controlling playback apparatus, playback method and server apparatus
CN109597566B (en) Data reading and storing method and device
CN106254456B (en) Data synchronization method and data synchronization system
CN108491315A (en) The page is resident statistical method, device and the computer readable storage medium of duration
CN109040848B (en) Bullet screen reverse-playing method and device, electronic equipment and storage medium
CN108882041B (en) Player state acquisition method and device
EP4198785A1 (en) Data masking method, data masking apparatus and storage device
CN112584237B (en) Image erasing method and device, electronic equipment and storage medium
CN112492248B (en) Video verification method and device
CN111475512B (en) Message processing method and device, electronic equipment and storage medium
CN106802856B (en) Performance testing method of game application program, server and game application client
US20200402539A1 (en) Method and device of playing video, and computing device
CN113992876A (en) Method for recording document and playing video, storage medium and terminal

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
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder