CN113821748B - Webpage-based data recording method, server, electronic equipment and medium - Google Patents

Webpage-based data recording method, server, electronic equipment and medium Download PDF

Info

Publication number
CN113821748B
CN113821748B CN202111132331.7A CN202111132331A CN113821748B CN 113821748 B CN113821748 B CN 113821748B CN 202111132331 A CN202111132331 A CN 202111132331A CN 113821748 B CN113821748 B CN 113821748B
Authority
CN
China
Prior art keywords
webpage
data
preset
transmitted
video file
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
CN202111132331.7A
Other languages
Chinese (zh)
Other versions
CN113821748A (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.)
Hangzhou Miluoxing Technology Group Co ltd
Original Assignee
Hangzhou Miluoxing Technology Group 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 Hangzhou Miluoxing Technology Group Co ltd filed Critical Hangzhou Miluoxing Technology Group Co ltd
Priority to CN202111132331.7A priority Critical patent/CN113821748B/en
Publication of CN113821748A publication Critical patent/CN113821748A/en
Application granted granted Critical
Publication of CN113821748B publication Critical patent/CN113821748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0661Format or protocol conversion arrangements

Landscapes

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

Abstract

The application provides a data recording method based on a webpage, a server, electronic equipment and a medium, and relates to the technical field of networks. The data recording method based on the webpage comprises the following steps: responding to a task opening instruction, and downloading and acquiring a webpage code of a graphical interface of a current webpage based on a preset browser; according to the webpage codes, converting to obtain current interface data in a preset format; and storing the current interface data in the preset format into a memory. On one hand, the consumption of the codes to the CPU and the memory is less, so that smooth and efficient data transmission and stable running of the software program are facilitated. On the other hand, the format of the obtained current interface data meets the requirement of a preset format, so that the current interface data can be used without denoising, rendering, processing and the like, and the requirement of recording webpage data of diversified users can be met.

Description

