[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112100281B - Room scene reproduction method and device and electronic equipment - Google Patents

Room scene reproduction method and device and electronic equipment Download PDF

Info

Publication number
CN112100281B
CN112100281B CN202011284491.9A CN202011284491A CN112100281B CN 112100281 B CN112100281 B CN 112100281B CN 202011284491 A CN202011284491 A CN 202011284491A CN 112100281 B CN112100281 B CN 112100281B
Authority
CN
China
Prior art keywords
node
room
event
intelligent contract
public key
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
CN202011284491.9A
Other languages
Chinese (zh)
Other versions
CN112100281A (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.)
Beijing Tuoke Network Technology Co ltd
Original Assignee
Beijing Tuoke Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tuoke Network Technology Co ltd filed Critical Beijing Tuoke Network Technology Co ltd
Priority to CN202011284491.9A priority Critical patent/CN112100281B/en
Publication of CN112100281A publication Critical patent/CN112100281A/en
Application granted granted Critical
Publication of CN112100281B publication Critical patent/CN112100281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/74Browsing; Visualisation therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a room scene reproduction method, a room scene reproduction device and electronic equipment, which can play back room videos to students, and simultaneously show the events to the students when the events occur in the room videos according to the corresponding relation between the events and the event occurrence time, so that the students can completely review course contents, and the user experience is improved; moreover, the corresponding relation between the event occurring in the room video and the event occurrence time is stored through the IPFS, so that the aim of quickly positioning and inquiring the file is fulfilled; the hash value of the corresponding relation between the event occurring in the room video and the event occurrence time is managed through a block chain system interacting with the IPFS, and meanwhile, the data are guaranteed not to be tampered by malicious users; the defects that the storage of the on-line class data is not standard, credible and difficult to trace are overcome.

Description

Room scene reproduction method and device and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a room scene reproduction method and device and electronic equipment.
Background
At present, taking an online education scene as an example, a room is preset during online education and learning, and students needing online learning enter the room and then perform course learning. After the course is finished, the students need to review the course content, and great convenience can be provided for the students to review the course content by reproducing the room scene.
The scene reappearance implementation mode in the industry mainly records the lecture content of a room or a teacher in the room into a video in a screen recording mode, generates a link of the video, and puts the link to a website for students needing to review the lecture content.
Only videos can be played when the course content is reviewed, so that students cannot review the course content completely.
Disclosure of Invention
To solve the above problems, embodiments of the present invention provide a room scene reproduction method, apparatus, and electronic device.
In a first aspect, an embodiment of the present invention provides a room scene reproduction method, including:
the method comprises the steps that a server obtains a room video to be processed, wherein the room video is used for representing a video of a teacher in an online classroom for teaching;
performing frame supplementing operation on the room video, setting key frames of the room video according to a preset time interval, converting the room video subjected to the frame supplementing operation into a preset video format and storing the video;
based on the room identification, inquiring the corresponding relation between the event occurring in the room video corresponding to the room identification and the event occurrence time; the events include: multimedia files and courseware displayed by the teacher in the course of teaching and instant call records between the teacher and students;
acquiring event playback information, wherein the event playback information is used for recording the playback times of the events in the corresponding relation in a preset time length before the current time point;
when the playback frequency of the event is less than the playback frequency threshold, storing the multimedia file or the courseware corresponding to the event in the corresponding relationship into a hot storage device, when the playback frequency of the event in the corresponding relationship is more than or equal to the playback frequency threshold, storing the multimedia file or the courseware corresponding to the event in the corresponding relationship into a cold storage device, and storing the storage path of the multimedia file or the courseware corresponding to the event into the corresponding relationship;
sending the corresponding relation between the event occurring in the room video corresponding to the room identifier and the event occurrence time to an InterPlanetary File System (IPFS), so that the IPFS performs hash calculation on the corresponding relation to obtain a hash value of the corresponding relation, storing the hash value of the corresponding relation obtained by the IPFS calculation into a block chain System where a server is located, and generating the corresponding relation between the hash value and the room identifier;
generating a judgment condition that the playback frequency of the event reaches the playback frequency threshold according to the event stored in the cold storage device, and sending the generated judgment condition to a first node and a second node in the block chain system;
when the first node and the second node obtain different judgment results when judging that the judgment conditions are different, informing a prediction machine that the first node and the second node need to deploy two intelligent contracts with the same conditions but opposite results, so that the prediction machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract;
and when the playback times of the events stored in the cold storage device within the preset time length from the current time point are acquired, executing the first intelligent contract and the second intelligent contract respectively.
In a second aspect, an embodiment of the present invention further provides a room scene reproduction apparatus, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring room videos to be processed, and the room videos are used for representing videos of teachers in online classrooms;
the first processing module is used for performing frame supplementing operation on the room video, setting key frames of the room video according to a preset time interval, and converting the room video subjected to the frame supplementing operation into a preset video format and storing the room video;
the second processing module is used for inquiring the corresponding relation between the event occurring in the room video corresponding to the room identifier and the event occurring time based on the room identifier; the events include: multimedia files and courseware displayed by the teacher in the course of teaching and instant call records between the teacher and students;
the second acquisition module is used for acquiring event playback information, and the event playback information is used for recording the playback times of the events in the corresponding relation in a preset time length before the current time point;
a third processing module, configured to store the multimedia file or the courseware corresponding to the event in the corresponding relationship in a hot storage device when the playback frequency of the event is less than a playback frequency threshold, store the multimedia file or the courseware corresponding to the event in the corresponding relationship in a cold storage device when the playback frequency of the event in the corresponding relationship is greater than or equal to the playback frequency threshold, and store a storage path of the multimedia file or the courseware corresponding to the event in the corresponding relationship;
the fourth processing module is configured to send a correspondence between an event occurring in a room video corresponding to the room identifier and an event occurrence time to an interplanetary file system IPFS, so that the IPFS performs hash calculation on the correspondence to obtain a hash value of the correspondence, store the hash value of the correspondence obtained by the IPFS calculation in a block chain system where the server is located, and generate a correspondence between the hash value and the room identifier;
a fifth processing module, configured to generate a determination condition that the number of times of event playback reaches the playback number threshold according to the event stored in the cold storage device, and send the generated determination condition to the first node and the second node in the blockchain system;
a sixth processing module, configured to, when obtaining a determination result that the first node and the second node determine that the determination condition is different, notify a prediction machine that the first node and the second node need to deploy two intelligent contracts with the same condition but opposite results, so that the prediction machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes a chain operation of the first intelligent contract and the second intelligent contract;
and the execution module is used for respectively executing the first intelligent contract and the second intelligent contract when the playback times of the events stored in the cold storage device within the preset time length from the current time point are acquired.
In a third aspect, the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the method in the first aspect.
In a fourth aspect, embodiments of the present invention also provide an electronic device, which includes a memory, a processor, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor to perform the steps of the method according to the first aspect.
In the solutions provided in the first to fourth aspects of the embodiments of the present invention, after obtaining a room video to be processed, a server performs frame supplementing operation on the room video, sets key frames of the room video according to a preset time interval, queries, based on the room identifier, a correspondence between events occurring in the room video corresponding to the room identifier and event occurrence times, and stores the events with different playback times, respectively, and compared with a method in which only a video can be played when reviewing course content in related technologies, the method can show a student an event occurring when the event occurs in the room video according to the correspondence between the event occurring in the room video and the event occurrence time while reviewing the room video for the student, so that the student can review the course content completely, and improve user experience; moreover, the corresponding relation between the event occurring in the room video and the event occurrence time is subjected to hash calculation through the IPFS, and the obtained hash value is stored in the block chain system, so that the corresponding relation between the event occurring in the room video and the event occurrence time is stored through the IPFS, and the purpose of rapidly positioning and inquiring files is achieved; the hash value of the corresponding relation between the event occurring in the room video and the event occurrence time is managed through a block chain system interacting with the IPFS, and meanwhile, the data are guaranteed not to be tampered by malicious users; the defects that the storage of the on-line class data is not standard, credible and difficult to trace are overcome; moreover, the predicting machine generates a first intelligent contract and a second intelligent contract through two intelligent contracts with the same deploying conditions and opposite results of the predicting machine on a first node and a second node of the block chain system, the first intelligent contract is sent to the first node, and the second intelligent contract is sent to the second node, so that whether the playback frequency of the event stored in the cold storage device in the preset time length from the current time point reaches the playback frequency threshold value is judged through the first intelligent contract on the first node and the second intelligent contract on the second node, the interaction frequency of the predicting machine and the nodes can be reduced, the workload of the predicting machine is reduced, the execution efficiency and the safety of the predicting machine are improved, whether the results of the nodes are judged correctly by the intelligent contracts of the nodes respectively, and whether the playback frequency of the event reaches the playback frequency threshold value can be objectively confirmed, the situation that the judgment result is incorrect due to the fact that the prediction machine is bribered is avoided.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a room scene reproduction method according to embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram of a room scene reproduction apparatus provided in embodiment 2 of the present invention;
fig. 3 shows a schematic structural diagram of an electronic device provided in embodiment 3 of the present invention.
Detailed Description
At present, taking an online education scene as an example, a room is preset during online education and learning, and students needing online learning enter the room and then perform course learning. After the course is finished, the students need to review the course content, and great convenience can be provided for the students to review the course content by reproducing the room scene.
The scene reappearance implementation modes of the classroom in the industry mainly comprise the following modes: (1) the client records a room into a video in a screen recording mode, (2) the server only records a teacher video, and (3) the server splices the teacher and student videos in a screen mixing mode.
The scene reappearance implementation mode of the classroom in the industry mainly records the lecture content of a room or a teacher in the room into a video in a screen recording mode, generates a link of the video, and puts the link to a website for students needing to review the lecture content.
Only videos can be played when the course content is reviewed, so that students cannot review the course content completely.
Based on the room scene reproduction method and device and the electronic equipment, the server can play back the room video to the students, and simultaneously display the events to the students when the events occur in the room video according to the corresponding relation between the events and the event occurrence time, so that the students can completely review the course content, and the user experience is improved; moreover, the corresponding relation between the event occurring in the room video and the event occurrence time is subjected to hash calculation through the IPFS, and the obtained hash value is stored in the block chain system, so that the corresponding relation between the event occurring in the room video and the event occurrence time is stored through the IPFS, and the purpose of rapidly positioning and inquiring files is achieved; the hash value of the corresponding relation between the event occurring in the room video and the event occurrence time is managed through a block chain system interacting with the IPFS, and meanwhile, the data are guaranteed not to be tampered by malicious users; the defects that the storage of the on-line class data is not standard, credible and difficult to trace are overcome; moreover, the predicting machine generates a first intelligent contract and a second intelligent contract through two intelligent contracts with the same deploying conditions and opposite results of the predicting machine on a first node and a second node of the block chain system, the first intelligent contract is sent to the first node, and the second intelligent contract is sent to the second node, so that whether the playback frequency of the event stored in the cold storage device in the preset time length from the current time point reaches the playback frequency threshold value is judged through the first intelligent contract on the first node and the second intelligent contract on the second node, the interaction frequency of the predicting machine and the nodes can be reduced, the workload of the predicting machine is reduced, the execution efficiency and the safety of the predicting machine are improved, whether the results of the nodes are judged correctly by the intelligent contracts of the nodes respectively, and whether the playback frequency of the event reaches the playback frequency threshold value can be objectively confirmed, the situation that the judgment result is incorrect due to the fact that the prediction machine is bribered is avoided.
Before describing the room scene reproduction method, apparatus, and electronic device proposed by the present embodiment, an application scene is first described:
in the application scenario, the method comprises the following steps: IPFS, a prolog machine and nodes on the blockchain capable of interacting with the IPFS and the prolog machine respectively.
The nodes on the prediction machine and the blockchain may adopt any computing device capable of executing the blockchain technology in the prior art, and are not described in detail here.
The prediction machine can monitor the operation of the nodes on the block chain.
The server used by the online education website and the client used by the student (the term "client used by the student" is abbreviated as student) are required to be registered in the blockchain to become a node on the blockchain, after the server and the client are registered to become the node on the blockchain, the master node of the blockchain allocates a pair of public key and private key which are used cooperatively to the server and the student which become the node on the blockchain, and respectively sends the private keys allocated to the server and the student, so that the server and the student can use the private keys to perform signature operation. Wherein, a pair of public key and private key which are allocated to each node by the main node and are used together are unique.
Furthermore, the master node of the blockchain may assign node identifications to servers and students that become nodes of the blockchain. The node identification assigned to the server is called the server identification; the node identities assigned to students are called student identities.
Moreover, the master node may generate a correspondence between a node identifier and a pair of a public key and a private key that are allocated to a node corresponding to the node identifier and are used cooperatively, based on the node identifier and the pair of the public key and the private key that are allocated to the node corresponding to the node identifier and are used cooperatively.
In one embodiment, the master node may generate and store a correspondence between a student identity and a public and private key used in conjunction with a pair assigned to the student identity.
The content of the third-party related intelligent contracts processed by the first node and the second node in the blockchain in the application is described by the following contents:
the third-party related intelligent contract may be an intelligent contract which needs to be processed for the first node and the second node in the blockchain when the third-party mechanism executes the same event.
In one embodiment, the third-party related intelligent contract may be an intelligent contract that needs to be processed by the first node and the second node respectively when the third-party organization purchases the air ticket for the same event of whether to execute purchase delay insurance, or may be an intelligent contract that needs to be processed by the first node and the second node respectively when the third-party organization purchases the vehicle insurance for the same event of whether to execute purchase non-pay insurance.
Wherein the first node purchases the delay risk, thereby obtaining a first result representing the purchase of the delay risk; and the second node does not purchase the delay risk, thereby obtaining a second result indicating that the delay risk is not purchased. So that a first result and a second result are obtained with opposite results for executing the same event (the event of buying the delay risk).
In order to determine which of a first result obtained by a first node and a second result obtained by a second node is correct for the same event (the event of purchasing a delay risk), it is necessary to deploy an intelligent contract in the first node and the second node with the same conditions but with opposite results. The intelligent contract can judge which result is the correct result in the first result obtained by the first node and the second result obtained by the second node.
Therefore, in the following embodiments of the present application, the intelligent contract is used to determine a correct result in a first result obtained by the first node and a second result obtained by the second node after the first node and the second node respectively execute the same event with the same condition but opposite results.
In the following embodiments of the present application, the term "condition is the same" means for the same event.
In order to make the intelligent contract determine a correct result of the first result obtained by the first node and the second result obtained by the second node, two intelligent contracts with the same condition and the opposite results need to be deployed on the first node and the second node respectively.
The two intelligent contracts with the same condition but opposite results can be a first intelligent contract and a second intelligent contract.
The data structure of the IPFS bottom layer is constructed based on the Merkel directed acyclic graph, and the Hash calculation mode of the Merkel tree and the structure of the directed acyclic graph are integrated. Each node in the IPFS may store data and hash values pointing to its child nodes. The merkel directed acyclic graph has three characteristics: content addressing, using multiple hashes to uniquely identify files stored in data blocks of an IPFS; verifying the authenticity of the data, and confirming whether the data is tampered by checking the hash value; the repeated data can be easily removed because the hash of the data blocks with the same content is the same, and the storage space is saved.
And packaging and encrypting data of each node in the IPFS to obtain a hash address, storing the hash address in a block chain system, and packaging the original data by a data packaging method- > sha2-256 function calculation- > into a Multihash- > Base58 code conversion- > final hash address (namely CID). The hash address Qm calculated by IPFS starts. Furthermore, IPFS is a point-to-point distributed file system protocol.
In the protocol, the IPFS defines how files are stored, indexed and transmitted in the system, namely, uploaded files are converted into a special data format to be stored, and meanwhile the IPFS performs hash calculation on the same files to determine unique addresses of the files. So the same file will point to the same hash value anywhere, no matter on any device (unlike a URL, this address is native, guaranteed by the encryption algorithm, you cannot change, nor does you need to change). Each file stored in the IPFS network has a unique storage address (i.e., content address, also called CID) corresponding to the hash value, and the address is a hash value formed after an algorithm. The hash values are unique, and a user can locate the file and access the data in the file only by accessing the corresponding hash according to the content of the file. Therefore, the file stored in the IPFS can be directly obtained by utilizing the hash value, and the aim of quickly positioning the file is fulfilled. In addition, the original file is not linked, the storage space is saved, the content addressing is realized by an internal algorithm, once the data is tampered, the node hash address is changed, and the abnormal data can be quickly compared and found.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Example 1
Referring to a flowchart of a room scene reproduction method shown in fig. 1, the room scene reproduction method proposed in the present embodiment includes the following specific steps:
step 100, the server acquires a room video to be processed, wherein the room video is used for representing a video of a teacher in an online classroom.
The room video carries the room identification of the room, and the start time and the end time of the room video.
In step 100, the room video to be processed acquired by the server is the room video of the room of the finished online lesson. The room video carries the room identifier and the start time and the end time of the room video.
Moreover, the server records events and event occurrence time in the room video during the course of the teacher's lecture recorded by the room video. And after the room video is recorded, forming a corresponding relation between events in the room video and event occurrence time and storing the corresponding relation.
The events include: multimedia files and courseware displayed by the teacher during the course of the lecture and instant call records with the students.
The multimedia files include, but are not limited to: video files, audio files, and pictures. The courseware, including but not limited to: presentation (PowerPoint, ppt) and Portable Document Format (pdf).
And 102, performing frame supplementing operation on the room video, setting key frames of the room video according to a preset time interval, converting the room video subjected to the frame supplementing operation into a preset video format, and storing the video.
In the step 102, a specific process of performing frame interpolation on the room video and setting the key frames of the room video according to the preset time interval is the prior art, and is not described herein again.
The preset video format may be a WebM format.
In one embodiment, the preset time interval may be any length of time between 0.1 second and 1 second.
And 104, inquiring the corresponding relation between the event occurring in the room video corresponding to the room identification and the event occurrence time based on the room identification.
And 106, acquiring event playback information, wherein the event playback information is used for recording the playback times of the events in the corresponding relation in a preset time length before the current time point.
In step 106, the event playback information is cached in the server.
The preset time period may be a time period indicated by 24 hours, or may be set to any time period of 24 hours, 48 hours, or 72 hours.
And 108, when the playback frequency of the event is less than a playback frequency threshold, storing the multimedia file or the courseware corresponding to the event in the corresponding relationship into a hot storage device, when the playback frequency of the event in the corresponding relationship is more than or equal to the playback frequency threshold, storing the multimedia file or the courseware corresponding to the event in the corresponding relationship into a cold storage device, and storing the storage path of the multimedia file or the courseware corresponding to the event into the corresponding relationship.
In step 108, the thermal storage device has the characteristics of low access delay, high throughput and the like, and is suitable for service scenarios such as real-time access of a large number of hot spot files and frequent data interaction. High-reliability, high-availability and high-performance storage service can be provided for users.
The cold storage device has the characteristics of high reliability, low storage cost and low access delay, the first byte access time is kept at millisecond level, and the condition that a user does not need to wait in a data retrieval scene and reads data at high speed is guaranteed. The cold storage device is suitable for traffic scenarios with lower access frequencies, e.g. average 1 to 2 access frequencies per month.
And when the event is the instant call record, directly recording the event in the corresponding relation between the event occurring in the room video and the event occurrence time.
Step 110, sending the corresponding relationship between the event occurring in the room video corresponding to the room identifier and the event occurrence time to an IPFS, so that the IPFS performs hash calculation on the corresponding relationship to obtain a hash value of the corresponding relationship, storing the hash value of the corresponding relationship obtained by the IPFS calculation in a block chain system where the server is located, and generating the corresponding relationship between the hash value and the room identifier.
In the step 110, according to the characteristics of the IPFS, the hash value of the corresponding relationship is used to index the corresponding relationship between the event occurring in the room video corresponding to the room identifier stored in the IPFS itself and the event occurrence time. Namely, the IPFS can query the correspondence between the event occurring in the room video corresponding to the room identifier of which the hash value is obtained by calculation and the event occurrence time through the hash value.
And storing the corresponding relation between the hash value and the room identifier in a server.
And step 112, generating a judgment condition that the event playback frequency reaches the playback frequency threshold according to the events stored in the cold storage device, and sending the generated judgment condition to the first node and the second node in the blockchain system.
In step 112, the determination condition is a determination condition for determining whether the playback frequency of the event stored in the cold storage device within the preset time period from the current time point can reach the playback frequency threshold.
The first node and the second node in the blockchain system are any two nodes in the blockchain system.
After the first node and the second node obtain the judgment conditions, the first node and the second node respectively obtain judgment results obtained after the judgment conditions are judged by the first node and the second node, and the obtained judgment results are fed back to the server.
Step 114, when the first node and the second node obtain different judgment results when judging that the judgment conditions are different, notifying a prediction machine that the first node and the second node need to deploy two intelligent contracts with the same conditions but opposite results, so that the prediction machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract.
In step 114, when the determination result obtained from the first node indicates that the number of times of playback of an event in the events stored in the internal cooling storage device in the preset duration from the current time point can reach the playback number threshold, and the determination result obtained from the second node indicates that the number of times of playback of no event in the events stored in the internal cooling storage device in the preset duration from the current time point can reach the playback number threshold, the server may determine that the first node and the second node have obtained different determination results according to the determination conditions.
Before the presidenting machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract, the following steps can be executed:
the prediction machine broadcasts the generated prediction machine public key and the random number public key on the blockchain, so that the nodes on the blockchain receive and store the prediction machine public key and the random number public key.
In the above steps, the predicting machine generates the public key of the predicting machine by processing the private key of the predicting machine by the elliptic encryption algorithm.
And the private key of the prediction machine is distributed to the prediction machine by the main node of the block chain when the prediction machine is added into the block chain.
In order to generate the random number public key, the predicting machine needs to generate a random number through a random number generator stored in the predicting machine, and then process the random number by using an elliptic encryption algorithm to generate the random number public key.
After the public key of the prediction machine and the public key of the random number are generated, the prediction machine broadcasts the generated public key of the prediction machine and the generated public key of the random number on the block chain, so that the nodes on the block chain receive and store the public key of the prediction machine and the public key of the random number.
The presiding machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract, and the method comprises the following specific steps (1) to (5):
(1) when determining that a first node and a second node in a block chain need to deploy two intelligent contracts with the same conditions but opposite results, a presbyope receives a first contract public key and a first signature public key sent by the first node, and a second contract public key and a second signature public key sent by the second node;
(2) the presupposing machine utilizes the first contract public key and the second signature public key to form a first intelligent contract, utilizes the second contract public key and the first signature public key to form a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes the uplink operation of the first intelligent contract and the second intelligent contract;
(3) in order to generate a first contract public key, when the same judgment condition is judged by a second node in the block chain and a first result is obtained, the first node calculates a first predicted value through the following formula:
first predicted value = R-H (m1, R) × V
Wherein R represents a random number public key, m1 represents a first result, V represents a propheter public key, and H () represents a hash calculation;
(4) the first node obtains the first signature public key by using a first signature private key, and obtains a first contract public key through calculation of the first signature public key and the first predicted value;
(5) and the first node sends the first contract public key and the first signature public key obtained by calculation to the language predicting machine and receives a first intelligent contract sent by the language predicting machine.
In the step (1), the first contract public key is obtained by the first node processing the predicting machine public key, the random number public key, the first signature public key and the first result obtained by the first node; the second contract public key is obtained by the second node processing the predicting machine public key, the random number public key, the second signature public key and a second result obtained by the second node.
And respectively judging correct results in the first result obtained by the first node and the second result obtained by the second node through the two intelligent contracts.
In the above step (3), H (m1, R) represents that m1 and R are hashed.
H (m1, R) × V indicates that the operation result of the hash operation of m1 and R is multiplied by V.
In the step (4), the first public signature key is obtained by processing the first private signature key through an elliptic encryption algorithm.
The first node obtains a first contract public key by calculation according to the following formula:
first contract public key = first signature public key + first predictor
And the first signature private key is distributed to the first node by the main node of the block chain when the user becomes the node of the block chain.
Accordingly, to generate the second contract public key, the second node may perform steps (11) to (13) below:
(11) when the same event is executed with the first node in the block chain to obtain a second result, the second node calculates a second predicted value through the following formula:
second predicted value = R-H (m2, R) × V
Wherein R represents a random number public key, m2 represents a second result, V represents a propheter public key, and H () represents a hash calculation;
(12) obtaining a second signature public key by using a second signature private key, and calculating to obtain a second contract public key through the second signature public key and the second predicted value;
(13) and sending the second contract public key and the second signature public key obtained by calculation to the language predicting machine, and receiving a second intelligent contract sent by the language predicting machine.
In the above step (11), H (m2, R) represents that m2 and R are hashed.
In the step (12), the second public signature key is obtained by processing the second private signature key through an elliptic encryption algorithm.
The second node obtains a second contract public key by calculation according to the following formula:
second contract public key = second signature public key + second predictor
And the second signature private key is distributed to the second node by the main node of the block chain when the user becomes the node of the block chain.
The process of generating the second contract public key by the second node is similar to the process of generating the first contract public key by the first node, and is not described in detail here.
After the uplink operation of the first intelligent contract and the second intelligent contract is executed, the server can further execute the following steps (1) to (6):
(1) the server inquires the user information of the user to which the room identifier belongs according to the room identifier, and generates a playback link of the room video according to the room identifier, the inquired user information and the start time of the room video;
(2) when a student triggers a playback link, acquiring a room identifier in the playback link triggered by the student and a student identifier of the student, and inquiring a hash value of a room video in the playback link from a corresponding relation between the hash value and the room identifier;
(3) generating a query request of a corresponding relation between an event occurring in the room video in the playback link and event occurrence time by using a hash value of the room video in the playback link and a student identification, sending the query request to the student for signature operation, enabling the student to sign by using a private key distributed by a master node in a block chain system, and sending the signed query request to the server;
(4) receiving an inquiry request fed back by the student after signature operation, sending the inquiry request after signature operation to a main node to verify the validity of a signature, sending the inquiry request to an IPFS (Internet protocol multimedia platform) when receiving information which indicates that the inquiry request sent by the main node passes the validity verification, and inquiring the corresponding relation between an event and the event occurrence time in a room video in a playback link from the IPFS according to a hash value carried in the inquiry request;
(5) calculating a time difference value between the current time and the start time of the room video, and determining the occurrence time of the event recorded in the corresponding relation between the event occurring in the room video in the playback link and the event occurrence time after the current time point based on the time difference value;
(6) and playing the room video of the playback link to the student, and when the occurrence time of the event after the current time point is reached, taking out the multimedia file or the courseware corresponding to the event from the hot storage device or the cold storage device to show the multimedia file or the courseware to the student based on the storage path of the multimedia file or the courseware corresponding to the event recorded in the corresponding relation between the event occurring in the room video of the playback link and the occurrence time of the event.
In the step (1), the server is provided with a corresponding relationship between the room identifier and the user information of the user to which the room identifier belongs. Therefore, the room identifier is used to traverse the corresponding relationship between the room identifier and the user information of the user to which the room identifier belongs, so that the user information of the user to which the room identifier belongs can be inquired.
The specific process of generating the playback link of the room video according to the room identifier, the queried user information, and the start time of the room video is the prior art, and is not described herein again.
The server may place a playback link for the generated room video on an online education website.
In the step (2), when the student clicks the playback link of the room video set on the online education website, the playback link is triggered, so that the server can acquire the student identifier of the room video in the playback link to be played back, and acquire the room identifier of the room video in the playback link from the playback link triggered by the student.
And querying the hash value of the room video in the playback link from the corresponding relation between the hash value and the room identifier by using the room identifier in the playback link.
In the step (4), when receiving the query request after the signature operation sent by the server, the master node queries the public key assigned to the student corresponding to the student identifier from the corresponding relationship between the student identifier and the public key and the private key which are used in cooperation with the pair of students corresponding to the student identifier by using the student identifier carried in the query request, verifies the validity of the signature in the query request according to the public key assigned to the student, determines that the query request passes the validity verification when the signature in the query request can be decrypted by using the public key, and broadcasts information indicating that the query request passes the validity verification in the block chain system.
In the above step (5), the start time of the room video is obtained from the room video in the playback link, and the time difference between the current time and the start time of the room video is calculated.
In the step (6), when the event is an instant call record, the event is directly inquired from the corresponding relationship between the event occurring in the room video and the event occurrence time and is displayed to the student.
And recording the storage path of the event played back by the student and the playback times of the event.
When a student drags the progress bar, a client used by the student sends the position dragged by the progress bar to the server, the server compares the position before dragging after receiving the playing start position of a new room video, and if backspacing is found, event content which needs to be cleared after backspacing is arranged and sent to the client used by the student; if the event is found to go forward, the event content which needs to be reissued after going forward is sorted out and sent to the students, and the client used by the students receives the content which needs to be reissued and then displays the content which needs to be displayed at the current moment according to the event timestamp.
And after a preset time length from the current time point, inquiring the played back event stored in the cold storage device from the recorded storage path of the event played back by the student. Thus, the number of times of playback of the played back event stored in the cold storage device after the preset time period has elapsed from the current time point is determined. And sending the playback times of the played back events stored in the cold storage device to the prediction machine after the preset time length from the current time point.
And step 116, when the playback times of the events stored in the cold storage device within the preset time length from the current time point are obtained, respectively executing the first intelligent contract and the second intelligent contract.
In the step 116, the predicting machine continues to generate the predicting machine signature public key by using the predicting machine private key, the random number, and the playback frequency of the played back event stored in the cold storage device after the preset time length from the current time point is passed, and the generated predicting machine signature public key is respectively sent to the first node and the second node, so as to respectively execute the first intelligent contract and the second intelligent contract.
The executing the first and second intelligent contracts, respectively, includes: the first intelligent contract of the first node judges whether the first result is correct, and the second intelligent contract of the second node judges whether the second result is correct.
When the public key of the language predictive device signature is generated by using the private key of the language predictive device, the random number and the final change result of the event, the signature of the language predictive device can be firstly calculated by the following formula:
s=k−H(m,R)*v
where, s denotes the predictor signature,krepresenting a random number, m representing the final result of the event, R representing the random number public key,vrepresenting the speaker private key.
After the pre-speaker signature is obtained through the formula, the pre-speaker signature is processed through an elliptic encryption algorithm to generate a pre-speaker signature public key.
In one embodiment, the propheter signature public key may be represented by the following formula:
R-H(m,R)*V
as can be seen from the above, the first node sends the encrypted first contract public key and the encrypted first signature public key to the talker, and does not send the unencrypted first result to the talker; the second node sends a second contract public key and a second signature public key which are obtained after encryption to the language predicting machine, and does not send a second result to the language predicting machine; the method comprises the steps that a language predicting machine sends a first intelligent contract to a first node, a second intelligent contract is sent to a second node, when the final result of an event is obtained, the final result of the event is encrypted to generate a language predicting machine signature public key, then the language predicting machine signature public key generated by encryption is sent to the first node and the second node, and the final result of the event which is not encrypted is not sent to the first node and the second node; therefore, in the process of data interaction between the prediction machine and the first node and between the prediction machine and the second node, the data after encryption is interacted, and the safety of the implementation process of the room scene reproduction method provided by the embodiment is improved.
The first intelligent contract of the first node judges whether the first result is correct or not, and comprises the following steps (1) to (3):
(1) when a language predicting machine signature public key sent by the language predicting machine is received, the first node executes the first intelligent contract, and the first intelligent contract subtracts the first signature public key from a first contract public key to obtain the first predicted value;
(2) when the first predicted value is determined to be the same as the signed public key of the language predicting machine, determining that the first result is correct, and sending first result judgment correct information to the language predicting machine; after the prediction machine acquires the first result judgment correct information, the prediction machine sends the first result judgment correct information to a server;
(3) when the first predicted value is determined to be different from the signed public key of the language predicting machine, the first node determines that the first result is wrong and sends first result judgment error information to the language predicting machine; and after the prediction machine acquires the first result judgment error information, the prediction machine sends the first result judgment error information to a server.
In the step (2), when the first predicted value is determined to be the same as the public key of the dialer signature, which means that the first result is the same as the final change result of the event, the first node may determine that the first result is correct.
The second intelligent contract of the second node determines whether the second result is correct, and the process of determining whether the first result is correct is similar to the process of determining whether the second result is correct in the first intelligent contract of the first node, and is not described herein again.
In the room scene reproduction method proposed in this embodiment, the following steps (1) to (2) may be further performed:
(1) the server receives first result judgment correct information or first result judgment error information obtained by a first node sent by a prediction machine;
(2) and when the server determines that the playback frequency of the event stored in the cold storage device reaches the playback frequency threshold value within the preset time length from the current time point according to the first result judgment correct information or the first result judgment error information, the server stores the event of which the playback frequency reaches the playback frequency threshold value within the preset time length from the current time point in the cold storage device into the hot storage device.
In the step (2), when the server determines that the playback frequency of the event stored in the cold storage device reaches the playback frequency threshold within the preset time period from the current time point according to the first result judgment correct information or the first result judgment error information, after the preset time period elapses from the current time point, the playback frequency of the event stored in the cold storage device is compared with the playback frequency threshold, the event whose playback frequency reaches the playback frequency threshold within the preset time period from the current time point in the cold storage device is determined, and the event is stored in the hot storage device. Thereby speeding up the reading efficiency of the event with a large number of playback times.
In summary, according to the room scene reproduction method provided by this embodiment, after acquiring a room video to be processed, a server performs frame supplementing operation on the room video, sets key frames of the room video according to a preset time interval, queries, based on the room identifier, a correspondence between an event occurring in the room video corresponding to the room identifier and an event occurrence time, and stores events with different playback times respectively, and compared with a method in which only a video can be played when reviewing course content in the related art, the room video can be played back to a student, and simultaneously, according to the correspondence between the event occurring in the room video and the event occurrence time, the event occurring when the event occurs in the room video is also displayed to the student, so that the student can review complete course content, and user experience is improved; moreover, the corresponding relation between the event occurring in the room video and the event occurrence time is subjected to hash calculation through the IPFS, and the obtained hash value is stored in the block chain system, so that the corresponding relation between the event occurring in the room video and the event occurrence time is stored through the IPFS, and the purpose of rapidly positioning and inquiring files is achieved; the hash value of the corresponding relation between the event occurring in the room video and the event occurrence time is managed through a block chain system interacting with the IPFS, and meanwhile, the data are guaranteed not to be tampered by malicious users; the defects that the storage of the on-line class data is not standard, credible and difficult to trace are overcome; moreover, the predicting machine generates a first intelligent contract and a second intelligent contract through two intelligent contracts with the same deploying conditions and opposite results of the predicting machine on a first node and a second node of the block chain system, the first intelligent contract is sent to the first node, and the second intelligent contract is sent to the second node, so that whether the playback frequency of the event stored in the cold storage device in the preset time length from the current time point reaches the playback frequency threshold value is judged through the first intelligent contract on the first node and the second intelligent contract on the second node, the interaction frequency of the predicting machine and the nodes can be reduced, the workload of the predicting machine is reduced, the execution efficiency and the safety of the predicting machine are improved, whether the results of the nodes are judged correctly by the intelligent contracts of the nodes respectively, and whether the playback frequency of the event reaches the playback frequency threshold value can be objectively confirmed, the situation that the judgment result is incorrect due to the fact that the prediction machine is bribered is avoided.
Example 2
The room scene reproduction apparatus proposed in this embodiment is configured to execute the room scene reproduction method proposed in embodiment 1 above.
Referring to a schematic structural diagram of a room scene reproduction apparatus shown in fig. 2, the room scene reproduction apparatus proposed in this embodiment includes:
an obtaining module 200, configured to obtain a room video to be processed, where the room video is a video representing a lecture of a teacher in an online classroom;
the first processing module 202 is configured to perform frame supplementing operation on the room video, set a key frame of the room video according to a preset time interval, convert the room video subjected to the frame supplementing operation into a preset video format, and store the room video;
the second processing module 204 is configured to query, based on the room identifier, a correspondence between an event occurring in the room video corresponding to the room identifier and an event occurrence time; the events include: multimedia files and courseware displayed by the teacher in the course of teaching and instant call records between the teacher and students;
a second obtaining module 206, configured to obtain event playback information, where the event playback information is used to record playback times of events in the corresponding relationship within a preset time length before a current time point;
a third processing module 208, configured to store the multimedia file or the courseware corresponding to the event in the corresponding relationship in a hot storage device when the playback frequency of the event is less than a playback frequency threshold, store the multimedia file or the courseware corresponding to the event in the corresponding relationship in a cold storage device when the playback frequency of the event in the corresponding relationship is greater than or equal to the playback frequency threshold, and store a storage path of the multimedia file or the courseware corresponding to the event in the corresponding relationship;
a fourth processing module 210, configured to send a correspondence between an event occurring in a room video corresponding to the room identifier and an event occurrence time to an interplanetary file system IPFS, so that the IPFS performs hash calculation on the correspondence to obtain a hash value of the correspondence, store the hash value of the correspondence obtained by the IPFS calculation in a block chain system where a server is located, and generate a correspondence between the hash value and the room identifier;
a fifth processing module 212, configured to generate a judgment condition that the number of times of event playback reaches the playback number threshold according to the event stored in the cold storage device, and send the generated judgment condition to the first node and the second node in the blockchain system;
a sixth processing module 214, configured to, when the first node and the second node obtain different determination results when determining that the determination condition is different, notify a prediction machine that the first node and the second node need to deploy two intelligent contracts with the same condition but opposite results, so that the prediction machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes a chain operation of the first intelligent contract and the second intelligent contract;
the executing module 216 is configured to, when the number of times of playback of the event stored in the cold storage device within the preset time duration from the current time point is obtained, respectively execute the first intelligent contract and the second intelligent contract.
Specifically, the room video carries the room identifier of the room, and the start time and the end time of the room video; the room scene reproduction apparatus, further comprising:
the generating module is used for inquiring the user information of the user to which the room identifier belongs according to the room identifier and generating a playback link of the room video according to the room identifier, the inquired user information and the start time of the room video;
the triggering module is used for acquiring a room identifier in a playback link triggered by a student and a student identifier of the student when the student triggers the playback link, and inquiring a hash value of a room video in the playback link from a corresponding relation between the hash value and the room identifier;
the system comprises a sending module, a server and a block chain system, wherein the sending module is used for generating an inquiry request of a corresponding relation between an event occurring in a room video in a playback link and an event occurring time by utilizing a hash value of the room video in the playback link and a student identification, sending the inquiry request to the student for signature operation, enabling the student to sign by using a private key distributed by a master node in the block chain system, and sending the signed inquiry request to the server;
the receiving module is used for receiving the inquiry request fed back by the student after signature operation, sending the inquiry request after signature operation to the main node to verify the validity of the signature, sending the inquiry request to the IPFS when receiving the information which indicates that the inquiry request sent by the main node passes the validity verification, and inquiring the corresponding relation between the event generated in the room video in the playback link and the event generation time from the IPFS according to the hash value carried in the inquiry request;
the calculation module is used for calculating a time difference value between the current time and the starting time of the room video and determining the occurrence time of the event recorded in the corresponding relation between the event occurring in the room video in the playback link and the event occurrence time after the current time point based on the time difference value;
and the playing module is used for playing the room video of the playback link to the student, and when the occurrence time of the event after the current time point is reached, based on the storage path of the multimedia file or the courseware corresponding to the event recorded in the corresponding relation between the event occurring in the room video of the playback link and the event occurrence time, the multimedia file or the courseware corresponding to the event is taken out from the hot storage device or the cold storage device and displayed to the student.
The room scene reproduction apparatus proposed in this embodiment further includes:
the broadcast module is used for broadcasting the generated public key of the language prediction machine and the generated public key of the random number on the block chain, so that the nodes on the block chain receive and store the public key of the language prediction machine and the public key of the random number;
the presbyope machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract, wherein the method comprises the following steps:
when determining that a first node and a second node in a block chain need to deploy two intelligent contracts with the same conditions but opposite results, a presbyope receives a first contract public key and a first signature public key sent by the first node, and a second contract public key and a second signature public key sent by the second node;
the presupposing machine utilizes the first contract public key and the second signature public key to form a first intelligent contract, utilizes the second contract public key and the first signature public key to form a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes the uplink operation of the first intelligent contract and the second intelligent contract;
when the same judgment condition is judged by the second node in the block chain to obtain a first result, the first node calculates a first predicted value through the following formula:
first predicted value = R-H (m1, R) × V
Wherein R represents a random number public key, m1 represents a first result, V represents a propheter public key, and H () represents a hash calculation;
the first node obtains the first signature public key by using a first signature private key, and obtains a first contract public key through calculation of the first signature public key and the first predicted value;
and the first node sends the first contract public key and the first signature public key obtained by calculation to the language predicting machine and receives a first intelligent contract sent by the language predicting machine.
In summary, in the room scene playback device provided in this embodiment, after obtaining a room video to be processed, a server performs frame supplementing operation on the room video, sets key frames of the room video at preset time intervals, queries, based on the room identifier, a correspondence between an event occurring in the room video corresponding to the room identifier and an event occurrence time, and stores events with different playback times, respectively, and compared with a mode in which only a video can be played when reviewing course content in the related art, the room scene playback device can display an event occurring when the event occurs in the room video to a student according to the correspondence between the event occurring in the room video and the event occurrence time while the room video is being played back to the student, so that the student can review complete course content, and improve user experience; moreover, the corresponding relation between the event occurring in the room video and the event occurrence time is subjected to hash calculation through the IPFS, and the obtained hash value is stored in the block chain system, so that the corresponding relation between the event occurring in the room video and the event occurrence time is stored through the IPFS, and the purpose of rapidly positioning and inquiring files is achieved; the hash value of the corresponding relation between the event occurring in the room video and the event occurrence time is managed through a block chain system interacting with the IPFS, and meanwhile, the data are guaranteed not to be tampered by malicious users; the defects that the storage of the on-line class data is not standard, credible and difficult to trace are overcome; moreover, the predicting machine generates a first intelligent contract and a second intelligent contract through two intelligent contracts with the same deploying conditions and opposite results of the predicting machine on a first node and a second node of the block chain system, the first intelligent contract is sent to the first node, and the second intelligent contract is sent to the second node, so that whether the playback frequency of the event stored in the cold storage device in the preset time length from the current time point reaches the playback frequency threshold value is judged through the first intelligent contract on the first node and the second intelligent contract on the second node, the interaction frequency of the predicting machine and the nodes can be reduced, the workload of the predicting machine is reduced, the execution efficiency and the safety of the predicting machine are improved, whether the results of the nodes are judged correctly by the intelligent contracts of the nodes respectively, and whether the playback frequency of the event reaches the playback frequency threshold value can be objectively confirmed, the situation that the judgment result is incorrect due to the fact that the prediction machine is bribered is avoided.
Example 3
The present embodiment proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the room scene reproduction method described in embodiment 1 above. For specific implementation, refer to method embodiment 1, which is not described herein again.
In addition, referring to the schematic structural diagram of an electronic device shown in fig. 3, the present embodiment further provides an electronic device, where the electronic device includes a bus 51, a processor 52, a transceiver 53, a bus interface 54, a memory 55, and a user interface 56. The electronic device comprises a memory 55.
In this embodiment, the electronic device further includes: one or more programs stored on the memory 55 and executable on the processor 52, configured to be executed by the processor for performing the following steps (1) to (9):
(1) the method comprises the steps that a server obtains a room video to be processed, wherein the room video is used for representing a video of a teacher in an online classroom for teaching;
(2) performing frame supplementing operation on the room video, setting key frames of the room video according to a preset time interval, converting the room video subjected to the frame supplementing operation into a preset video format and storing the video;
(3) based on the room identification, inquiring the corresponding relation between the event occurring in the room video corresponding to the room identification and the event occurrence time; the events include: multimedia files and courseware displayed by the teacher in the course of teaching and instant call records between the teacher and students;
(4) acquiring event playback information, wherein the event playback information is used for recording the playback times of the events in the corresponding relation in a preset time length before the current time point;
(5) when the playback frequency of the event is less than the playback frequency threshold, storing the multimedia file or the courseware corresponding to the event in the corresponding relationship into a hot storage device, when the playback frequency of the event in the corresponding relationship is more than or equal to the playback frequency threshold, storing the multimedia file or the courseware corresponding to the event in the corresponding relationship into a cold storage device, and storing the storage path of the multimedia file or the courseware corresponding to the event into the corresponding relationship;
(6) sending the corresponding relation between the event occurring in the room video corresponding to the room identifier and the event occurrence time to an interplanetary file system (IPFS), so that the IPFS performs hash calculation on the corresponding relation to obtain a hash value of the corresponding relation, storing the hash value of the corresponding relation obtained by the calculation of the IPFS into a block chain system where a server is located, and generating the corresponding relation between the hash value and the room identifier;
(7) generating a judgment condition that the playback frequency of the event reaches the playback frequency threshold according to the event stored in the cold storage device, and sending the generated judgment condition to a first node and a second node in the block chain system;
(8) when the first node and the second node obtain different judgment results when judging that the judgment conditions are different, informing a prediction machine that the first node and the second node need to deploy two intelligent contracts with the same conditions but opposite results, so that the prediction machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract;
(9) and when the playback times of the events stored in the cold storage device within the preset time length from the current time point are acquired, executing the first intelligent contract and the second intelligent contract respectively.
A transceiver 53 for receiving and transmitting data under the control of the processor 52.
Where a bus architecture (represented by bus 51) is used, bus 51 may include any number of interconnected buses and bridges, with bus 51 linking together various circuits including one or more processors, represented by processor 52, and memory, represented by memory 55. The transceiver 53 may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. For example: the transceiver 53 receives external data from other devices. The transceiver 53 is used for transmitting data processed by the processor 52 to other devices. Depending on the nature of the computing system, a user interface 56, such as a keypad, display, speaker, microphone, joystick, may also be provided.
The processor 52 is responsible for managing the bus 51 and the usual processing, running a general-purpose operating system as described above. And memory 55 may be used to store data used by processor 52 in performing operations.
Alternatively, processor 52 may be, but is not limited to: a central processing unit, a singlechip, a microprocessor or a programmable logic device.
It will be appreciated that the memory 55 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory.
In some embodiments, memory 55 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 551 and application programs 552.
The operating system 551 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 552 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program implementing the method of an embodiment of the present invention may be included in the application 552.
In summary, in the computer-readable storage medium and the electronic device provided in this embodiment, after obtaining a room video to be processed, a server performs frame supplementing operation on the room video, sets key frames of the room video according to a preset time interval, queries, based on the room identifier, a correspondence between an event occurring in the room video corresponding to the room identifier and an event occurrence time, and stores events with different playback times respectively, and compared with a mode that only a video can be played when reviewing course content in related technologies, the room video can be played back to a student, and simultaneously, according to the correspondence between the event occurring in the room video and the event occurrence time, the event occurring when the event occurs in the room video is also displayed to the student, so that the student can review the course content completely, and user experience is improved; moreover, the corresponding relation between the event occurring in the room video and the event occurrence time is subjected to hash calculation through the IPFS, and the obtained hash value is stored in the block chain system, so that the corresponding relation between the event occurring in the room video and the event occurrence time is stored through the IPFS, and the purpose of rapidly positioning and inquiring files is achieved; the hash value of the corresponding relation between the event occurring in the room video and the event occurrence time is managed through a block chain system interacting with the IPFS, and meanwhile, the data are guaranteed not to be tampered by malicious users; the defects that the storage of the on-line class data is not standard, credible and difficult to trace are overcome; moreover, the predicting machine generates a first intelligent contract and a second intelligent contract through two intelligent contracts with the same deploying conditions and opposite results of the predicting machine on a first node and a second node of the block chain system, the first intelligent contract is sent to the first node, and the second intelligent contract is sent to the second node, so that whether the playback frequency of the event stored in the cold storage device in the preset time length from the current time point reaches the playback frequency threshold value is judged through the first intelligent contract on the first node and the second intelligent contract on the second node, the interaction frequency of the predicting machine and the nodes can be reduced, the workload of the predicting machine is reduced, the execution efficiency and the safety of the predicting machine are improved, whether the results of the nodes are judged correctly by the intelligent contracts of the nodes respectively, and whether the playback frequency of the event reaches the playback frequency threshold value can be objectively confirmed, the situation that the judgment result is incorrect due to the fact that the prediction machine is bribered is avoided.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention 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 invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A room scene reproduction method, comprising:
the method comprises the steps that a server obtains a room video to be processed, wherein the room video is used for representing a video of a teacher in an online classroom for teaching;
performing frame supplementing operation on the room video, setting key frames of the room video according to a preset time interval, converting the room video subjected to the frame supplementing operation into a preset video format and storing the video;
based on the room identification, inquiring the corresponding relation between the event occurring in the room video corresponding to the room identification and the event occurrence time; the events include: multimedia files and courseware displayed by the teacher in the course of teaching and instant call records between the teacher and students;
acquiring event playback information, wherein the event playback information is used for recording the playback times of the events in the corresponding relation in a preset time length before the current time point;
when the playback frequency of the event is less than the playback frequency threshold, storing the multimedia file or the courseware corresponding to the event in the corresponding relationship into a hot storage device, when the playback frequency of the event in the corresponding relationship is more than or equal to the playback frequency threshold, storing the multimedia file or the courseware corresponding to the event in the corresponding relationship into a cold storage device, and storing the storage path of the multimedia file or the courseware corresponding to the event into the corresponding relationship;
sending the corresponding relation between the event occurring in the room video corresponding to the room identifier and the event occurrence time to an interplanetary file system (IPFS), so that the IPFS performs hash calculation on the corresponding relation to obtain a hash value of the corresponding relation, storing the hash value of the corresponding relation obtained by the calculation of the IPFS into a block chain system where a server is located, and generating the corresponding relation between the hash value and the room identifier;
generating a judgment condition that the playback frequency of the event reaches the playback frequency threshold according to the event stored in the cold storage device, and sending the generated judgment condition to a first node and a second node in the block chain system;
when the first node and the second node obtain different judgment results when judging that the judgment conditions are different, informing a prediction machine that the first node and the second node need to deploy two intelligent contracts with the same conditions but opposite results, so that the prediction machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract;
and when the playback times of the events stored in the cold storage device within the preset time length from the current time point are acquired, executing the first intelligent contract and the second intelligent contract respectively.
2. The method of claim 1, wherein the room video carries a room identification of the room, and a start time and an end time of the room video;
before the steps of executing the first intelligent contract and the second intelligent contract respectively when the playback times of the events stored in the cold storage device within the preset time length from the current time point are obtained, the method further comprises the following steps:
the server inquires the user information of the user to which the room identifier belongs according to the room identifier, and generates a playback link of the room video according to the room identifier, the inquired user information and the start time of the room video;
when a student triggers a playback link, acquiring a room identifier in the playback link triggered by the student and a student identifier of the student, and inquiring a hash value of a room video in the playback link from a corresponding relation between the hash value and the room identifier;
generating a query request of a corresponding relation between an event occurring in the room video in the playback link and event occurrence time by using a hash value of the room video in the playback link and a student identification, sending the query request to the student for signature operation, enabling the student to sign by using a private key distributed by a master node in a block chain system, and sending the signed query request to the server;
receiving an inquiry request fed back by the student after signature operation, sending the inquiry request after signature operation to a main node to verify the validity of a signature, sending the inquiry request to an IPFS (Internet protocol multimedia platform) when receiving information which indicates that the inquiry request sent by the main node passes the validity verification, and inquiring the corresponding relation between an event and the event occurrence time in a room video in a playback link from the IPFS according to a hash value carried in the inquiry request;
calculating a time difference value between the current time and the start time of the room video, and determining the occurrence time of the event recorded in the corresponding relation between the event occurring in the room video in the playback link and the event occurrence time after the current time point based on the time difference value;
and playing the room video of the playback link to the student, and when the occurrence time of the event after the current time point is reached, taking out the multimedia file or the courseware corresponding to the event from the hot storage device or the cold storage device to show the multimedia file or the courseware to the student based on the storage path of the multimedia file or the courseware corresponding to the event recorded in the corresponding relation between the event occurring in the room video of the playback link and the occurrence time of the event.
3. The method of claim 1, wherein before the predicting machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and performs the uplink operation steps of the first intelligent contract and the second intelligent contract, further comprising:
the prediction machine broadcasts the generated prediction machine public key and the random number public key on the block chain, so that the nodes on the block chain receive and store the prediction machine public key and the random number public key;
the presbyope machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract, wherein the method comprises the following steps:
when determining that a first node and a second node in a block chain need to deploy two intelligent contracts with the same conditions but opposite results, a presbyope receives a first contract public key and a first signature public key sent by the first node, and a second contract public key and a second signature public key sent by the second node;
the presupposing machine utilizes the first contract public key and the second signature public key to form a first intelligent contract, utilizes the second contract public key and the first signature public key to form a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes the uplink operation of the first intelligent contract and the second intelligent contract;
when the same judgment condition is judged by the second node in the block chain to obtain a first result, the first node calculates a first predicted value through the following formula:
first predicted value = R-H (m1, R) × V
Wherein R represents a random number public key, m1 represents a first result, V represents a propheter public key, and H () represents a hash calculation;
the first node obtains the first signature public key by using a first signature private key, and obtains a first contract public key through calculation of the first signature public key and the first predicted value;
and the first node sends the first contract public key and the first signature public key obtained by calculation to the language predicting machine and receives a first intelligent contract sent by the language predicting machine.
4. The method of claim 3, wherein the executing the first intelligent contract and the second intelligent contract, respectively, comprises: the first intelligent contract of the first node judges whether the first result is correct or not, and the second intelligent contract of the second node judges whether the second result is correct or not;
the first intelligent contract of the first node, determining whether the first result is correct, includes:
when a language predicting machine signature public key sent by the language predicting machine is received, the first node executes the first intelligent contract, and the first intelligent contract subtracts the first signature public key from a first contract public key to obtain the first predicted value;
when the first predicted value is determined to be the same as the signed public key of the language predicting machine, determining that the first result is correct, and sending first result judgment correct information to the language predicting machine; after the prediction machine acquires the first result judgment correct information, the prediction machine sends the first result judgment correct information to a server;
when the first predicted value is determined to be different from the signed public key of the language predicting machine, the first node determines that the first result is wrong and sends first result judgment error information to the language predicting machine; and after the prediction machine acquires the first result judgment error information, the prediction machine sends the first result judgment error information to a server.
5. The method of claim 3, further comprising:
the server receives first result judgment correct information or first result judgment error information obtained by a first node sent by a prediction machine;
and when the correct information is judged according to the first result or the wrong information is judged according to the first result, and the fact that the playback times of the events stored in the cold storage device reach the playback time threshold value within the preset time length from the current time point is determined, storing the events of which the playback times reach the playback time threshold value within the preset time length from the current time point in the cold storage device into the hot storage device.
6. A room scene reproduction apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring room videos to be processed, and the room videos are used for representing videos of teachers in online classrooms;
the first processing module is used for performing frame supplementing operation on the room video, setting key frames of the room video according to a preset time interval, and converting the room video subjected to the frame supplementing operation into a preset video format and storing the room video;
the second processing module is used for inquiring the corresponding relation between the event occurring in the room video corresponding to the room identifier and the event occurring time based on the room identifier; the events include: multimedia files and courseware displayed by the teacher in the course of teaching and instant call records between the teacher and students;
the second acquisition module is used for acquiring event playback information, and the event playback information is used for recording the playback times of the events in the corresponding relation in a preset time length before the current time point;
a third processing module, configured to store the multimedia file or the courseware corresponding to the event in the corresponding relationship in a hot storage device when the playback frequency of the event is less than a playback frequency threshold, store the multimedia file or the courseware corresponding to the event in the corresponding relationship in a cold storage device when the playback frequency of the event in the corresponding relationship is greater than or equal to the playback frequency threshold, and store a storage path of the multimedia file or the courseware corresponding to the event in the corresponding relationship;
the fourth processing module is configured to send a correspondence between an event occurring in a room video corresponding to the room identifier and an event occurrence time to an interplanetary file system IPFS, so that the IPFS performs hash calculation on the correspondence to obtain a hash value of the correspondence, store the hash value of the correspondence obtained by the IPFS calculation in a block chain system where the server is located, and generate a correspondence between the hash value and the room identifier;
a fifth processing module, configured to generate a determination condition that the number of times of event playback reaches the playback number threshold according to the event stored in the cold storage device, and send the generated determination condition to the first node and the second node in the blockchain system;
a sixth processing module, configured to, when obtaining a determination result that the first node and the second node determine that the determination condition is different, notify a prediction machine that the first node and the second node need to deploy two intelligent contracts with the same condition but opposite results, so that the prediction machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes a chain operation of the first intelligent contract and the second intelligent contract;
and the execution module is used for respectively executing the first intelligent contract and the second intelligent contract when the playback times of the events stored in the cold storage device within the preset time length from the current time point are acquired.
7. The apparatus of claim 6, wherein the room video carries a room identifier of the room, and a start time and an end time of the room video;
the room scene reproduction apparatus, further comprising:
the generating module is used for inquiring the user information of the user to which the room identifier belongs according to the room identifier and generating a playback link of the room video according to the room identifier, the inquired user information and the start time of the room video;
the triggering module is used for acquiring a room identifier in a playback link triggered by a student and a student identifier of the student when the student triggers the playback link, and inquiring a hash value of a room video in the playback link from a corresponding relation between the hash value and the room identifier;
the system comprises a sending module, a server and a block chain system, wherein the sending module is used for generating an inquiry request of a corresponding relation between an event occurring in a room video in a playback link and an event occurring time by utilizing a hash value of the room video in the playback link and a student identification, sending the inquiry request to the student for signature operation, enabling the student to sign by using a private key distributed by a master node in the block chain system, and sending the signed inquiry request to the server;
the receiving module is used for receiving the inquiry request fed back by the student after signature operation, sending the inquiry request after signature operation to the main node to verify the validity of the signature, sending the inquiry request to the IPFS when receiving the information which indicates that the inquiry request sent by the main node passes the validity verification, and inquiring the corresponding relation between the event generated in the room video in the playback link and the event generation time from the IPFS according to the hash value carried in the inquiry request;
the calculation module is used for calculating a time difference value between the current time and the starting time of the room video and determining the occurrence time of the event recorded in the corresponding relation between the event occurring in the room video in the playback link and the event occurrence time after the current time point based on the time difference value;
and the playing module is used for playing the room video of the playback link to the student, and when the occurrence time of the event after the current time point is reached, based on the storage path of the multimedia file or the courseware corresponding to the event recorded in the corresponding relation between the event occurring in the room video of the playback link and the event occurrence time, the multimedia file or the courseware corresponding to the event is taken out from the hot storage device or the cold storage device and displayed to the student.
8. The apparatus of claim 6, further comprising:
the broadcast module is used for broadcasting the generated public key of the language prediction machine and the generated public key of the random number on the block chain, so that the nodes on the block chain receive and store the public key of the language prediction machine and the public key of the random number;
the presbyope machine generates a first intelligent contract and a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes uplink operation of the first intelligent contract and the second intelligent contract, wherein the method comprises the following steps:
when determining that a first node and a second node in a block chain need to deploy two intelligent contracts with the same conditions but opposite results, a presbyope receives a first contract public key and a first signature public key sent by the first node, and a second contract public key and a second signature public key sent by the second node;
the presupposing machine utilizes the first contract public key and the second signature public key to form a first intelligent contract, utilizes the second contract public key and the first signature public key to form a second intelligent contract, sends the first intelligent contract to the first node, sends the second intelligent contract to the second node, and executes the uplink operation of the first intelligent contract and the second intelligent contract;
when the same judgment condition is judged by the second node in the block chain to obtain a first result, the first node calculates a first predicted value through the following formula:
first predicted value = R-H (m1, R) × V
Wherein R represents a random number public key, m1 represents a first result, V represents a propheter public key, and H () represents a hash calculation;
the first node obtains the first signature public key by using a first signature private key, and obtains a first contract public key through calculation of the first signature public key and the first predicted value;
and the first node sends the first contract public key and the first signature public key obtained by calculation to the language predicting machine and receives a first intelligent contract sent by the language predicting machine.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of the claims 1 to 5.
10. An electronic device comprising a memory, a processor, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor to perform the steps of the method of any of claims 1-5.
CN202011284491.9A 2020-11-17 2020-11-17 Room scene reproduction method and device and electronic equipment Active CN112100281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011284491.9A CN112100281B (en) 2020-11-17 2020-11-17 Room scene reproduction method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011284491.9A CN112100281B (en) 2020-11-17 2020-11-17 Room scene reproduction method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112100281A CN112100281A (en) 2020-12-18
CN112100281B true CN112100281B (en) 2021-02-09

Family

ID=73784633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011284491.9A Active CN112100281B (en) 2020-11-17 2020-11-17 Room scene reproduction method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112100281B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105122789A (en) * 2012-12-12 2015-12-02 克劳德弗里克公司 Digital platform for user-generated video synchronized editing
CN105812813A (en) * 2016-03-21 2016-07-27 深圳宸睿科技有限公司 Teaching video compressing and playing methods, and compressing and playing devices
CN106803987A (en) * 2015-11-26 2017-06-06 腾讯科技(深圳)有限公司 The acquisition methods of video data, device and system
CN108093044A (en) * 2017-12-15 2018-05-29 中广热点云科技有限公司 A kind of training courseware playback method and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7005920B2 (en) * 2017-03-30 2022-01-24 ソニーグループ株式会社 Information processing equipment and information processing method
CN111008312A (en) * 2018-10-08 2020-04-14 上海风创信息咨询有限公司 Course reviewing method and system suitable for network teaching
CN109615961A (en) * 2019-01-31 2019-04-12 华中师范大学 A kind of classroom instruction classroom interactions network system and method
CN110602528B (en) * 2019-09-18 2021-07-27 腾讯科技(深圳)有限公司 Video processing method, terminal, server and storage medium
CN111526413A (en) * 2020-04-29 2020-08-11 江苏加信智慧大数据研究院有限公司 Course video playback system and playback method
CN111626902B (en) * 2020-05-30 2021-04-23 厦门致力于学在线教育科技有限公司 Online education management system and method based on block chain
CN111541554B (en) * 2020-07-13 2020-11-03 卓尔智联(武汉)研究院有限公司 Block chain data processing method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105122789A (en) * 2012-12-12 2015-12-02 克劳德弗里克公司 Digital platform for user-generated video synchronized editing
CN106803987A (en) * 2015-11-26 2017-06-06 腾讯科技(深圳)有限公司 The acquisition methods of video data, device and system
CN105812813A (en) * 2016-03-21 2016-07-27 深圳宸睿科技有限公司 Teaching video compressing and playing methods, and compressing and playing devices
CN108093044A (en) * 2017-12-15 2018-05-29 中广热点云科技有限公司 A kind of training courseware playback method and system

Also Published As

Publication number Publication date
CN112100281A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN110535660B (en) Evidence obtaining service system based on block chain
JP6293269B2 (en) Content viewing confirmation apparatus and method
CN110226317B (en) Data authentication method, device and system
CN110674140B (en) Block chain-based content processing method, device, equipment and storage medium
US20120036365A1 (en) Combining request-dependent metadata with media content
US20090083442A1 (en) Tracking Identifier Synchronization
US9055193B2 (en) System and method of a remote conference
CN103947175A (en) Terminal apparatus, server apparatus, information processing method, program, and linking application supply system
US20090157753A1 (en) System for realistically reproducing multimedia content and method thereof
CN104094554A (en) Implicit SSL certificate management without server name indication (SNI)
US11290256B2 (en) Blockchain-based advertisement monitoring method and apparatus, and electronic device
JP6760676B1 (en) Chatbot server device, learning device, chatbot system, chatbot server device operating method, learning device operating method, program, and recording medium
CN109151520B (en) Method, device, electronic equipment and medium for generating video
CN112100281B (en) Room scene reproduction method and device and electronic equipment
CN113067802B (en) User identification method, device, equipment and computer readable storage medium
CN112733167B (en) Electronic evidence data processing method and device, electronic equipment and storage medium
CN112182009B (en) Block chain data updating method and device and readable storage medium
CN102984282B (en) Intelligent terminal obtains the method and apparatus of the media data of cloud storage file
JP2013088927A (en) Authentication management device and authentication management method
CN116484137A (en) Data recovery method and device, electronic equipment and storage medium
CN110188546B (en) Teaching resource management method based on information base platform
US9681163B1 (en) Identify bad files using QoS data
US9742576B2 (en) Method for proof of play (PoP) of digital signage content
CN111582954B (en) False data identification method and device
CN102792328A (en) Method and apparatus for transmitting and receiving application/content based on purchase information

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