CN116880865A - Shared recording method and device, storage medium and electronic equipment - Google Patents

Shared recording method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116880865A
CN116880865A CN202310848920.8A CN202310848920A CN116880865A CN 116880865 A CN116880865 A CN 116880865A CN 202310848920 A CN202310848920 A CN 202310848920A CN 116880865 A CN116880865 A CN 116880865A
Authority
CN
China
Prior art keywords
recording
shared
request
program
recording request
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.)
Pending
Application number
CN202310848920.8A
Other languages
Chinese (zh)
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 Superred Technology Co Ltd
Original Assignee
Beijing Superred 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 Superred Technology Co Ltd filed Critical Beijing Superred Technology Co Ltd
Priority to CN202310848920.8A priority Critical patent/CN116880865A/en
Publication of CN116880865A publication Critical patent/CN116880865A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a shared recording method, a shared recording device, a storage medium and electronic equipment, wherein the method comprises the following steps: receiving a recording request sent by at least one terminal host, wherein the recording request carries data to be recorded; configuring the preloading module based on the burning request; processing the called ioctl function through the configured preloading module according to a preset rule, and determining whether the recording request passes or not; and if the recording request passes, controlling each shared recording device to record and write the data to be recorded based on the compiled shared recording program. After the recording request passes, the method calls the compiled shared recording program to control the shared recording equipment to record and write the data to be recorded carried by the recording request, thereby improving the safety of data recording and effectively avoiding data loss.

Description