Webpage-based data recording method, server, electronic equipment and medium
Technical Field
The present application relates to the field of network technologies, and in particular, to a data recording method, a server, an electronic device, and a medium based on a web page.
Background
With rapid development of informatization, the use requirement of web page recording is increasing, for example, based on some live scenes, audio and video propagation scenes and the like.
The existing data recording method based on the webpage is mainly based on an image interface to record the webpage, namely directly recording and storing files in an audio and video format. In the implementation process, the content of the image interface in the audio/video format file consumes a large amount of memory.
Disclosure of Invention
The application aims to overcome the defects in the prior art and provide a data recording method, a server, electronic equipment and a medium based on a webpage so as to solve the problem of overlarge memory consumption in the webpage recording process.
In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides a data recording method based on a web page, where the method includes:
responding to a task opening instruction, and downloading and acquiring a webpage code of a graphical interface of a current webpage based on a preset browser;
according to the webpage codes, converting to obtain current interface data in a preset format;
and storing the current interface data in the preset format into a memory.
Optionally, after storing the current interface data in the preset format in the memory, the method includes:
extracting the current interface data from the memory at a preset frequency;
and synthesizing the video file to be transmitted according to the extracted current interface data.
Optionally, the method further comprises:
responding to the task opening instruction, and acquiring a sound source corresponding to the current webpage;
and if the number of the sound sources is one, acquiring sound data of the sound sources.
Optionally, the method further comprises:
and if the number of the sound sources is a plurality of, mixing the sound of the sound sources to obtain mixed sound data.
Optionally, the method further comprises:
and synthesizing a new video file to be transmitted according to the video file to be transmitted and the sound data.
Optionally, the method further comprises:
and sending the video file to be transmitted to a live broadcast server, so that the live broadcast server pushes the video file to be transmitted to a target terminal by adopting a preset distribution protocol.
Optionally, the sending the video file to be transmitted to the live broadcast server includes:
and sending the synthesized video file to be transmitted with the preset duration to the live broadcast server in real time according to the preset duration.
In a second aspect, the embodiment of the application also provides a server, which comprises a recording synthesis module and a live broadcast module;
the recording and synthesizing module is specifically configured to execute the step of the web-based data recording method according to any one of the first aspect;
the live broadcast module is specifically configured to push the video file to be transmitted to a target terminal by adopting a preset distribution protocol.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the system comprises a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when the electronic device runs, the processor and the storage medium are communicated through the bus, and the processor executes the program instructions to execute the steps of the webpage-based data recording method according to any one of the first aspect.
In a third aspect, embodiments of the present application further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the web-based data recording method according to any of the first aspects above.
The beneficial effects of the application are as follows: the embodiment of the application provides a data recording method based on a webpage, which comprises the following steps: responding to a task opening instruction, and downloading and acquiring a webpage code of a graphical interface of a current webpage based on a preset browser; according to the webpage codes, converting to obtain current interface data in a preset format; and storing the current interface data in a preset format into a memory. Compared with the prior art of recording web pages based on a graphical interface, the method has the advantages that on one hand, the consumption of the codes to a CPU and a memory is less, smooth and efficient data transmission is facilitated, and the software program is stably operated; the operation can be realized by utilizing codes, so that the webpage recording based on the image interface can be automatically operated without manual duty. On the other hand, the format of the obtained current interface data meets the requirement of a preset format, so that the current interface data can be used without denoising, rendering, processing and the like, and the requirement of recording webpage data of diversified users can be met.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a data recording method based on a web page according to an embodiment of the present application;
FIG. 2 is a flowchart of a data recording method based on a web page according to another embodiment of the present application;
FIG. 3 is a flowchart of a data recording method based on a web page according to another embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present application.
100-server; 41-downloading a module; a 43-conversion module; 45-a memory module; 501-a processor; 502-storage medium.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application.
In the present application, the terms "first," "second," and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated unless otherwise explicitly specified and defined. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, unless explicitly specified otherwise. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
It should be noted that, the data recording method based on the web page of the present application may be implemented based on a software program, so that the method may be executed on a server or a computer, and the specific use scenario of the method is not limited, as long as the scenario can implement the data recording method based on the web page of the present application.
Fig. 1 is a flowchart of a data recording method based on a web page according to an embodiment of the present application; as shown in fig. 1, the method includes:
step 101: and responding to the task opening instruction, and downloading and acquiring the webpage codes of the graphical interface of the current webpage based on the preset browser.
It should be noted that, in one possible implementation manner, the task opening instruction may be issued by the user according to the use requirement, that is, the task opening instruction is issued by, for example, operating a control, a case, or an input instruction of the related device, which is not limited herein.
It should be noted that, the issuing of the task start instruction may also be implemented based on a software program. In one possible implementation, the task start instruction is a running start instruction of the software program, that is, the task is started after the software starts to run, that is, the method steps in step 101 are started to be executed.
In another possible implementation, the task start instruction is different from the running start instruction of the software program, and in this implementation, after the software program receives the running start instruction, the software program starts to run and waits for the task start instruction; the method steps in step 101 are performed beginning after the task opening instruction is captured.
It should be noted that, the task start instruction may be an instruction set according to time, for example, the task start instruction is sent at a specific time in a timing setting, so that the software program executes the subsequent steps. For example, if the task start command is set to be sent at 01:00:00 pm every day, the method of the application can respond after the task start command is captured at the time. The task opening instruction can also be a trigger condition, namely, after the set condition is met, the task opening instruction is sent, so that the software program starts to operate, and the subsequent steps are executed. For example, after capturing the task opening instruction after opening the specific webpage, the method of the present application may respond after capturing the task opening instruction after opening the specific webpage.
The above is merely an example, and in practical use, other manners of issuing the task start instruction and other forms of task start instruction are possible, which is not limited by the present application.
And after receiving the task opening instruction, downloading and acquiring the webpage code of the graphical interface of the current webpage based on the preset browser.
The application is not limited to the operating system on which the data recording method based on the webpage is based, in a possible implementation manner, the data recording method based on the webpage of the application can be realized based on a Linux (GNU/Linux) system, the above is only an example, in a specific implementation process, other types of operating systems can be selected, the operating systems can compile/support a preset browser, for example, a browser supporting DevTools Protocol, and the application is not limited to the specific operating system type.
The application does not limit the specific type of the preset browser, as long as the browser can be developed for the second time, and in a specific implementation mode, the preset browser can be an open-source chrome browser.
Downloading the web page code to obtain the graphical interface of the current web page may take many forms, for example, in a specific implementation, the chrome browser is set to the handle mode by using an open-source chrome browser, and after the web page is opened (i.e. the web site address is opened, or the uniform resource locator system (uniform resource locator, URL) is opened), the code of the current web page is downloaded.
It should be noted that, the downloading of the code of the current webpage may be downloading all the codes of the current webpage, executing the codes, and obtaining some operation information therein; the downloading of the code of the current webpage may be that after all the webpage codes of the current webpage are downloaded, a preset code is injected into the webpage codes, and the logic of the webpage codes is checked or the recording time is marked. The logic verification of the webpage codes refers to that the preset codes are injected into the downloaded webpage codes, and the logic of the webpage codes is judged according to the feedback or running condition of the webpage so as to evaluate the stability, the safety and the like of the webpage codes. Recording the mark-up time to the web page refers to marking the current recording time with a watermark or other form on the recorded video while recording.
The foregoing is merely an example, and in practical implementation, the code for downloading the current webpage may be other downloaded forms, which is not limited in the present application, so long as the webpage code of the graphical interface of the current webpage is obtained and the preset function operation is implemented.
It should be noted that, if the operation to be performed on the graphical interface of the current page is recorded, the operation may also be performed by replacing the web page code, that is, in response to the task opening instruction, the new replacement data replace the source code data in the web page code of the current web page corresponding to the web page code, so that the web page code of the new graphical interface of the current web page corresponding to the replaced web page code may be invoked, thereby implementing the recording of the web page operation. The new replacement data may be new replacement data input by the user after the task is started, or may be new replacement data stored in advance. The operation effects of clicking, selecting and the like on the current webpage can be achieved by using a mode of replacing codes, and the operation effects are the same as those achieved by a user through the peripheral. The foregoing is merely an example, and other manners of obtaining the operation on the code layer may be provided, which are not limited in this aspect of the present application, and the operation on the graphical interface of the current page may be implemented.
In a specific implementation manner, the replacement data of the code corresponding to the specific position selection operation is prestored in the target webpage, and when the target webpage is detected to be the target webpage of the prestored new replacement data in response to the task opening instruction, the source code data in the webpage code of the corresponding current webpage in the webpage codes is replaced according to the new replacement data, and the response corresponding to the current webpage can be obtained by calling the replaced webpage code, so that the response in the code form of the selection operation is obtained.
The application does not limit the specific content contained in the page code of the graphical interface, and the code related to the presentation mode and effect of the graphical interface belongs to the range of the page code of the graphical interface. In practical application, the content contained in the page code of the graphical interface can be flexibly set according to practical use and recording requirements.
Step 102: and converting and acquiring current interface data in a preset format according to the webpage codes.
It should be noted that the application can finally record the data of the web page and then synthesize the video, and transmit the video to the terminal for display, and the different terminals have different requirements on the format, resolution, frequency, code rate and the like of the video. Thus, when responding to the task opening instruction, the current interface data in the preset format can be obtained, wherein the preset format comprises, but is not limited to, preset resolution, preset frame rate, preset code rate and the like. In the present application, the codes are downloaded and acquired in step 101 and step 102, so that the current interface refers to the interface encoded data.
It should also be noted that the preset format may be set by a developer in a software program, for example, classifying common web pages: setting different preset formats for the video type web page, the image type web page and the text type web page in comparison with the same type web page, and acquiring the preset formats of the web page by acquiring the classification of the web page after responding to the task opening instruction; the preset format may also be manually set by the developer when issuing a task open command. The foregoing is merely an example, and in a specific implementation process, other manners may be used to set the preset format, for example, a default value meeting most of the use needs may be set, and after the corresponding task is started, the default value is the preset format of the web page, which is not limited in the present application.
In one possible implementation, the current web page is a video type web page, and the preset format set by the developer is: the preset resolution is a x b pixel, the preset frame rate is cHz, the preset code rate is dbit/s, the format of the current interface data obtained through conversion is a x b pixel, the frame rate is cHz, and the code rate is d bit/s (a, b, c, d is larger than 0). For example, in a specific implementation, the current web page is a video type web page, and the preset format set by the developer is: the preset resolution is 1280 x 720 pixels, the preset frame rate is 10Hz, and the preset code rate is 1Mbit/s. The format of the current interface data obtained by conversion is 1280 x 720 pixels in resolution, 10Hz in frame rate and 1Mbit/s in code rate.
Step 103: and storing the current interface data in a preset format into a memory.
And storing the current interface data in the preset format obtained in the step 102 into a memory for subsequent calling.
In summary, an embodiment of the present application provides a data recording method based on a web page, including: responding to a task opening instruction, and downloading and acquiring a webpage code of a graphical interface of a current webpage based on a preset browser; according to the webpage codes, converting to obtain current interface data in a preset format; and storing the current interface data in a preset format into a memory. Compared with the prior art of recording web pages based on a graphical interface, the method has the advantages that on one hand, the consumption of the codes to a CPU and a memory is less, smooth and efficient data transmission is facilitated, and the software program is stably operated; the operation can be realized by utilizing codes, so that the webpage recording based on the image interface can be automatically operated without manual duty. On the other hand, the format of the obtained current interface data meets the requirement of a preset format, so that the current interface data can be used without denoising, rendering, processing and the like, and the requirement of recording webpage data of diversified users can be met.
Optionally, on the basis of fig. 1, the present application further provides a possible implementation manner of a data recording method based on a web page, and fig. 2 is a flowchart of a data recording method based on a web page according to another embodiment of the present application; as shown in fig. 2, after storing the current interface data in the preset format into the memory, the method includes:
step 201: extracting current interface data from the memory at a preset frequency;
for the current interface data stored in the memory in step 103, the secondary development tool may be used to extract the current interface data according to the preset frequency when the current interface data needs to be synthesized. It should be noted that, the preset frequency may be set in a software program by a developer, and after responding to a task opening instruction (step 101), the preset frequency of the web page is obtained; the preset frequency can also be set manually by a developer when a task opening instruction is issued. The foregoing is merely an example, and in a specific implementation process, there may be other ways to set the preset frequency, for example, a default value meeting most of the use needs may be set, and after a corresponding task opening instruction, the default value is the preset frequency of the web page, which is not limited in the present application.
For example, assuming the preset frequency is 25 frames/second from default, steps 201 and 202 are accomplished using the open source chrome browser and the secondary development tool browser development suite (Chrome DevTools Protocol). The decimation is performed at a preset frequency of 25 frames/second using Chrome DevTools Protocol.
Step 202: and synthesizing the video file to be transmitted according to the extracted current interface data.
The current interface data extracted in step 201 is synthesized into a video file to be transmitted, and it should be noted that, in a specific implementation manner, the preset format in step 102 further includes an image generating manner for the extracted current interface data to generate an image in the target format. For example, in the preset format, the image generation mode of the current interface data is a JPEG format, which means that the current interface data needs to be subjected to lossy compression, and a picture in the JPEG format meeting the requirement of the preset resolution is generated after redundant image data is removed. Similarly, according to the actual use requirement, the image generation mode of the current interface data can be PNG format, TIF format, etc., which is not limited by the present application.
Extracting the current interface data from the memory at a preset frequency, and generating an image with a corresponding format according to the extracted current interface data according to a set image generation mode of the extracted current interface data. And secondly, video synthesis is carried out on the generated images with the corresponding formats according to the extraction sequence and the preset frequency, so that a video file to be transmitted is obtained.
In a specific implementation manner, the image generation mode of the current interface data in the preset format is a JPEG format, the preset frequency is 25 times/second, and the secondary development tool Chrome DevTools Protocol is used for generating a picture in the JPEG format, which meets the requirement of the preset resolution, on the extracted current interface data. And secondly, video synthesis is carried out on the generated images with the corresponding formats according to the extraction sequence and the frequency of 25 pieces/second, so as to obtain the video file to be transmitted.
The conversion from the code to the video of the current webpage recording is realized by extracting the current interface data from the memory and then synthesizing the video file with transmission, the conversion mode is simple, the frame rate can be set and adjusted according to the use requirement of a user, and the method has high flexibility.
Optionally, on the basis of fig. 2, the present application further provides a possible implementation manner of a data recording method based on a web page, and fig. 3 is a flowchart of a data recording method based on a web page according to another embodiment of the present application; in some embodiments, the recorded object includes a sound source, that is, some audio content, as shown in fig. 3, the method includes:
step 301: responding to a task opening instruction, and acquiring a sound source corresponding to a current webpage;
it should be noted that, after responding to the task opening instruction, there may be various ways to obtain the audio source corresponding to the current web page. In one possible implementation manner, the manner of acquiring the sound sources corresponding to the current webpage may be that the operating system automatically performs identification and acquisition, for example, N sound sources (N > 0) are in the operating system, after a task opening instruction, the state of M sound sources (n+.m0) is changed (from an inactive state to an active state), and then the operating system identifies the M sound sources as the sound sources corresponding to the current webpage.
In another possible implementation manner, the method of acquiring the sound source corresponding to the current webpage may be to manually input the number of the sound source corresponding to the current webpage, where each sound source has a unique number in the operating system, and the user may manually input the number to acquire the information of the sound source.
In another possible implementation manner, the manner of acquiring the sound source corresponding to the current webpage may be a default sound source, that is, one or a plurality of default sound sources are set in the operating system, and the plurality of sound sources are acquired as the sound source corresponding to the current webpage in response to the task opening instruction. In another possible implementation manner, the manner of acquiring the sound source corresponding to the current webpage may be controlled through a webpage interface, and the sound source expected by the user is selected.
The above is merely an example, and the specific implementation manner of obtaining the sound source corresponding to the current webpage is not limited in the present application, and the obtaining of the sound source corresponding to the current webpage may be achieved.
In one specific implementation, a Ubuntu operating system is used that, in response to a task start instruction, obtains sound source information from a browser and an audio console (pulseaudio), determines the source of the sound source information, and confirms the sound source corresponding to the current web page therefrom.
Step 302: if the number of the sound sources is one, sound data of the sound sources are acquired.
After judging the sound source corresponding to the current webpage, the operating system acquires the sound data of the sound source if only one corresponding sound source exists.
In one specific implementation, the Ubuntu operating system confirms that there is only one corresponding sound source and transmits the sound data of that sound source to an audio console (pulseaudio).
By acquiring the sound source corresponding to the current page, the recording of the audio data in the webpage data recording is realized, wherein the sound source can be automatically identified through the system, so that the webpage-based data recording method is more intelligent and more convenient.
Optionally, on the basis of fig. 3, the present application further provides a possible implementation manner of a data recording method based on a web page, where the method includes:
if the number of the sound sources is a plurality of, mixing the sound of the plurality of sound sources to obtain mixed sound data.
It should be noted that, if the sound data corresponding to the current web page is stereo, there are two sound sources generally; if the sound data corresponding to the current webpage is 5.1 sound, five sound sources are usually available; i.e. the number of sound sources is different for different sound data types. After judging the sound sources corresponding to the current webpage, the operating system determines the number of the sound sources corresponding to the webpage and specific sound source numbers, then the operating system calls an interface of an audio console through software to realize sound mixing, and sound data after sound mixing is obtained.
In a specific implementation manner, after confirming that five corresponding sound sources exist in the Ubuntu operating system, calling an interface of the audio console through software, transmitting sound data of the five sound sources to the audio console (pulseaudio), and performing mixing processing on the sound data of the five sound sources by the audio console.
When the number of the sound sources is multiple, sound of the multiple sound sources is mixed, sound data after sound mixing is obtained, and quality of sound data corresponding to the current webpage is guaranteed.
Optionally, on the basis of the foregoing embodiment and fig. 3, the present application further provides a possible implementation manner of a data recording method based on a web page, where the method includes: and synthesizing a new video file to be transmitted according to the video file to be transmitted and the sound data.
And synthesizing the video file to be transmitted and the sound data acquired in the subsequent steps through the step 202, and synthesizing to obtain a new video file to be transmitted. The video file to be transmitted obtained in step 202 essentially comprises a plurality of picture files and a predetermined frequency. In one possible implementation, when the video file to be transmitted and the sound data are synthesized, the audio/video portability can be performed by using a software program, for example, the playing time of the video file to be transmitted and the playing time of the sound data are aligned. The foregoing is merely illustrative, and in practical implementation, other synthesis manners may be available, and the present application is not limited to a specific synthesis manner, and may be capable of implementing synthesis of a video file and sound data to be transmitted.
In a specific implementation manner, audio and video writing can be performed through an audio and video codec program (for example, ffmpeg), and the software is opened, so that the normal operation of the software in the webpage-based data recording method can be realized.
It should be further noted that, the user may set or directly use the default file format of the new video file to be transmitted, for example, the default file format of the new video file to be transmitted is mp4 format, and the user may set the new video file to be transmitted in other formats according to actual needs, so that the specific format of the new video file to be transmitted is not limited.
The video file to be transmitted and the sound data are synthesized to obtain a new video file to be transmitted, so that the complete recording of webpage data comprising image data and audio data is realized, the video file to be transmitted and the sound data can be flexibly adjusted, the adjustment of the new video file to be transmitted obtained after synthesis can be realized, the degree of freedom is high, the requirements of different users can be met, and the application range is wide.
Optionally, based on the foregoing embodiment and fig. 2, the present application further provides a possible implementation manner of a data recording method based on a web page, where the method includes:
and sending the video file to be transmitted to the live broadcast server, so that the live broadcast server pushes the video file to be transmitted to the target terminal by adopting a preset distribution protocol.
It should be noted that, the preset distribution protocol may be a Real-time transmission control protocol (Real-time Control Protocol, RTC) (the negotiation server is required)/a Real-time streaming media transmission protocol (Real-time Transport Protocol, RTP) and other distribution modes. The present application is not limited thereto as long as the distribution protocol can realize a function of pushing the video file to be transmitted to the target terminal.
The video file to be transmitted may also be directly sent to the terminal, that is, the live broadcast server and the execution main body of the method shown in fig. 1 are integrated in the same main body, which is not limited herein.
It should be noted that, according to the webpage-based data recording method, the current webpage may have a corresponding sound source; there may be no corresponding audio source, for example, when a web page with plain text is recorded, the web page may not have a corresponding audio source, and for this purpose, the video file to be transmitted and the sound data do not need to be synthesized, and the video file to be transmitted may be directly processed.
In one possible implementation manner, if corresponding sound data exists in the current webpage, that is, a corresponding sound source exists, the video file to be transmitted and the sound data are synthesized to obtain a new video file to be transmitted, that is, after the audio/video codec program synthesizes the image data and the sound data, the obtained new video file to be transmitted is sent to the live broadcast server.
In another possible implementation manner, if the corresponding sound data does not exist in the current webpage, that is, there is no corresponding audio source, the audio/video codec program does not need to synthesize, directly processes the video file to be transmitted, and can send the obtained new video file to be transmitted to the live broadcast server.
In another possible implementation manner, the audio/video codec program may store the obtained new video file to be transmitted in the local storage, that is, may directly call the video file in the local storage in addition to live broadcast, so as to implement storage and reuse of the video file.
In a specific implementation manner, audio and video coding is performed by using audio and video coding program (e.g. ffmpeg) software, if corresponding sound data exists in the current webpage, the audio and video coding program software obtains the sound data from the audio console and the video file to be transmitted obtained in step 202, synthesizes the sound data and the video file to be transmitted, thereby obtaining a new video file to be transmitted, and sends the new video file to be transmitted to the live broadcast server.
In another specific implementation manner, audio and video coding is performed by using an audio and video coding program (such as ffmpeg), if no corresponding sound data exists in the current webpage, that is, the ffmpeg software does not acquire the sound data from the audio console, the audio and video coding program software directly processes the video file to be transmitted without synthesis, and the obtained new video file to be transmitted can be sent to the live broadcast server.
After receiving the video file to be transmitted, the live broadcast server can push the video file to be transmitted to the target terminal by adopting a preset distribution protocol.
The application also needs to be interpreted as specifying the specific type of the target terminal, as long as the target terminal can receive the video file to be transmitted distributed by the live broadcast server.
The application does not limit the concrete existence form of the live broadcast server, as long as the live broadcast server can receive the video file to be transmitted and push the video file to be transmitted to the terminal.
The video file to be transmitted is sent to the terminal through the live broadcast server, live broadcast of webpage data recording is realized, and the method and the device are practical and novel in technology, and different from the prior art that all contents can be watched after being recorded and uploaded to the network disk.
On the basis of the above embodiment, the present application further provides a possible implementation manner of a data recording method based on a web page, and the method includes:
and sending the synthesized video file to be transmitted with the preset duration to the live broadcast server in real time according to the preset duration.
It should be noted that, the user may set the preset duration according to the actual use requirement or the operation limitation, or may directly use the preset duration set by default. In a specific implementation manner, the live broadcast server may send the synthesized video file to be transmitted with a preset duration to the live broadcast server in Real time (Real-Time Messaging Protocol, RTMP) (doing through TCP protocol) based on a Real-time message transmission protocol, and if the preset duration is 1 second, the live broadcast server pushes the video file to be transmitted with 1 second to the target terminal for the user to watch in Real time every synthesized video file to be transmitted with 1 second.
It should be noted that, the user may flexibly set a specific manner of the live broadcast server to send the video to be transmitted according to factors such as operation limitation, network condition, delay condition of the target terminal, etc., so as to achieve better, clear, smooth and low-delay live broadcast effect.
The synthesized video file to be transmitted with the preset duration is sent to the live broadcast server in real time, so that low delay of data recording live broadcast based on the webpage is realized. Good live broadcast effect is ensured.
The following describes a server, an electronic device, and a computer readable storage medium for executing the present application, and specific implementation processes and technical effects thereof are referred to above, and are not described in detail below.
An example of a possible implementation of a server is provided in the embodiment of the present application, and fig. 4 is a schematic diagram of an electronic device provided in the embodiment of the present application, as shown in fig. 4, where the server 100 includes a downloading module 41, a converting module 43, and a storing module 45.
The downloading module 41 is specifically configured to download, in response to the task opening instruction, a web page code of a graphical interface for obtaining a current web page based on a preset browser.
The conversion module 43 is specifically configured to convert and obtain current interface data in a preset format according to the web page code.
The storage module 45 is specifically configured to store the current interface data in the preset format into a memory.
Optionally, the server 100 further includes an extraction module and a synthesis module.
The extraction module is specifically configured to extract the current interface data from the memory at a preset frequency.
The synthesizing module is specifically used for synthesizing the video file to be transmitted according to the extracted current interface data.
Optionally, the server 100 further includes a sound source acquisition module and a sound data acquisition module.
The sound source acquisition module is specifically configured to respond to the task opening instruction and acquire a sound source corresponding to the current webpage.
The sound data acquisition module is specifically configured to acquire sound data of the sound sources if the number of the sound sources is one.
Optionally, the server 100 further includes a sound data processing module, where the sound data processing module is specifically configured to mix the sound of the plurality of sound sources to obtain mixed sound data if the number of the sound sources is plural.
Optionally, the server 100 further includes an audio/video processing module, which is specifically configured to synthesize a new video file to be transmitted according to the video file to be transmitted and the sound data.
Optionally, the server 100 further includes a live broadcast module, where the live broadcast module is specifically configured to send the video file to be transmitted to a live broadcast server, so that the live broadcast server pushes the video file to be transmitted to a target terminal by adopting a preset distribution protocol.
Optionally, the live broadcast module may be further configured to send, in real time, the synthesized video file to be transmitted with the preset duration to the live broadcast server according to the preset duration.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more microprocessors (digital singnal processor, abbreviated as DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
The embodiment of the application provides a possible implementation example of an electronic device, which can execute the webpage-based data recording method provided by the embodiment. Fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present application, where the device may be integrated in a terminal device or a chip of the terminal device, and the terminal may be a computing device with a data processing function.
The electronic device includes: the system comprises a processor 501, a storage medium 502 and a bus, wherein the storage medium stores program instructions executable by the processor, when the control device is running, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to execute the steps of the webpage-based data recording method. The specific implementation manner and the technical effect are similar, and are not repeated here.
An embodiment of the present application provides a possible implementation example of a computer readable storage medium, which can execute the webpage-based data recording method provided in the foregoing embodiment, where a computer program is stored on the storage medium, and the computer program is executed by a processor to execute the steps of the webpage-based data recording method.
A computer program stored on a storage medium may include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods of the various embodiments of the application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements 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 an indirect coupling or communication connection via some interfaces, devices or units, 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 over 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 the embodiments of the present application 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 integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform part of the steps of the methods of the embodiments of the application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (9)

1. A web-based data recording method, the method comprising:
responding to a task opening instruction, and downloading and acquiring a webpage code of a graphical interface of a current webpage based on a preset browser;
according to the webpage codes, converting to obtain current interface data in a preset format;
storing the current interface data in the preset format into a memory;
after storing the current interface data in the preset format into the memory, the method includes:
extracting the current interface data from the memory at a preset frequency;
and synthesizing the video file to be transmitted according to the extracted current interface data.
2. The method of claim 1, wherein the method further comprises:
responding to the task opening instruction, and acquiring a sound source corresponding to the current webpage;
and if the number of the sound sources is one, acquiring sound data of the sound sources.
3. The method of claim 2, wherein the method further comprises:
and if the number of the sound sources is a plurality of, mixing the sound of the sound sources to obtain mixed sound data.
4. A method according to claim 2 or 3, wherein the method further comprises:
and synthesizing a new video file to be transmitted according to the video file to be transmitted and the sound data.
5. The method of claim 1, wherein the method further comprises:
and sending the video file to be transmitted to a live broadcast server, so that the live broadcast server pushes the video file to be transmitted to a target terminal by adopting a preset distribution protocol.
6. The method of claim 5, wherein the sending the video file to be transmitted to a live server comprises:
and sending the synthesized video file to be transmitted with the preset duration to the live broadcast server in real time according to the preset duration.
7. The server for realizing the webpage-based data recording method is characterized by comprising a recording synthesis module and a live broadcast module;
the recording and synthesizing module is specifically configured to perform the steps of the web-based data recording method according to any one of claims 1 to 6;
the live broadcast module is specifically configured to push a video file to be transmitted to a target terminal by adopting a preset distribution protocol.
8. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is running, the processor executing the program instructions to perform the steps of the web-based data recording method according to any one of claims 1 to 6 when executed.
9. A computer readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the web-based data recording method according to any of claims 1 to 6.
CN202111132331.7A 2021-09-26 2021-09-26 Webpage-based data recording method, server, electronic equipment and medium Active CN113821748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111132331.7A CN113821748B (en) 2021-09-26 2021-09-26 Webpage-based data recording method, server, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111132331.7A CN113821748B (en) 2021-09-26 2021-09-26 Webpage-based data recording method, server, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN113821748A CN113821748A (en) 2021-12-21
CN113821748B true CN113821748B (en) 2023-11-07

Family

ID=78915574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111132331.7A Active CN113821748B (en) 2021-09-26 2021-09-26 Webpage-based data recording method, server, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113821748B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2663084A1 (en) * 2012-05-09 2013-11-13 Mark A. Harwell Recording and publishing content on social media websites
CN108235107A (en) * 2016-12-15 2018-06-29 广州市动景计算机科技有限公司 Video recording method, device and electric terminal
CN110019929A (en) * 2017-11-30 2019-07-16 腾讯科技(深圳)有限公司 Processing method, device and the computer readable storage medium of web page contents
CN111124861A (en) * 2019-12-19 2020-05-08 广州品唯软件有限公司 Recording method of webpage data, recording device of webpage data and readable storage medium
CN112148571A (en) * 2020-07-08 2020-12-29 青岛窗外科技有限公司 Method and device for recording and playing back webpage operation process
CN113010825A (en) * 2021-03-09 2021-06-22 腾讯科技(深圳)有限公司 Data processing method and related device
CN113221042A (en) * 2021-05-31 2021-08-06 京东科技控股股份有限公司 Webpage operation process recording method and device, electronic equipment and computer readable medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130132833A1 (en) * 2008-04-15 2013-05-23 Foresee Results, Inc. Systems and Methods For Remote Tracking And Replay Of User Interaction With A Webpage
US10200323B2 (en) * 2011-06-30 2019-02-05 Audiobyte Llc Method and system for communicating between a sender and a recipient via a personalized message including an audio clip extracted from a pre-existing recording

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2663084A1 (en) * 2012-05-09 2013-11-13 Mark A. Harwell Recording and publishing content on social media websites
CN108235107A (en) * 2016-12-15 2018-06-29 广州市动景计算机科技有限公司 Video recording method, device and electric terminal
CN110019929A (en) * 2017-11-30 2019-07-16 腾讯科技(深圳)有限公司 Processing method, device and the computer readable storage medium of web page contents
CN111124861A (en) * 2019-12-19 2020-05-08 广州品唯软件有限公司 Recording method of webpage data, recording device of webpage data and readable storage medium
CN112148571A (en) * 2020-07-08 2020-12-29 青岛窗外科技有限公司 Method and device for recording and playing back webpage operation process
CN113010825A (en) * 2021-03-09 2021-06-22 腾讯科技(深圳)有限公司 Data processing method and related device
CN113221042A (en) * 2021-05-31 2021-08-06 京东科技控股股份有限公司 Webpage operation process recording method and device, electronic equipment and computer readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
精确Web信息抽取关键技术与系统研究;施生生;《中国博士学位论文全文数据库 信息科技辑》;I138-72 *

Also Published As

Publication number Publication date
CN113821748A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
US20070016657A1 (en) Multimedia data processing devices, multimedia data processing methods and multimedia data processing programs
EP1309181A1 (en) Device, method and system for multimedia content adaption
CN106453572B (en) Method and system based on Cloud Server synchronous images
CN103533460A (en) Method, device, terminal and system for sharing television service
CN104508689A (en) A two-dimension code processing method and a terminal
US20240013811A1 (en) Video processing method and apparatus
CN110300322B (en) Screen recording method, client and terminal equipment
CN104185082A (en) Audio/video live broadcast method and system, client and server
JP2009089003A (en) Communication system, base station device, and terminal device
CN110113298B (en) Data transmission method, device, signaling server and computer readable medium
CN112235600B (en) Method, device and system for processing video data and video service request
CN113821748B (en) Webpage-based data recording method, server, electronic equipment and medium
CN113873288A (en) Method and device for generating playback in live broadcast process
CN112788090B (en) Network resource transmission method, device and system
KR100754796B1 (en) Apparatus and method for instant message display in portable terminal
US8130408B2 (en) Image forming system and data processing method
US8774599B2 (en) Method for transcoding and playing back video files based on grid technology in devices having limited computing power
CN115514989B (en) Data transmission method, system and storage medium
CN114374869B (en) Panoramic video playing method and device and computer storage medium
JP5321247B2 (en) Thin client system, thin client system control method, thin client terminal control program, and server control program
CN113179261B (en) Video stream processing method and device, storage medium and platform server
JP2007122647A (en) Method, system and device for providing program data
CN111432142A (en) Video synthesis method, device, equipment and storage medium
CN115134659B (en) Video editing and configuring method, device, browser, electronic equipment and storage medium
CN112559111B (en) Screen capturing method and device for sharing desktop

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