Text editor based on authorization management
By introducing authorization management module, authorization module and editing module in the text editor, the file editing security issues caused by password leakage are solved, and the legality authentication and history of file editing are realized to ensure data security and editing activities are achievable. Retrospective.
Patent Information
- Application Number
- CN202411477285.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2024-12-31
AI Technical Summary
In Linux operating systems, if the password is leaked when the file permissions do not match, the file may be modified at will and the source of the leakage cannot be tracked, which poses a security risk.
Design a text editor based on authorization management, authorize account through management module, authorize storage media, and edit module perform media authentication to ensure that only legally authorized users and media can edit files and record editing history for traceability. .
It effectively prevents the random editing of files caused by password leakage, ensures data security, and records the file editing history to facilitate traceability of editing activities.
Smart Images

Figure CN119227648A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text editors, and in particular to a text editor based on authorization management. Background Art
[0002] Text editors are indispensable tools in the computer field. From the early Notepad and WPS to the modern Rich Text Editor (RTE), and then to the cloud-based online editor, text editors have undergone continuous development and evolution. With the continuous advancement of technology, the functions of text editors are becoming increasingly rich, such as the WYSIWYG editing interface, support for multiple fonts and formats, and embedding of pictures and links, which greatly enhance the user's editing experience.
[0003] In the production and processing of CNC systems, some files need to be modified for processing and debugging. In the Linux operating system, files are controlled by the operating system, and cannot be edited if the permissions do not match. When switching permissions through passwords, if the password is leaked, the file can be changed at will, which poses unpredictable risks and makes it impossible to track the source of the leak. Summary of the invention
[0004] The purpose of the present invention is to provide a text editor based on authorization management, which can solve one or more of the above-mentioned problems in the prior art.
[0005] A text editor based on authorization management, including:
[0006] A management module, wherein the management module includes an account authorization platform, which is responsible for adding an authorized account, setting the number of authorizations, and sending authorization information to the server and the authorization end respectively. The authorized account includes an authorized account and an authorized password, and the authorization information includes an authorized account, an authorized password, and the number of authorizations;
[0007] An authorization module, wherein the authorization module can log in to a media authorization platform through the authorization account and the authorization password, and the media authorization platform is used to authorize the storage medium to obtain the authorized medium;
[0008] The editing module includes a medium authentication platform, and the medium authentication platform is used to authenticate the medium; if the authentication is passed, editing is allowed; if the authentication is not passed, editing is not allowed.
[0009] In some implementations, the step of the media authorization platform authorizing the storage medium includes:
[0010] Query the server for authorization information corresponding to the authorized account, wherein the authorization information includes the remaining number of authorizations;
[0011] Determine whether the remaining number of authorizations is greater than 0;
[0012] If yes, scan the storage medium, obtain the MAC ID of the storage medium, and set the validity period;
[0013] Confirm the authorization.
[0014] In some implementations, the step of confirming the authorization further includes:
[0015] The authorization account, operation terminal account, MAC ID and validity period are encrypted into ciphertext and stored in the storage medium.
[0016] In some implementations, the step of confirming the authorization further includes:
[0017] The authorized account, MAC ID, validity period, current IP, and operating terminal account are sent to the server and stored.
[0018] In some implementations, after the step of determining whether the number of authorizations in the authorization information is greater than 0, the step further includes:
[0019] If not, a message is sent to the authorization end, and re-authorization is applied to the management end through the authorization end.
[0020] In some implementations, the step of the medium authentication platform authenticating the medium includes:
[0021] Monitor whether the medium is connected;
[0022] If the medium exists, obtain the MAC ID of the newly inserted medium and compare it with the currently recorded medium ID;
[0023] If they are consistent, compare the computer's RTC time with the validity period;
[0024] If the time is valid, the authentication is passed and editing is allowed; if the time exceeds the limit, the authentication fails and editing is not allowed.
[0025] In some implementations, the step of monitoring whether the medium is accessed further includes:
[0026] If the medium does not exist, the inserted medium ID is empty and the validity period is an invalid value.
[0027] In some implementations, the step of obtaining the MAC ID of the newly inserted medium and comparing it with the currently recorded medium ID further includes:
[0028] If they are inconsistent, the inserted media ID is the MAC ID of the newly inserted media;
[0029] Decrypt the ciphertext of the newly inserted medium;
[0030] If decryption fails, the inserted validity period is an invalid value;
[0031] If the decryption is successful, the media ID is compared with the MAC ID of the ciphertext;
[0032] If the IDs are inconsistent, the inserted validity period is an invalid value;
[0033] If the IDs are consistent, the authorized account, operating terminal account, MAC ID, and validity period will be recorded in the operation log, and the validity period will be updated.
[0034] In some implementations, the management module further includes a log query platform, which is responsible for authorization information retrieval.
[0035] In some implementations, the log query platform is responsible for the steps of retrieving authorization information including:
[0036] Get the packaging operation log sent by the editing module and parse it to get the MAC ID;
[0037] Query the server through MAC ID to obtain authorization information;
[0038] Exporting Authorization Information
[0039] The beneficial effects of the present invention are as follows: the text editor of the present invention authorizes the storage medium through the authorization module and authenticates the medium through the editing module. When the authorization authentication passes, the text can be edited; when the authentication fails, the text cannot be edited, thus solving the problem of files being edited arbitrarily due to password leakage. At the same time, the editing history of the file is recorded to facilitate historical tracing. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a structural block diagram of a text editor based on authorization management provided in an embodiment of the present application;
[0041] Figure 2 yes Figure 1 A schematic diagram of the interaction between the management module and the authorization module of the text editor shown;
[0042] Figure 3 yes Figure 1 The editing module of the text editor shown performs the media authentication step;
[0043] Figure 4 yes Figure 1 A schematic diagram of the interaction between the editing module and the management module of the text editor shown;
[0044] Numbers in the figure: 1. Management module; 11. Account authorization platform; 12. Log query platform; 2. Authorization module; 21. Media authorization platform; 3. Editing module; 31. Media authentication platform. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0046] Combination Figure 1 As shown, this embodiment provides a text editor based on authorization management, including: management module 1, authorization module 2 and editing module 3. Management module 1 is responsible for account authorization, authorization module 2 is responsible for media authorization, and editing module 3 is responsible for media authentication. Specifically, management module 1 includes account authorization platform 11, account authorization platform 11 is responsible for adding authorized accounts, setting the number of authorizations, and sending authorization information to the server and authorization end respectively. The authorized account includes the authorized account and the authorized password, and the authorization information includes the authorized account, the authorized password and the number of authorizations; the authorization module 2 can log in to the media authorization platform 21 through the authorized account and the authorized password, and the media authorization platform 21 is used to authorize the storage medium to obtain the authorized medium; the editing module 3 includes the authentication platform 31, and the authentication platform 31 is used to authenticate the medium; if the authentication is passed, editing is allowed; if the authentication is not passed, editing is not allowed.
[0047] The text editor of this application performs account authorization through the management module, media authorization through the authorization module, and media authentication through the editing module. If the authorization authentication passes, the text can be edited; if the authentication fails, the text cannot be edited. This solves the problem of files being edited arbitrarily due to password leakage. At the same time, it records the editing history of the file for easy historical tracing.
[0048] Specific, combined Figure 2 As shown, the steps of the media authorization platform 21 authorizing the storage medium include:
[0049] S11, querying the authorization information corresponding to the authorized account in the server, wherein the authorization information includes the remaining number of authorizations;
[0050] S12, determine whether the remaining number of authorizations is greater than 0;
[0051] S131, if yes, scan the storage medium, obtain the MAC ID of the storage medium, and set the validity period;
[0052] S132, if not, send information to the authorization end, and apply for re-authorization from the management end through the authorization end;
[0053] S14. Confirm authorization.
[0054] In the above steps S11-S14, the authorization module 2 can interact with the server to complete the authorization of the storage medium. Specifically, the authorization officer logs in to the authorization module 2 through the authorization account and authorization password provided by the management module 1, and enters the media authorization platform 21 after the server verifies it. Then, the storage medium to be authorized is selected on the media authorization platform 21, and then the authorization information corresponding to the authorization account in the server is queried. The authorization information includes the remaining number of authorizations. It should be noted here that the remaining number of authorizations is the key data for determining whether to authorize the storage medium. If the remaining number of authorizations is greater than 0, the storage medium is scanned to obtain the MAC ID of the storage medium and set the validity period. The MAC ID is the unique identifier of the storage medium, which can ensure the uniqueness and accuracy of the authorization. After confirming that all necessary information (such as the remaining number of authorizations, MAC ID, validity period, etc.) is correct, the media authorization platform 21 formally confirms the authorization and delivers the authorized medium to the operator. If the remaining number of authorizations is equal to 0, the conditions for authorizing the storage medium are not met, and a message is sent to the authorization officer of the authorization end to prompt the user the reason for re-authorization and guide the user to apply for re-authorization from the management end. Therefore, the authorization module 2 of the present invention can perform authorization management on the storage medium more efficiently and securely.
[0055] Furthermore, after the above step S14, the following steps are further included:
[0056] S15. Send the authorization account, MAC ID, validity period, current IP and operation terminal account to the server and store them.
[0057] In the above step S15, the authorized account, MAC ID, validity period, current IP and operating terminal account are sent to the server and stored, and the relevant information of the authorized operation can be recorded and stored on the server for subsequent tracking, auditing and management. Among them, the recording of media information facilitates the management platform to query the source of the media through the media information.
[0058] Furthermore, after the above step S14, the following steps are further included:
[0059] S16. Encrypt the authorization account, operation terminal account, MAC ID and validity period into ciphertext and store them in a storage medium.
[0060] In the above step S16, encrypting the authorization account, operation terminal account, MAC ID and validity period into ciphertext and storing them in the storage medium is an important measure to ensure data security, so that key information is fully protected during the storage process, thereby reducing the risk of data leakage and tampering. At the same time, this also provides strong support for subsequent media authentication.
[0061] Furthermore, the management module 1 also includes a log query platform 12, which is responsible for authorization information retrieval.
[0062] Specific, combined Figure 4 As shown, the steps of the log query platform 12 responsible for authorization information retrieval include:
[0063] S31, obtaining the packaging operation log sent by the editing module 3, and parsing to obtain the MAC ID;
[0064] S32, query the server through the MAC ID to obtain authorization information;
[0065] S33. Export authorization information.
[0066] The log query platform 12 of the present invention plays a vital role. It obtains and parses the packaging operation log, extracts the MAC ID, obtains the authorization information through the server query, and finally exports the authorization information, providing a powerful authorization information retrieval function for the management module. This helps managers to monitor and manage the authorization situation in real time to ensure the security and compliance of the system. Specifically, the log query platform 12 first receives the packaging operation log from the editing module 3. Then, the log query platform 12 will parse the packaging operation log to extract the MAC ID information therein. After obtaining the MAC ID, the log query platform 12 will use this identifier to send a query request to the server. After receiving the query request, the server will retrieve the corresponding authorization information in the database according to the MAC ID. After querying the authorization information, the log query platform 12 will export this information to a specified location or format. The exported authorization information can be used for subsequent analysis, auditing or management.
[0067] Specific, combined Figure 3 As shown, the steps of authenticating the medium by the authentication platform 31 include:
[0068] S21, monitoring whether the medium is connected;
[0069] S221. If the medium does not exist, the inserted medium ID is empty and the validity period is an invalid value;
[0070] S222, if the medium exists, obtain the MAC ID of the newly inserted medium and compare it with the currently recorded medium ID;
[0071] S231, if they are consistent, compare the computer's RTC time with the validity period;
[0072] S24. If the time is valid, the authentication is passed and editing is allowed; if the time is exceeded, the authentication is not passed and editing is not allowed.
[0073] In the above steps S21-S24, the authentication platform 31 will continuously monitor whether a storage medium is inserted into the interface connected to it. Once the medium is detected to be inserted, the authentication platform 31 will try to read the MAC ID of the medium and compare it with the currently recorded medium ID. If the MAC ID of the newly inserted medium is consistent with the currently recorded medium ID, the authentication platform 31 will use the computer's RTC time to compare with the validity period stored in the medium. If the time comparison result shows that the current time is within the validity period, the authentication is passed and the medium is allowed to be edited. If the time exceeds the limit (that is, the current time exceeds the validity period), the authentication fails and the editing request is rejected to ensure that only legal and valid media can be edited, thereby protecting the integrity and security of the data. It should be noted here that the computer's RTC time is different from the operating system time. The computer's RTC time refers to the time obtained from the RTC chip, and this time is still accurately updated after the system is shut down. At the same time, modifying the operating system RTC time is not affected. Obtaining the RTC time can effectively solve the problem of the operator modifying the operating system time so that the originally expired authorized medium does not expire.
[0074] Furthermore, in the above step S222, after the step of obtaining the MAC ID of the newly inserted medium and comparing it with the currently recorded medium ID, the following steps are further performed:
[0075] S2321. If they are inconsistent, the inserted medium ID is the MAC ID of the newly inserted medium;
[0076] S2322, decrypting the ciphertext of the newly inserted medium;
[0077] S23231. If decryption fails, insert the validity period as an invalid value;
[0078] S23232. If the decryption is successful, the ID of the newly inserted medium is compared with the MAC ID of the ciphertext;
[0079] S23241. If the IDs are inconsistent, the inserted validity period is an invalid value;
[0080] S23242. If the IDs are consistent, the authorization account, operation terminal account, MAC ID, and validity period are recorded in the operation log, and the validity period is updated.
[0081] In the above steps S2321-S2324, if the MAC ID of the newly inserted medium is inconsistent with the currently recorded medium ID, it means that a new medium is inserted, and the authentication platform 31 inserts the MAC ID of the newly inserted medium into the medium ID. Then the authentication platform 31 will try to decrypt the ciphertext of the newly inserted medium to obtain the authorization information therein. If the decryption is successful, the MAC ID obtained after decryption is compared with the newly inserted medium ID. If the decrypted MAC ID is consistent with the newly inserted medium ID, it means that the medium is legal and valid. At this time, key information such as the authorized account, operation end account, MACID, validity period, etc. are recorded in the operation log, and the validity period of the medium is updated. If the decryption is unsuccessful, or the MAC ID obtained after decryption is inconsistent with the newly inserted medium ID, the inserted validity period is an invalid value. Finally, based on the comparison result of the RTC time and the validity period, a decision is made on whether the authentication is passed or not.
[0082] The authentication platform 31 of the present invention can more comprehensively verify the identity and validity period of the medium, ensuring that only legal and valid media can be edited, thereby protecting the integrity and security of the data.
[0083] The above are only some embodiments of the present invention. For those skilled in the art, several modifications and improvements can be made without departing from the creative concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A text editor based on authorization management, characterized in that: include: A management module (1), the management module (1) comprising an account authorization platform (11), the account authorization platform (11) being responsible for adding an authorized account, setting the number of authorizations, and sending authorization information to a server and an authorization terminal respectively, the authorized account comprising an authorized account and an authorized password, and the authorization information comprising an authorized account, an authorized password and the number of authorizations; An authorization module (2), wherein the authorization module (2) can log in to a medium authorization platform (21) through the authorization account and the authorization password, and the medium authorization platform (21) is used to authorize the storage medium to obtain the authorized medium; An editing module (3), the editing module (3) comprising a medium authentication platform (31), the medium authentication platform (31) being used to authenticate the medium; If the authentication is passed, editing is allowed; if the authentication is not passed, editing is not allowed.
2. The text editor according to claim 1, characterized in that The step of the medium authorization platform (21) authorizing the storage medium comprises: Query the server for authorization information corresponding to the authorized account, where the authorization information includes the remaining number of authorizations; Determine whether the number of authorizations is greater than 0; If yes, scan the storage medium, obtain the MAC ID of the storage medium, and set the validity period; Confirm the authorization.
3. The text editor according to claim 2, characterized in that The step of confirming the authorization also includes: The authorization account, operation terminal account, MAC ID and validity period are encrypted into ciphertext and stored in the storage medium.
4. The text editor according to claim 2, characterized in that The step of confirming the authorization also includes: The authorized account, MAC ID, validity period, current IP, and operating terminal account are sent to the server and stored.
5. The text editor according to claim 2, characterized in that After the step of determining whether the number of authorizations in the authorization information is greater than 0, the following step further includes: If not, a message is sent to the authorization end, and re-authorization is applied to the management end through the authorization end.
6. The text editor according to claim 1, characterized in that The steps of authenticating the medium by the medium authentication platform (31) include: Monitor whether the medium is connected; If the medium exists, obtain the MAC ID of the newly inserted medium and compare it with the currently recorded medium ID; If they are consistent, compare the computer's RTC time with the validity period; If the time is valid, the authentication is passed and editing is allowed; if the time exceeds the limit, the authentication is not passed and editing is not allowed.
7. The text editor according to claim 6, characterized in that After the step of monitoring whether the medium is connected, the following step is further included: If the medium does not exist, the inserted medium ID is empty and the validity period is an invalid value.
8. The text editor according to claim 6, characterized in that After the step of obtaining the MAC ID of the newly inserted medium and comparing it with the currently recorded medium ID, the method further includes: If they are inconsistent, the inserted media ID is the MAC ID of the newly inserted media; Decrypt the ciphertext of the newly inserted medium; If decryption fails, the inserted validity period is an invalid value; If the decryption is successful, the media ID is compared with the MAC ID of the ciphertext; If the IDs are inconsistent, the inserted validity period is an invalid value; If the IDs are consistent, the authorized account, operating terminal account, MAC ID, and validity period will be recorded in the operation log, and the validity period will be updated.
9. The text editor according to claim 8, characterized in that The management module (1) also has a log query platform (12), and the log query platform (12) is responsible for authorization information retrieval.
10. The text editor according to claim 9, characterized in that The steps of the log query platform (12) responsible for authorization information retrieval include: Obtain the packaging operation log sent by the editing module (3), and parse and obtain the MAC ID; Query the server through MAC ID to obtain authorization information; Export authorization information.