Shared recording method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of data recording technologies, and in particular, to a shared recording method, a shared recording device, a storage medium, and an electronic apparatus.
Background
At present, along with the continuous development of technology and the continuous expansion of application environment, the burning becomes a popular data reading and writing mode, and the storage and the backup of data can be realized. Recording is also called burning, and desired data is burned into a medium such as an optical disc, a burning card (GBA), etc. by a tool such as a burner. The optical disc is used as a storage medium, has large capacity, stable quality and performance, is easy to store and small in volume, so that the data is recorded in the optical disc, is not easy to lose, is safer and more reliable, and has important significance for protecting the data.
In the related art, the data is recorded and stored mainly by a DVD recorder, and once a person uses the DVD recorder, the operation is improper, or the DVD recorder is improperly managed, so that the data is easily lost, thereby resulting in poor data recording security.
Disclosure of Invention
In order to improve the security of data recording, the application provides a shared recording method, a shared recording device, a storage medium and electronic equipment.
In a first aspect of the present application, a shared recording method is provided, where the shared host includes a domestic chip, a domestic Linux system, a shared recording program, and a preloading module, the domestic chip and the domestic Linux system are both adapted to the shared recording program, the shared host is connected with at least one shared recording device, and the shared host is connected with at least one terminal host, the method specifically includes:
Receiving a recording request sent by at least one terminal host, wherein the recording request carries data to be recorded;
configuring the preloading module based on the burning request;
processing the called ioctl function through the configured preloading module according to a preset rule, and determining whether the recording request passes or not;
and if the recording request passes, controlling each shared recording device to record and write the data to be recorded based on the compiled shared recording program.
By adopting the technical scheme, the environment formed by the domestic chip and the domestic Linux system is high in safety and reliability, so that the processing of the received recording request is very safe based on the shared host of the domestic chip and the domestic Linux system. And then before the data is recorded by utilizing the shared recording program, the ioctl function is processed through the configured preloading module, so that the recording request is analyzed, and whether the recording request is safe or not is judged, namely, whether the recording request passes or not is determined, if the recording request passes, the recording request is safe, finally, the compiled shared recording program is called, and the shared recording equipment is controlled to record the data to be recorded carried by the recording request, so that the safety of the data recording is improved, and the data loss is effectively avoided.
Optionally, after receiving the recording request sent by the at least one terminal host, the method further includes:
configuring a makefile script corresponding to the shared recording program through a preset configuration script;
and executing the configured makefile script based on the make command, and compiling the shared recording program to obtain the compiled shared recording program.
By adopting the technical scheme, after the recording request is received, the configuration script is utilized to configure the makefile script required by compiling the shared recording program, and because the makefile script is usually executed through the make command, the makefile script is operated to compile the shared recording program based on the make command, and finally the compiled shared recording program is obtained, so that the subsequent calling is convenient to realize the recording and writing of the data to be recorded.
Optionally, the terminal host is provided with a client corresponding to the shared recording program, and before the processing of the called ioctl function by the configured preloading module according to a preset rule, the method further includes:
obtaining login information of a target user login client corresponding to the terminal host;
and determining whether the target user has the recording authority according to the login information, and if so, adding the compiled shared recording program to a preset process white list.
By adopting the technical scheme, whether the corresponding target user has the recording authority is judged based on the login information, if the target user has the recording authority, the target user is indicated to have the CD-ROM recording use authority, and the safety is higher, and then the compiled shared recording program corresponding to the recording request is added to the process white list, so that whether the recording request passes or not can be conveniently and quickly determined according to the process white list.
Optionally, the processing, according to a preset rule, the called ioctl function through the configured preloading module, and determining whether the recording request passes or not specifically includes:
judging whether the byte length of the recording request is a preset first byte length or not, wherein the first byte length is used for judging whether the recording request is a recording operation request or not;
if yes, judging whether the byte length of the structure body of the called ioctl function is larger than a preset second byte length, wherein the second byte length is used for judging whether the recording request is a CD writing operation request or not;
if yes, searching whether the compiled shared recording program corresponding to the recording request exists in a preset process white list;
If yes, determining that the recording request passes, and if not, determining that the recording request does not pass.
By adopting the technical scheme, if the byte length of the recording request is the first byte length, the recording operation corresponding to the recording request is proved, then whether the byte length of the structure body of the ioctl function is larger than the second byte length is judged through the preloading module, and if the byte length is larger than the second byte length, the recording operation corresponding to the recording request is proved to be the optical disc writing operation, and based on the fact, the real recording operation corresponding to the recording request is further verified. Finally, if the compiled shared recording program corresponding to the recording request exists in the process white list, the target user is indicated to have the recording authority, and the recording request is confirmed to pass, otherwise, the recording request does not pass, so that the management of the recording authority is realized in the process of calling the compiled shared recording program to record data, and the security of the data recording is further improved.
Optionally, before receiving the recording request sent by the at least one terminal host, the method further includes:
receiving a shared recording device searching instruction sent by a terminal host;
determining available shared recording equipment from the shared recording equipment based on the shared recording equipment searching instruction;
If the recording request passes, controlling each shared recording device to record the data to be recorded based on the compiled shared recording program, including:
and if the recording request passes, controlling the available shared recording equipment in each shared recording equipment to record and write the data to be recorded based on the compiled shared recording program.
By adopting the technical scheme, after the target user searches the available shared recording program through the client corresponding to the shared recording program, the shared host receives the search instruction of the shared recording device, and the available shared recording device is selected from the connected shared recording programs, so that the available shared recording device is controlled to record the data to be recorded after the recording request passes.
Optionally, the method further comprises:
sequencing the recording requests according to the sequence of the request time to obtain a sequenced recording queue;
the configuring the preloading module based on the recording request specifically includes:
and sequentially selecting one target recording request from the sequenced recording queues according to the sequence from front to back, and configuring the preloading module based on the target recording request.
By adopting the technical scheme, when a plurality of recording requests are received, the ordered recording queues are determined, the earlier the request time of the recording requests is, the earlier the order in the recording queues is, the more the recording data to be recorded corresponding to the recording requests is input, so that the management of each recording request is realized.
Optionally, the configuring the preloading module based on the recording request specifically includes:
and configuring the preloading module through a preset preload script based on the burning request.
By adopting the technical scheme, the preload script loads the preload module in advance, so that the preload module can be directly called later without waiting for the loading of the preload module to be completed, and the calling efficiency is improved.
In a second aspect of the present application, a shared recording apparatus is provided, which specifically includes:
the system comprises a request receiving module, a recording module and a recording module, wherein the request receiving module is used for receiving a recording request sent by at least one terminal host, and the recording request carries data to be recorded;
the loading configuration module is used for configuring the preloading module based on the burning request;
the request judging module is used for processing the called ioctl function through the configured preloading module according to a preset rule and determining whether the recording request passes or not;
And the shared recording module is used for controlling each shared recording device to record and write the data to be recorded based on the compiled shared recording program if the recording request passes.
By adopting the technical scheme, the request receiving module acquires the recording request sent by at least one terminal host, the loading configuration module configures the preloading module in the shared host, then the request judging module processes the ioctl function through the configured preloading module according to the preset rule, so that whether the recording request passes or not is determined, finally, the shared recording module calls the compiled shared recording program to control the shared recording equipment to record the data to be recorded after the recording request passes, and therefore the security of data recording is improved.
In summary, the present application includes at least one of the following beneficial technical effects:
because the environmental security and reliability that domestic chip and domestic Linux system are constituteed are higher, consequently based on domestic chip and domestic Linux system's sharing host computer, the processing to the burning request of receiving is also very safe. And then before the data is recorded by utilizing the shared recording program, the ioctl function is processed through the configured preloading module, so that the recording request is analyzed, and whether the recording request is safe or not is judged, namely, whether the recording request passes or not is determined, if the recording request passes, the recording request is safe, finally, the compiled shared recording program is called, and the shared recording equipment is controlled to record the data to be recorded carried by the recording request, so that the safety of the data recording is improved, and the data loss is effectively avoided.
Drawings
FIG. 1 is a schematic diagram of a shared recording system according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for sharing recording according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an interface for recording applications according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of another method for sharing recording according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a determination of whether a recording request passes or not according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a shared recording apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another shared recording apparatus according to an embodiment of the present application.
Reference numerals illustrate: 11. a request receiving module; 12. loading a configuration module; 13. a request judging module; 14. a shared recording module; 15. a program compiling module; 16. a permission judging module; 17. an available query module; 18. and a request ordering module.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments.
In describing embodiments of the present application, words such as "exemplary," "such as" or "for example" are used to mean serving as examples, illustrations or explanations. Any embodiment or design described herein as "illustrative," "such as" or "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "illustratively," "such as" or "for example," etc., is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, the term "and/or" is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a alone, B alone, and both A and B. In addition, unless otherwise indicated, the term "plurality" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating an indicated technical feature. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Referring to fig. 1, an embodiment of the present application discloses an architecture schematic diagram of a shared recording system, which specifically includes: the system comprises a shared host, an end host and a shared recording device, wherein the shared host is connected with at least one shared recording device and at least one end host, and the connection mode can be a direct or indirect connection mode of a wired or wireless network. The end-host may be an electronic device such as a tablet computer, personal computer (PersonalComputer, PC), or the like. The shared host is a computer host in the embodiment of the application.
The shared host comprises a domestic chip, a domestic Linux system, a shared recording program and a preloading module. The domestic chip adopts a domestic 2000Arm architecture CPU, the domestic Linux system adopts a kylin V10 operating system, the shared recording equipment adopts a recorder, the shared recording program adopts an xrriso recording program, the shared recording program is a command line utility program for recording and extracting CD, DVD and blue-ray disc images, and in other embodiments, the shared recording program can also adopt Ones recording software. It should be noted that, both the domestic chip and the domestic Linux system are adapted to the shared recording program.
In addition, the domestic chip and the domestic Linux system have important progress in China, and have the advantages of high stability, high safety, high reliability and the like, so that the shared recording method disclosed by the application is applied to a shared host with the environment based on the environment of the domestic chip and the domestic Linux system, and has higher safety when recording data. In other embodiments, the method for sharing recording disclosed by the application can also be applied to a server.
Preloading means that some necessary program modules are loaded in advance when a program or a system is started so as to be able to respond and run faster in a subsequent operation. The pre-load module may be a node.js pre-load module or a NET pre-load module. In addition, the terminal host is also provided with a domestic chip and a domestic Linux system which are the same as the shared host, and a software client corresponding to the shared recording program is also installed to maintain the same host environment as the shared host.
Specifically, a user sends a recording request to a shared host through a terminal host, the shared host compiles a shared recording program after receiving the recording request, and after the recording request passes (the user has recording authority), the compiled shared recording program is called to control a shared recording device to carry out recording writing operation on data to be recorded carried in the recording request, so that the security is higher during data recording, and data loss or leakage is avoided.
Referring to fig. 2, a flow chart of a shared recording method is disclosed in the embodiment of the present application, which can be implemented by a computer program or can be run on a shared recording device based on von neumann system. The computer program can be integrated in an application or can be run as a stand-alone tool class application, and specifically comprises:
S101: and receiving a recording request sent by at least one terminal host.
Specifically, the recording request carries the data to be recorded, and the recording request is a remote request for recording the data to be recorded, which is sent by a user through a terminal host. As shown in fig. 3, one possible way to obtain the recording request is: because the terminal host is provided with the software client corresponding to the shared recording program, a user can log in the software client through the terminal host, and after entering the software client, the user can present a plurality of shared recording devices, select one shared recording device through the terminal host, click a recording application button, and the terminal host sends a recording request to the shared host, so that the shared host finally receives the recording request sent by at least one terminal host and corresponding data to be recorded. It should be noted that, in the embodiment of the present application, the recording request is mainly sent through the called ioctl function. The ioctl function is a function in the device driver that manages the I/O channels of the device. It is an attribute component in the file structure that a user can use to control the I/O channels of the device in the user program if the driver provides support for the ioctl function. The I/O channel can be used to read and write data when the recording request is received, so as to transmit the recording request and response to the sharing host.
In one implementation manner, before step S101, the method further includes: receiving a shared recording device searching instruction sent by a terminal host;
and determining available shared recording equipment from the shared recording equipment based on the shared recording equipment searching instruction.
Specifically, after a user logs in a software client corresponding to a shared recording program through a terminal host, clicking a 'search' button, and sending a shared recording device search instruction to the shared host by the terminal host, wherein the shared host receives the shared recording device search instruction, and searches available shared recording devices from all connected shared recording devices, so that the user can conveniently send a recording request corresponding to the available shared recording devices through the terminal host. One possible search method is: judging whether idle shared recording equipment exists in each shared recording equipment, if so, determining the idle shared recording equipment as available shared recording equipment, if not, counting the number of recording requests corresponding to each shared recording equipment, and when the number is smaller than a number threshold value, indicating that the number of recording tasks of the shared recording equipment corresponding to the recording requests initiated by a user is smaller, and determining the corresponding shared recording equipment as available shared recording equipment.
In one implementation manner, after step S101, the method further includes:
configuring a makefile script corresponding to the shared recording program through a preset configuration script;
based on the make command, executing the configured makefile script and compiling the shared recording program to obtain the compiled shared recording program.
Specifically, in the embodiment of the present application, the shared loader is xorriso, which requires makefile script for compiling and constructing. makefile is a file containing a series of rules that describe how programs are compiled and linked. It is typically executed by a command named make to automatically build the xorriso shared loader according to rules in makefile. Therefore, in the embodiment of the application, after receiving the recording request, the makefile script (makefile) is automatically configured according to different characteristics and configurations of the system through the preset configuration script, so that the compiling and construction of the shared recording program are more convenient and portable.
After the completion of the makefile script configuration, the makefile script is executed by inputting a make command, so that a preset gun compiler suite (gun compiler collection, gcc) compiler is called, and the shared burning program in the shared host is compiled, so that the compiled shared burning program is obtained. Gcc is a programming language compiler set developed by gun that supports multiple programming languages, including C, C ++, objective-C, fortran, ada, etc.
S102: and configuring a preloading module based on the recording request.
In one implementation, the preload module is configured by a pre-loaded script based on the recording request.
Specifically, the preload script is a mechanism for loading the dynamic link library in advance in the Linux system. The method has the function of loading the designated shared library into the memory in advance before the program runs so as to accelerate the loading speed of the program during running. The preset preload script is stored in the file directory/etc/ld.so.preload. In the embodiment of the application, after receiving the recording request, a preset preload script is called to configure the preloading module.
One possible configuration is: in the file directory/etc/ld.so.preload, a preload module is added to this file directory. For example, the preloading module is a wlhburn protect.so module, and the specific configuration process is as follows: and adding the configuration of the/usr/lib/wlhburn protection.so in the/etc/ld.so.preload file catalog, thereby realizing the effect of configuring the preloading module.
S103: and processing the called ioctl function through the configured preloading module according to a preset rule, and determining whether the recording request passes or not.
Specifically, after the configuration of the preloading module is completed, the byte length of the recording request (the type of the ioctl function structure body) is acquired for the called ioctl function, and one possible acquisition mode is as follows: the byte length of the recording request is obtained by using the HttpServletRequest object, if the byte length of the recording request is 8837, the recording request is aimed at requesting the recording operation on the optical disc, then the structure length of the ioctl function is detected, if the structure length is greater than 256 bytes, the recording request is aimed at requesting the data writing operation on the optical disc, and finally, the recording operation corresponding to the recording request is further determined. Where a structure (struct) refers to a series of data sets of the same type or different types of data, also called a structure (struct). The structure may contain different members, each of which may be a different type of data.
And finally, verifying whether the user corresponding to the recording request has recording authority, wherein the recording authority is the authority for recording by an optical drive and is set in advance. If the user corresponding to the recording request has the recording authority, the recording request is passed, and if the user corresponding to the recording request does not have the recording authority, the recording request is not passed. It should be noted that if the byte length of the recording request is not 8837 bytes, or the length of the structure of the ioctl function is not greater than 256 bytes, it is directly determined that the recording request does not pass.
S104: if the recording request passes, controlling each shared recording device to record the data to be recorded based on the compiled shared recording program.
In an implementation manner, if the recording request passes, the recording method controls the available shared recording devices in the shared recording devices to record the data to be recorded based on the compiled shared recording program.
Specifically, if the recording request passes, it is indicated that the recording request is actually a recording operation, and the corresponding user has recording authority, then the corresponding recording task output is allowed for the recording request. Namely, the compiled shared recording program is called to start available shared recording equipment in all shared recording equipment, and the data to be recorded is recorded and written, so that the effect of optical drive recording control is achieved.
Referring to fig. 4, a flow chart of a shared recording method is disclosed in the embodiment of the present application, which can be implemented by a computer program or can be run on a shared recording device based on von neumann system. The computer program can be integrated in an application or can be run as a stand-alone tool class application, and specifically comprises:
S201: and receiving a recording request sent by at least one terminal host.
S202: and configuring a preloading module based on the recording request.
Specifically, reference may be made to steps S101-S102, which are not described herein.
S203: and acquiring login information of a target user login client corresponding to the terminal host.
S204: and determining whether the target user has the recording authority according to the login information, and if so, adding the compiled shared recording program to a preset process white list.
In particular, a process whitelist (Process Whitelist) refers to a set of predefined process names or process IDs that are used to authorize which processes are allowed to run in an operating system or application. The white list technology has the effect of limiting the operation of only trusted processes, thereby increasing the security and stability of the system, wherein in the embodiment of the application, the process white list can prevent the operation of unauthorized shared burning programs, thereby reducing the risk of being attacked by malicious software during burning.
The process of sending the recording request by the target user through the terminal host is as follows: the target user inputs login information to log in a client corresponding to the shared recording program, and transmits a recording request, and the login information of the target user is acquired based on the shared host. Then, according to the login information, whether the target user has the recording authority is judged, and one feasible judgment mode is as follows: if the target user exists in the user permission table, the target user is indicated to have recording permission, and further the compiled shared recording program corresponding to the recording request can be authorized to run, and then the compiled shared recording program is added into a process white list; if the target user does not have the recording authority, the compiled shared recording program is not added into the process white list. The user permission list comprises a plurality of users with recording permissions.
S205: judging whether the byte length of the recording request is a preset first byte length.
Specifically, in the embodiment of the application, after the configuration of the preloading module is completed, a hook_ioctl is defined for the called ioctl function through the preloading module, and the hook_ioctl is used for intercepting and modifying equipment ioctl requests in a domestic Linux system so as to monitor the ioctl function. The hook_ioctl function is specifically as follows: hook_ioctl (fd, request, argp); fd is the device path; request is a currently executed parameter, and argp is a structure. The request is a recording request, and then the byte length of the recording request is detected, as shown in fig. 5, and it is determined whether the byte length is a first byte length, where the first byte length is used to determine whether the recording request corresponds to a recording operation, i.e. determine whether the recording request corresponds to the recording operation. In the embodiment of the present application, the first byte length may be 8837, and in other embodiments of the present application, other byte values may be used.
S206: if yes, judging whether the byte length of the structure body of the called ioctl function is larger than a preset second byte length.
S207: if yes, searching whether a compiled shared recording program corresponding to the recording request exists in a preset process white list.
S208: if the recording request exists, determining that the recording request passes, and if the recording request does not exist, determining that the recording request does not pass.
Specifically, the first byte length is used for judging whether the recording request is a recording operation request, if the byte length of the recording request is the first byte length, which indicates that the recording request corresponds to the recording operation, then the byte length of a "dxfer_len" field in the argp structure body is obtained, where dxfer_len represents the length of a user memory for data transmission, and one possible obtaining method is as follows: obtaining the byte length of the structure body through the sizeof operator, if the byte length of the structure body is larger than the second byte length, the second byte length is used for judging whether the structure body is a disc writing operation, indicating that the writing request corresponds to the disc writing operation, and finally determining that the writing request corresponds to the writing operation. The second byte length is used for judging whether the recording request is a disc writing operation request or not.
Finally, it is necessary to determine whether the target user has the recording authority, so as to determine whether to pass the recording request. Namely, searching whether a compiled shared recording program corresponding to the recording request exists in a process white list, and if so, determining that the corresponding target user has recording authority, and determining that the recording request passes; if the target user does not have the recording authority, determining that the recording request does not pass, and not arranging recording for the recording request. It should be noted that if the byte length of the recording request is not the first byte length, or the length of the structure of the ioctl function is not greater than the second byte length, it is directly determined that the recording request does not pass.
S209: if the recording request passes, controlling each shared recording device to record the data to be recorded based on the compiled shared recording program.
Specifically, reference may be made to step S104, which is not described herein.
In one implementation, each recording request is sequenced according to the sequence of the request time, and a sequenced recording queue is obtained;
based on the recording request, configuring a preloading module specifically comprises:
and sequentially selecting one target recording request from the ordered recording queues according to the sequence from front to back, and configuring a preloading module based on the target recording request.
Specifically, when the sharing host receives the recording requests sent by the plurality of terminal hosts, the recording requests are ordered according to the sequence of the request time of each recording request, the recording requests with the previous request time are ordered before, and finally the ordered recording queue is obtained. And sequentially selecting one target recording request from front to back in the ordered recording queue, processing the target recording request, recording the writing operation, and finally forming a recording electronic ledger according to the processed target recording request, thereby realizing effective management of each recording request.
In other embodiments, determining target users corresponding to each recording request, counting a first number of recording requests corresponding to each target user, then calculating a ratio of a second number to the first number of the same data to be recorded corresponding to the target user, if the ratio is greater than a ratio threshold, indicating that the target user sends more recording requests for the same data to be recorded, indicating that the target user is urgent for recording the data to be recorded, and then ordering the recording requests carrying the data to be recorded in an ordered recording queue to be adjusted upwards, namely, decreasing the ordering sequence number of the recording requests and improving the processing priority of the recording requests. Specifically, the adjustment amount can be determined according to the duty ratio, and the larger the duty ratio is, the larger the adjustment amount is, and the smaller the sorting sequence number after up-adjustment is.
If the duty ratio is not greater than the duty ratio threshold, further, counting the time interval of each recording request corresponding to the same data to be recorded, if the time interval is smaller than the interval threshold, indicating that the application time of the corresponding recording request is relatively close, further indicating that the recording requirement of the data to be recorded is relatively urgent, and then adjusting the ordering of the corresponding recording requests of the data to be recorded. Specifically, according to the difference between the interval threshold and the time interval, the larger the difference is, the larger the adjustment amount is, and the smaller the sequence number after up-regulation is.
The embodiment of the application shares the implementation principle of the recording method as follows: based on the domestic chip and the shared host of the domestic Linux system, the processing of the received recording request is very safe. Then before the data is recorded by the shared recording program, the ioctl function is processed through the configured preloading module, so that the recording request is analyzed, whether the recording request is safe or not is judged, namely, whether the recording request is passed or not is determined, if the recording request is passed, the recording request is safe, the compiled shared recording program is finally called, and the shared recording equipment is controlled to record the data to be recorded carried by the recording request, so that the safety of the data recording is improved
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 6 is a schematic structural diagram of a shared recording apparatus according to an embodiment of the present application. The application to the shared recording apparatus may be implemented as all or part of the apparatus by software, hardware, or a combination of both. The device 1 comprises a request receiving module 11, a loading configuration module 12, a request judging module 13 and a shared burning module 14.
The request receiving module 11 is configured to receive a recording request sent by at least one terminal host, where the recording request carries data to be recorded;
a loading configuration module 12, configured to configure the preloading module based on the recording request;
the request judging module 13 is configured to process the called ioctl function through the configured preloading module according to a preset rule, and determine whether the recording request passes;
the shared recording module 14 is configured to control each shared recording device to record the data to be recorded based on the compiled shared recording program if the recording request passes.
Optionally, as shown in fig. 7, the apparatus 1 further includes a program compiling module 15, specifically configured to:
configuring a makefile script corresponding to the shared recording program through a preset configuration script;
based on the make command, executing the configured makefile script and compiling the shared recording program to obtain the compiled shared recording program.
Optionally, the apparatus 1 further includes a permission judging module 16, specifically configured to:
obtaining login information of a target user login client corresponding to a terminal host;
and determining whether the target user has the recording authority according to the login information, and if so, adding the compiled shared recording program to a preset process white list.
Optionally, judging whether the byte length of the recording request is a preset first byte length, wherein the first byte length is used for judging whether the recording request is a recording operation request;
if yes, judging whether the byte length of the structure body of the called ioctl function is larger than a preset second byte length, wherein the second byte length is used for judging whether the recording request is a CD writing operation request or not;
if yes, searching whether a compiled shared recording program corresponding to the recording request exists in a preset process white list;
if the recording request exists, determining that the recording request passes, and if the recording request does not exist, determining that the recording request does not pass.
Optionally, the apparatus 1 further comprises an available query module 17, in particular for:
receiving a shared recording device searching instruction sent by a terminal host;
and determining available shared recording equipment from the shared recording equipment based on the shared recording equipment searching instruction.
Optionally, the shared recording module 14 is specifically configured to:
if the recording request passes, based on the compiled shared recording program, the available shared recording equipment in each shared recording equipment is controlled to record the data to be recorded.
Optionally, the apparatus 1 further comprises a request ordering module 18, specifically configured to:
Sequencing the recording requests according to the sequence of the request time to obtain a sequenced recording queue;
based on the recording request, configuring a preloading module specifically comprises:
and sequentially selecting one target recording request from the ordered recording queues according to the sequence from front to back, and configuring a preloading module based on the target recording request.
Optionally, the loading configuration module 12 is specifically configured to:
based on the burning request, the preloading module is configured through a preset preloading script.
It should be noted that, when the shared recording apparatus provided in the foregoing embodiment performs the shared recording method, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the embodiment of the present application provides a shared recording apparatus and a shared recording method embodiment, which are the same conception, and embody detailed implementation procedures in the method embodiment, and are not described herein again.
The embodiment of the application also discloses a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor, and the shared recording method of the embodiment is adopted.
The computer program may be stored in a computer readable medium, where the computer program includes computer program code, where the computer program code may be in a source code form, an object code form, an executable file form, or some middleware form, etc., and the computer readable medium includes any entity or device capable of carrying the computer program code, a recording medium, a usb disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunication signal, a software distribution medium, etc., where the computer readable medium includes, but is not limited to, the above components.
The method for sharing recording according to the above embodiment is stored in the computer readable storage medium and loaded and executed on the processor, so as to facilitate the storage and application of the method.
The embodiment of the application also discloses an electronic device, wherein a computer program is stored in a computer readable storage medium, and the shared recording method is adopted when the computer program is loaded and executed by a processor.
The electronic device may be an electronic device such as a desktop computer, a notebook computer, or a cloud server, and the electronic device includes, but is not limited to, a processor and a memory, for example, the electronic device may further include an input/output device, a network access device, a bus, and the like.
The processor may be a Central Processing Unit (CPU), or of course, according to actual use, other general purpose processors, digital Signal Processors (DSP), application Specific Integrated Circuits (ASIC), ready-made programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., and the general purpose processor may be a microprocessor or any conventional processor, etc., which is not limited in this respect.
The memory may be an internal storage unit of the electronic device, for example, a hard disk or a memory of the electronic device, or may be an external storage device of the electronic device, for example, a plug-in hard disk, a Smart Memory Card (SMC), a secure digital card (SD), or a flash memory card (FC) provided on the electronic device, or the like, and may be a combination of the internal storage unit of the electronic device and the external storage device, where the memory is used to store a computer program and other programs and data required by the electronic device, and the memory may be used to temporarily store data that has been output or is to be output, which is not limited by the present application.
The shared recording method of the embodiment is stored in the memory of the electronic device through the electronic device, and is loaded and executed on the processor of the electronic device, so that the shared recording method is convenient to use.
The above are merely exemplary embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (10)

