CN113821748A - Data recording method based on webpage, server, electronic equipment and medium - Google Patents

Data recording method based on webpage, server, electronic equipment and medium Download PDF

Info

Publication number
CN113821748A
CN113821748A CN202111132331.7A CN202111132331A CN113821748A CN 113821748 A CN113821748 A CN 113821748A CN 202111132331 A CN202111132331 A CN 202111132331A CN 113821748 A CN113821748 A CN 113821748A
Authority
CN
China
Prior art keywords
webpage
data
transmitted
preset
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.)
Granted
Application number
CN202111132331.7A
Other languages
Chinese (zh)
Other versions
CN113821748B (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

Images

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)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a data recording method, a server, electronic equipment and a medium based on a webpage, 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; converting and acquiring current interface data in a preset format according to the webpage codes; and storing the current interface data in the preset format into a memory. By calling the current interface data in the form of codes, on one hand, the codes consume less CPU and memory, and are beneficial to smooth and efficient transmission of data and stable operation of software programs. On the other hand, the format of the acquired current interface data meets the preset format requirement, so that the interface data can be used without denoising, rendering, processing and the like, and the diversified webpage data recording requirement of a user can be met.

Description

Data recording method based on webpage, server, electronic equipment and medium
Technical Field
The invention relates to the technical field of networks, in particular to a data recording method based on a webpage, a server, electronic equipment and a medium.
Background
With the rapid development of informatization, the use demand of webpage recording is increasing, for example, the webpage recording is based on some live scenes, audio and video transmission scenes and the like.
The existing data recording method based on the webpage mainly records the webpage based on an image interface, namely directly records files in an audio and video format for storage. 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 present invention provides a data recording method, a server, an electronic device and a medium based on a web page to solve the problem of excessive memory consumption during the recording of the web page.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are 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;
converting and acquiring current interface data in a preset format according to the webpage codes;
and storing the current interface data in the preset format into a memory.
Optionally, after the current interface data in the preset format is stored 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 includes:
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 includes:
and if the number of the sound sources is multiple, mixing the sounds of the multiple sound sources to obtain sound data after sound mixing.
Optionally, the method further includes:
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 includes:
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, an embodiment of the present application further provides a server, including a recording and synthesizing module and a live broadcasting module;
the recording synthesis 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 using a preset distribution protocol.
In a third aspect, an embodiment of the present application further provides an electronic device, including: 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 communicate 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, an embodiment of the present application further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the method for recording data based on a web page according to any one of the first aspect.
The beneficial effect of this application is: 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; converting and acquiring current interface data in a preset format according to the webpage codes; and storing the current interface data in a preset format into a memory. Compared with the prior art of recording a webpage based on a graphical interface, the method has the advantages that the current interface data are called in the form of codes, on one hand, the codes consume less CPU and memory, smooth and efficient transmission of data is facilitated, and stable operation of a software program is facilitated; the operation is realized by using the codes, so that the webpage recording based on the image interface can be separated from manual on-duty automatic operation. On the other hand, the format of the acquired current interface data meets the preset format requirement, so that the interface data can be used without denoising, rendering, processing and the like, and the diversified webpage data recording requirement of a user can be met.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
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 method for recording data based on a web page according to another embodiment of the present application;
fig. 3 is a flowchart of a method for recording data 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 view of an electronic device according to an embodiment of the present application.
100-a server; 41-downloading module; 43-a conversion module; 45-a storage module; 501, a processor; 502-storage medium.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
In this application, unless explicitly stated or limited otherwise, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one feature. In the description of the present invention, "a plurality" means at least two, for example, two, three, unless specifically defined 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 an … …" does not exclude the presence of other identical 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, and thus, the data recording method may be run on a server or a computer or other devices.
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 code of the graphical interface of the current webpage based on a preset browser.
It should be noted that, in a possible implementation manner, the task starting instruction may be issued by the user according to the use requirement, that is, the task starting instruction is issued by operating a control of the related device, a case, or inputting an instruction, for example, without limitation.
It should be further noted that the assignment of the task opening command may also be implemented based on a software program. In a possible implementation manner, the task start instruction is an operation start instruction of the software program, that is, after the software starts to operate, the task starts, that is, the method step in step 101 starts to be executed.
In another possible implementation manner, the task starting instruction is different from the operation starting instruction of the software program, and in this implementation manner, after the software program receives the operation starting instruction, the software program starts to operate and waits for the task starting instruction; the method steps in step 101 begin after a task start 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 according to a timing setting, so that the software program executes the subsequent steps. For example, if a task start command is sent every 01:00:00 pm, the method of the present application may respond after the task start command is captured at that time. The task starting instruction can also be a trigger condition, namely the task starting instruction is sent after the set condition is met, so that the software program starts to operate, and the subsequent steps are executed. For example, after a specific webpage is captured and opened, a task opening instruction is sent, and then the method of the application can respond after the specific webpage is opened and the task opening instruction is captured.
The above is merely an example, and in actual use, there may be other ways of issuing the task start instruction and other forms of task start instruction, which is not limited in the present application.
And after a task opening instruction is received, downloading and acquiring a webpage code of a graphical interface of the current webpage based on a preset browser.
The application does not limit the operating system on which the provided data recording method based on the web page is based, and in a possible implementation manner, the data recording method based on the web page may be implemented based on a Linux (GNU/Linux), which is only an example.
The specific type of the preset browser is not limited, 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.
For example, in a specific implementation, an open-source chrome browser is used, the chrome browser is set to a handle mode, and after a webpage is opened (i.e., a website address is opened, or a Uniform Resource Locator (URL) is opened), the code of the current webpage is downloaded.
It should be noted that the code for downloading the current webpage may be all codes for downloading the current webpage, and the codes are executed to obtain some operation information; the downloading of the code of the current webpage can also be that after all webpage codes of the current webpage are downloaded, preset codes are injected into the webpage codes, and the logic of the webpage codes is verified or recording time is marked. The logic check of the webpage code means that the logic of the webpage code is judged according to the feedback or the running condition of the webpage by injecting a preset code into the downloaded webpage code so as to evaluate the stability, the safety and the like of the webpage code. Recording the mark recording time to the web page means that the current recording time is marked on the recorded video in a watermark or other forms at the same time of recording.
The above is merely an example, and in actual implementation, the code for downloading the current web page may be in other downloading forms, which is not limited in the present application as long as the web page code of the graphical interface of the current web page is obtained and the preset function operation is implemented.
It should be further noted that, if the operation that needs to be performed on the graphical interface of the current page is recorded, the operation may also be implemented in a manner of replacing the web page code, that is, in response to the task start instruction, the new replacement data is used to replace the source code data in the web page code of the current web page corresponding to the page code, so that the web page code of the graphical interface of the new current web page corresponding to the replaced web page code may be called, thereby implementing the recording of the web page operation. The new replacement data may be new replacement data input by a user after the task is started, or may be new replacement data stored in advance, and a specific source of the new replacement data is not limited in the present application. The operation effect of clicking, selecting and the like on the current webpage can be realized by using the mode of replacing the codes, and the operation effect is the same as the operation effect realized by a user through the peripheral equipment. The above is merely an example, and there may be other ways to obtain the operation on the code level, which is not limited in the present application, and the operation on the graphical interface of the current page may be implemented.
In a specific implementation manner, replacement data of a code corresponding to implementation of a specific position selection operation is prestored in a target webpage, and in response to a task starting instruction, if it is detected that the current webpage is the target webpage of prestored new replacement data, source code data in a webpage code of the current webpage corresponding to the new replacement data in the webpage code are replaced, and by calling the replaced webpage code, a response corresponding to the current webpage can be obtained, so that a response in the code form of the selection operation is obtained.
The web page code of the graphical interface of the current web page in the present application includes, but is not limited to, font effect, map, table syntax, split window, structural definition, connection and graph, background and color, etc. the present application does not limit the specific content included in the web page code of the graphical interface, and the code related to the presentation mode and effect of the graphical interface all belong to the range of the web 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, in the present application, the data of the web page is finally recorded and synthesized into a video, and the video is transmitted to the terminal for display, and different terminals have different requirements on the format, resolution, frequency, code rate, and the like of the video. Therefore, when the task starting instruction is responded, the current interface data in a preset format can be acquired, and the preset format comprises but is not limited to a preset resolution, a preset frame rate, a preset code rate and the like. In the application, the codes are downloaded and acquired in steps 101 and 102, so that the current interface refers to interface coded data.
It should be further noted that the preset format may be set by a developer in a software program, for example, to classify common web pages: setting different preset formats for the video type web pages, the image type web pages and the character type web pages compared with the same type web pages, and acquiring the preset formats of the web pages by acquiring the classification of the web pages after responding to the task starting instruction; the preset format can also be manually set by a developer when a task start instruction is reached. The above is merely an example, and in a specific implementation process, there may be other ways to set the preset format, for example, a default value meeting most of the use requirements may be set, and after a corresponding task start instruction, the default value is the preset format of the web page, and the like, 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 as follows: and if the preset resolution is a pixel, the preset frame rate is cHz, and the preset code rate is dbit/s, the format of the current interface data obtained by conversion is a pixel with the resolution, the frame rate is cHz, and the code rate is d bit/s (a, b, c, d are all greater 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 as follows: the preset resolution is 1280 × 720 pixels, the preset frame rate is 10Hz, and the preset code rate is 1 Mbit/s. The format of the obtained current interface data is converted into the format with the resolution of 1280 × 720 pixels, the frame rate of 10Hz and the code rate bit of 1 Mbit/s.
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; converting and acquiring current interface data in a preset format according to the webpage codes; and storing the current interface data in a preset format into a memory. Compared with the prior art of recording a webpage based on a graphical interface, the method has the advantages that the current interface data are called in the form of codes, on one hand, the codes consume less CPU and memory, smooth and efficient transmission of data is facilitated, and stable operation of a software program is facilitated; the operation is realized by using the codes, so that the webpage recording based on the image interface can be separated from manual on-duty automatic operation. On the other hand, the format of the acquired current interface data meets the preset format requirement, so that the interface data can be used without denoising, rendering, processing and the like, and the diversified webpage data recording requirement of a user 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 in the memory, the method includes:
step 201: extracting current interface data from a memory at a preset frequency;
for the current interface data stored in the memory in step 103, the current interface data may be extracted according to a preset frequency by using a secondary development tool 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 start 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 start instruction is reached. The above 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 requirements may be set, and after a corresponding task start instruction, the default value is the preset frequency of the web page, and the like, which is not limited in the present application.
For example, assuming the default frequency is 25 frames/second, the steps 201 and 202 are performed using an open-source Chrome browser and a secondary development tool browser development suite (Chrome DevTools Protocol). Then 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.
It should be noted that, in a specific implementation manner, the preset format in step 102 further includes an image generation manner for the extracted current interface data, so as to generate an image in a target format. For example, in the preset format, the image generation mode of the current interface data is the JPEG format, which means that lossy compression is required to be performed on the current interface data, and a JPEG-format picture meeting the preset resolution requirement is generated after redundant image data is removed. Similarly, according to actual use requirements, the image generation mode of the current interface data may also be a PNG format, a TIF format, or the like, which is not limited in the present application.
And extracting the current interface data from the memory at a preset frequency, and generating an image in a corresponding format according to the extracted current interface data in a set image generation mode for the extracted current interface data. And secondly, performing video synthesis on the generated images with the corresponding formats according to the extraction sequence and the preset frequency to obtain a video file to be transmitted.
In a specific implementation manner, the image generation manner of the current interface data in the preset format is a JPEG format, the preset frequency is 25 times/second, and a secondary development tool Chrome DevTools Protocol is used to generate a JPEG-format picture meeting the preset resolution requirement on the extracted current interface data. And secondly, performing video synthesis on the generated images with the corresponding formats according to the extraction sequence and the frequency of 25 sheets/second to obtain a video file to be transmitted.
The current interface data are extracted from the memory and then synthesized into the video file with transmission, so that the conversion from codes to videos of the current webpage recording is realized, the conversion mode is simple, the frame rate can be set and adjusted according to the use requirements of users, 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 an audio source, i.e., some audio content, and as shown in fig. 3, the method includes:
step 301: responding to a task opening instruction, and acquiring a sound source corresponding to the current webpage;
it should be noted that after responding to the task start instruction, there are various ways to acquire the sound source corresponding to the current web page. In a possible implementation manner, the manner of acquiring the sound source corresponding to the current webpage may be that the operating system automatically identifies and acquires, for example, there are N sound sources (N >0) in the operating system, and after a task start instruction, the states of M sound sources (N ≧ M >0) change (the state is changed from an inactive state to an active state), and then the operating system identifies the M sound sources as the sound source corresponding to the current webpage.
In another possible implementation manner, the manner of acquiring the sound source corresponding to the current webpage may be to manually input a number of the sound source corresponding to the current webpage, each sound source has a unique number in the operating system, and the user may manually input the number to acquire information of the sound source.
In another possible implementation manner, the manner of obtaining the sound source corresponding to the current webpage may be a default sound source, that is, one or more default sound sources are set in the operating system, and in response to the task starting instruction, the plurality of sound sources are obtained as the sound source corresponding to the current webpage. In another possible implementation manner, the manner of obtaining 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 sound source corresponding to the current webpage can be obtained.
In a specific implementation manner, an Ubuntu operating system is used, and the operating system responds to a task opening instruction, acquires sound source information from a browser and an audio console (pulseaudioi), judges the source of the sound source information, and confirms a sound source corresponding to a current webpage from the sound source information.
Step 302: and if the number of the sound sources is one, acquiring sound data of the sound sources.
After the operating system judges the sound source corresponding to the current webpage, if the corresponding sound source is only one, the sound data of the sound source is obtained.
In a specific implementation manner, after the Ubuntu operating system confirms that there is only one corresponding sound source, the sound data of the sound source is transmitted to an audio console (pulseaudioi).
The recording of the audio data in the webpage data recording process is realized by acquiring the sound source corresponding to the current page, and the sound source can be automatically identified through the system, so that the webpage-based data recording method is more intelligent and 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:
and if the number of the sound sources is multiple, mixing the sounds of the sound sources to obtain sound data after sound mixing.
It should be noted that, if the sound data corresponding to the current web page is stereo, there are usually two sound sources; 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 differs for different sound data types. After judging the sound source corresponding to the current webpage, the operating system determines the number of the sound sources corresponding to the webpage and the specific sound source number, then the sound of the sound sources needs to be mixed, the operating system calls an interface of an audio console through software to realize sound mixing, and sound data after sound mixing are obtained.
In a specific implementation manner, after confirming that there are five corresponding sound sources, the Ubuntu operating system calls an interface of an audio console through software, and transmits sound data of the five sound sources to the audio console (pulseaudioi), and the audio console performs sound mixing processing on the sound data of the five sound sources.
When the number of the sound sources is multiple, the sound of the multiple sound sources is mixed, the sound data after the mixed sound is obtained, and the quality of recording the sound data corresponding to the current webpage is ensured.
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.
The video file to be transmitted and the sound data acquired in the subsequent steps are synthesized in step 202, and a new video file to be transmitted is obtained. The video file to be transmitted obtained in step 202 essentially includes a plurality of picture files and a predetermined frequency. In a possible implementation manner, when synthesizing the video file to be transmitted and the sound data, 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 above is merely an example, and in an actual implementation, there may be other synthesis manners, and the present application does not limit a specific synthesis manner, and it is sufficient to synthesize a video file to be transmitted and sound data.
In a specific implementation manner, the audio and video can be written through an audio and video encoding and decoding program (e.g., ffmpeg), and since the software is open-source, the normal operation of the software in the data recording method based on the webpage can be realized.
It should be further noted that the user may set or directly use a 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 an mp4 format, and the user may also set the file format of the new video file to be transmitted to generate a new video file to be transmitted in another format according to actual needs.
The video file to be transmitted and the sound data are synthesized to obtain a new video file to be transmitted, so that complete recording of webpage data including image data and audio data is achieved, the video file to be transmitted and the sound data can be flexibly adjusted, the new video file to be transmitted obtained after synthesis can be adjusted, the degree of freedom is high, the requirements of different users can be met, and the application range is wide.
Optionally, on the basis of 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 a live broadcast server so that the live broadcast server can send the video file to be transmitted to a target terminal by adopting a preset distribution protocol.
It should be noted that the preset distribution Protocol may be a Real-time Control Protocol (RTC) (server to be negotiated)/Real-time Transport Protocol (RTP) distribution method. The present application does not limit this, as long as the distribution protocol can implement the 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, in the data recording method based on the web page, the current web page may have a corresponding sound source; for example, when a webpage with pure characters is recorded, the webpage may not have a corresponding sound source, and therefore, the video file to be transmitted and the sound data do not need to be synthesized, and the video file to be transmitted can be directly processed.
In a 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 and video encoding and decoding 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 there is no corresponding sound data, that is, there is no corresponding sound source, in the current webpage, the audio/video codec program does not need to be synthesized, and the video file to be transmitted is directly processed, that is, the obtained new video file to be transmitted can be sent 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, in addition to live broadcast, the audio/video codec program may subsequently and directly call the video file in the local storage to implement storage and reuse of the video file.
In a specific implementation manner, audio and video coding and decoding program (e.g., ffmpeg) software is used for writing audio and video, and if corresponding sound data exists in the current webpage, the audio and video coding and decoding program software acquires the sound data from the audio console and the video file to be transmitted acquired in step 202, synthesizes the sound data and the video file to be transmitted, so as to acquire 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, an audio/video coding/decoding program (e.g., ffmpeg) is used for writing audio/video, and if corresponding sound data does not exist in the current webpage, that is, if the ffmpeg software does not acquire the sound data from the audio console, synthesis is not required, the audio/video coding/decoding program software directly processes a video file to be transmitted, 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 adopt a preset distribution protocol to push the video file to be transmitted to the target terminal.
It should be further noted that the target terminal may be a vehicle-mounted computer, a desktop computer, a notebook computer, an intelligent television, an intelligent mobile phone, or the like, and the specific type of the target terminal is not limited in the present application as long as the target terminal can receive the video file to be transmitted distributed by the live broadcast server.
It should be further noted that the live broadcast server may be a server providing a live broadcast function, or a module in which the server provides a live broadcast service, and the present application does not limit the specific existence form of the live broadcast server, as long as it can receive the video file to be transmitted and push the video file to be transmitted to the terminal, which is required by the present application.
The video file to be transmitted is sent to the terminal through the live broadcast server, live broadcast of recording webpage data is achieved, and the webpage data can be recorded and played simultaneously when the webpage data is different from the webpage data which are recorded and uploaded to a network disk in the prior art.
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, which is to send a video file to be transmitted to a live broadcast server, and the method includes:
and sending the synthesized video file to be transmitted with the preset duration to a 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 of the default setting, and the specific setting mode of the preset duration is not limited, and the specific value of the preset duration is not limited. In a specific implementation manner, the live broadcast server may send a synthesized video file to be transmitted with a preset duration to the live broadcast server in Real Time based on a Real-Time Messaging Protocol (RTMP) (which is done through a TCP Protocol), and if the preset duration is 1 second, the live broadcast server pushes the video file to be transmitted for 1 second to the target terminal for the user to watch in Real Time every synthesized video file to be transmitted for 1 second.
It should be further noted that the user can also flexibly set the specific mode of the live broadcast server for sending the video to be transmitted according to factors such as operation limitation, network conditions, delay conditions of the target terminal and the like, so as to achieve better clear, smooth and low-delay live broadcast effect.
The low delay of the webpage-based data recording live broadcast is realized by sending the synthesized video file to be transmitted with preset duration to the live broadcast server in real time. And a good direct broadcasting effect is ensured.
The following describes a server, an electronic device, and a computer-readable storage medium for implementing the methods provided in the present application, and specific implementation processes and technical effects thereof are referred to above, and will not be described in detail below.
Fig. 4 is a schematic diagram of an electronic device provided in the embodiment of the present application, and as shown in fig. 4, 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, in response to the task starting instruction, download the webpage code of the graphical interface of the current webpage based on the preset browser.
The conversion module 43 is specifically configured to convert and acquire current interface data in a preset format according to the webpage code.
The storage module 45 is specifically configured to store the current interface data in the preset format in 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 synthesis 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 obtaining module and a sound data obtaining module.
And the sound source acquisition module is specifically used for responding to the task opening instruction and acquiring 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, if the number of the sound sources is multiple, mix sounds of multiple sound sources to obtain sound data after mixing.
Optionally, the server 100 further includes an audio/video processing module, where the audio/video processing module 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 using a preset distribution protocol.
Optionally, the live broadcast module may be further configured to send the synthesized video file to be transmitted with the preset duration to the live broadcast server in real time according to the preset duration.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules 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 (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
The embodiment of the present application provides a possible implementation example of an electronic device, which is capable of executing the data recording method based on a webpage provided by the foregoing embodiment. Fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present application, where the electronic 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 data recording device 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 runs, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the data recording method based on the webpage. The specific implementation and technical effects are similar, and are not described herein again.
Embodiments of the present application provide possible implementation examples of a computer-readable storage medium, which is capable of executing the data recording method based on a webpage provided in the foregoing embodiments, where the storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the data recording method based on a webpage.
A computer program stored in a storage medium may include instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (which may be a processor) to perform some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for web-based data recording, 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;
converting and acquiring current interface data in a preset format according to the webpage codes;
and storing the current interface data in the preset format into a memory.
2. The method of claim 1, wherein after storing the current interface data in the predetermined format in the memory, the method comprises:
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.
3. The method of claim 2, 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.
4. The method of claim 3, wherein the method further comprises:
and if the number of the sound sources is multiple, mixing the sounds of the multiple sound sources to obtain sound data after sound mixing.
5. The method of claim 3 or 4, further comprising:
and synthesizing a new video file to be transmitted according to the video file to be transmitted and the sound data.
6. The method of claim 2, further comprising:
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.
7. The method of claim 6, 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.
8. A server is characterized by comprising a recording and synthesizing module and a live broadcasting module;
the recording synthesis module is specifically configured to execute the steps of the web-based data recording method according to any one of claims 1 to 7;
the live broadcast module is specifically configured to use a preset distribution protocol to push a video file to be transmitted to a target terminal.
9. An electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, the processor and the storage medium communicate with each other through the bus when the electronic device is running, and the processor executes the program instructions to execute the steps of the web-based data recording method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for web-based data recording according to any one of claims 1 to 7.
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 true CN113821748A (en) 2021-12-21
CN113821748B 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 (9)

* 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
EP2663084A1 (en) * 2012-05-09 2013-11-13 Mark A. Harwell Recording and publishing content on social media websites
US20180103000A1 (en) * 2011-06-30 2018-04-12 Rednote 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
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

Patent Citations (9)

* 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
US20180103000A1 (en) * 2011-06-30 2018-04-12 Rednote 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
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 (2)

* Cited by examiner, † Cited by third party
Title
嗨格式录屏大师: "如何录制网页视频?这三种方法比较好用", Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/337897174> *
施生生: "精确Web信息抽取关键技术与系统研究", 《中国博士学位论文全文数据库 信息科技辑》, pages 138 - 72 *

Also Published As

Publication number Publication date
CN113821748B (en) 2023-11-07

Similar Documents

Publication Publication Date Title
CN104508689A (en) A two-dimension code processing method and a terminal
WO2018107719A1 (en) Data sharing method, apparatus, terminal device and server
US20240013811A1 (en) Video processing method and apparatus
CN112073753B (en) Method, device, equipment and medium for publishing multimedia data
CN110213458B (en) Image data processing method and device and storage medium
CN112351093A (en) Screenshot image sharing method, device and equipment and computer readable storage medium
CN101014094A (en) Method for capturing of real-time image
CN113905254A (en) Video synthesis method, device, system and readable storage medium
CN112788090B (en) Network resource transmission method, device and system
CN112235600B (en) Method, device and system for processing video data and video service request
CN111432142B (en) Video synthesis method, device, equipment and storage medium
KR100754796B1 (en) Apparatus and method for instant message display in portable terminal
CN113821748B (en) Webpage-based data recording method, server, electronic equipment and medium
CN110446118B (en) Video resource preprocessing method and device and video resource downloading method and device
US8130408B2 (en) Image forming system and data processing method
CN114374869B (en) Panoramic video playing method and device and computer storage medium
CN114173154B (en) Video processing method and system
CN113179261B (en) Video stream processing method and device, storage medium and platform server
CN113099270B (en) File storage method, decoding method, device, storage medium and electronic device
CN114285836A (en) Video playing method, device and medium
CN113923066A (en) Appointment control method, system and readable storage medium for network conference
CN113676748A (en) Cloud game screen capture interaction method and system
JP2010273294A (en) Thin client system, method for controlling thin client system, program for controlling thin client terminal, and program for controlling server
JP2007122647A (en) Method, system and device for providing program data
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