1. The utility model provides a sharing method of burning, characterized by that is applied to sharing host computer, the sharing host computer includes domestic chip, domestic Linux system, sharing burning procedure and preloading module, domestic chip and domestic Linux system all with sharing burning procedure adaptation, sharing host computer is connected with at least one sharing equipment of burning, sharing host computer is connected with at least one end host computer, the method includes:
Receiving a recording request sent by at least one terminal host, wherein the recording request carries data to be recorded;
configuring the preloading module based on the burning request;
processing the called ioctl function through the configured preloading module according to a preset rule, and determining whether the recording request passes or not;
and if the recording request passes, controlling each shared recording device to record and write the data to be recorded based on the compiled shared recording program.
2. The method for shared recording as set forth in claim 1, further comprising, after receiving a recording request sent by at least one end host:
configuring a makefile script corresponding to the shared recording program through a preset configuration script;
and executing the configured makefile script based on the make command, and compiling the shared recording program to obtain the compiled shared recording program.
3. The method of claim 1, wherein the terminal host is provided with a client corresponding to the shared recording program, and before the processing of the invoked ioctl function by the configured preloading module according to a preset rule, the method further comprises:
Obtaining login information of a target user login client corresponding to the terminal host;
and determining whether the target user has the recording authority according to the login information, and if so, adding the compiled shared recording program to a preset process white list.
4. The method for shared recording as set forth in claim 3, wherein the determining whether the recording request passes through by processing the called ioctl function by the configured preloading module according to a preset rule specifically includes:
judging whether the byte length of the recording request is a preset first byte length or not, wherein the first byte length is used for judging whether the recording request is a recording operation request or not;
if yes, judging whether the byte length of the structure body of the called ioctl function is larger than a preset second byte length, wherein the second byte length is used for judging whether the recording request is a CD writing operation request or not;
if yes, searching whether the compiled shared recording program corresponding to the recording request exists in a preset process white list;
if yes, determining that the recording request passes, and if not, determining that the recording request does not pass.
5. The method for shared recording as set forth in claim 1, further comprising, before receiving a recording request sent by at least one end host:
receiving a shared recording device searching instruction sent by a terminal host;
determining available shared recording equipment from the shared recording equipment based on the shared recording equipment searching instruction;
if the recording request passes, controlling each shared recording device to record the data to be recorded based on the compiled shared recording program, including:
and if the recording request passes, controlling the available shared recording equipment in each shared recording equipment to record and write the data to be recorded based on the compiled shared recording program.
6. The method of shared burning as claimed in claim 1, further comprising:
sequencing the recording requests according to the sequence of the request time to obtain a sequenced recording queue;
the configuring the preloading module based on the recording request specifically includes:
and sequentially selecting one target recording request from the sequenced recording queues according to the sequence from front to back, and configuring the preloading module based on the target recording request.
7. The method of claim 1, wherein configuring the preloading module based on the recording request specifically comprises:
and configuring the preloading module through a preset preload script based on the burning request.
8. A shared recording apparatus, comprising:
a request receiving module (11) for receiving a recording request sent by at least one terminal host, wherein the recording request carries data to be recorded;
a loading configuration module (12) for configuring the preloading module based on the recording request;
the request judging module (13) is used for processing the called ioctl function through the configured preloading module according to a preset rule to determine whether the recording request passes or not;
and the shared recording module (14) is used for controlling each shared recording device to record and write the data to be recorded based on the compiled shared recording program if the recording request passes.
9. A computer readable storage medium, in which a computer program is stored, characterized in that the method according to any one of claims 1-7 is used when the computer program is loaded and executed by a processor.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, characterized in that the method according to any one of claims 1-7 is used when the computer program is loaded and executed by the processor.
CN202310848920.8A 2023-07-11 2023-07-11 Shared recording method and device, storage medium and electronic equipment Pending CN116880865A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310848920.8A CN116880865A (en) 2023-07-11 2023-07-11 Shared recording method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310848920.8A CN116880865A (en) 2023-07-11 2023-07-11 Shared recording method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116880865A true CN116880865A (en) 2023-10-13

Family

ID=88263869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310848920.8A Pending CN116880865A (en) 2023-07-11 2023-07-11 Shared recording method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116880865A (en)

Similar Documents

Publication Publication Date Title
CN109711168B (en) Behavior-based service identification method, behavior-based service identification device, behavior-based service identification equipment and readable storage medium
US10242186B2 (en) System and method for detecting malicious code in address space of a process
US9680763B2 (en) Controlling distribution of resources in a network
RU2589852C2 (en) System and method for automatic regulation of rules for controlling applications
EP2704004B1 (en) Computing device having a dll injection function, and dll injection method
US10586076B2 (en) System and method for controlling access to OS resources
US11132436B2 (en) FPGA cloud host development method and system
US9819695B2 (en) Scanning method and device, and client apparatus
CN107203715B (en) Method and device for executing system call
CN110555293A (en) Method, apparatus, electronic device and computer readable medium for protecting data
CN104036194A (en) Vulnerability detection method and device for revealing private data in application program
EP3709199A1 (en) Container security policy handling method and related device
EP2113859A1 (en) Computer, operation rule application method, and operating system
RU2491623C1 (en) System and method of verifying trusted files
US11240044B2 (en) Verifying purpose of data usage at sub-application granularity
CN113467895B (en) Docker operation method, docker operation device, server and storage medium
CN111078367A (en) Request processing method and device, electronic equipment and storage medium
US20070038572A1 (en) Method, system and computer program for metering software usage
CN116880865A (en) Shared recording method and device, storage medium and electronic equipment
CN114979125B (en) Method, device, terminal and storage medium for rapidly uploading files to network disk
CN111885184A (en) Method and device for processing hot spot access keywords in high concurrency scene
US9684660B2 (en) File processing method and system
US11656861B2 (en) Selectively installing applications based on manifest files
EP3151154B1 (en) Data access control based on storage validation
Zhang et al. Device-centric federated analytics at ease

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