File reference processing method and device, electronic equipment and storage medium
By updating content from offline files to online files in the file reference chain, the problem of transferring changes and transfer of lower-level files in multi-layer file reference is solved, timely update and consistency of data is achieved, and data interoperability between files is improved.
Patent Information
- Application Number
- CN202411211581.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
AI Technical Summary
In a multi-layer file reference relationship, when the subordinate files are offline, automatic data update cannot be achieved, resulting in changes to subordinate files in the reference chain that cannot be passed, affecting data consistency and timeliness.
By determining the online file in the file reference chain, the content update from offline files to online files is realized, ensuring timely update and consistency of data in the cascading reference relationship.
It realizes automatic update of multi-layer file references, solves the problem that offline files hinder the transfer of changes and transfers of lower-level files in the reference chain, ensures data interoperability and consistency, and improves the timeliness and reliability of data updates.
Smart Images

Figure CN119106012A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to but is not limited to the field of file processing technology, and in particular to a method and device for processing file references, an electronic device, and a storage medium. Background Art
[0002] At present, when people use documents, tables, etc. to reference, they usually only involve one layer of reference relationship; for example, file A only focuses on referencing file B. However, when files, tables, etc. involve multiple layers of reference relationships, for example, when file A references file B, and file B references file C, the data that file A depends on is ultimately on file C; if file B is offline at this time, file B cannot obtain updates from file C, and file A can only obtain the old data of file B, and multiple layers (i.e., multiple levels) of references and / or data updates cannot be achieved. Summary of the invention
[0003] The embodiments of the present disclosure provide a method and device for processing file references, an electronic device, and a storage medium.
[0004] A first aspect of an embodiment of the present disclosure provides a method for processing a file reference, which is executed by a client and includes:
[0005] Accessing a first file, wherein the first file is a file having a cascading reference relationship, the cascading reference relationship indicates a reference relationship among the first file, the second file, and the third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file;
[0006] When there is at least one second file in the reference chain of the first file and / or when there is at least one third file online, the first file is displayed, wherein the content displayed by the first file is determined based at least on the files in the reference chain from the first file to the files in the online state.
[0007] In some embodiments, the method also includes: displaying the first file when there is at least one second file in the reference chain of the first file that is in an offline state and there is no third file in the reference chain that is in an online state, and the content displayed by the first file is determined at least based on the second file that is in an offline state.
[0008] In some embodiments, the content displayed by the first file is determined based at least on the files in the reference chain from the first file to the files in the online state, including: when there is at least one second file in the reference chain of the first file that is offline, and there is a third file in the reference chain that is online, the content displayed by the first file is determined based at least on the files in the reference chain from the second file in the offline state to the third file in the online state.
[0009] In some embodiments, the content displayed by the first file is determined based at least on the files in the reference chain from the first file to the files in an online state, including: when there is at least one second file in the reference chain of the first file that is online, the content displayed by the first file is determined based at least on the second file in the reference chain that is online.
[0010] In some embodiments, the method further includes: when the user accessing the first file is the first user, sending a first request initiated by the first user, the first request is used to grant the first file permission for the second file, and the first user has permission to access the first file and the second file.
[0011] In some embodiments, the content displayed by the first file is determined based at least on the files in the reference chain from the second file in an offline state to the third file in an online state, including: when the first file is not granted permission for the second file, the relevant content in the first file that references the content of the second file is displayed as first information, and the first information is used to indicate the content of the referenced second file.
[0012] In some embodiments, the method further comprises:
[0013] In the case where the first file is granted permission for the second file, a reference subchain is determined in the reference chain, the reference subchain indicating a reference relationship between files from the second file in an offline state to a third file in an online state;
[0014] In which, when there is a group of files with a direct reference relationship in the reference sub-chain that are not authorized, the relevant content of the first file that references the second file content is determined at least based on the second file that is in an offline state, or the relevant content of the first file that references the second file content is displayed as first information, and the first information is used to indicate the referenced second file content.
[0015] In some embodiments, when all files with direct reference relationships in the reference sub-chain are authorized, the relevant content of the first file that references the content of the second file is determined based at least on all files in the reference chain from the second file in an offline state to the third file in an online state.
[0016] In some embodiments, the relevant content of the second file referenced in the first file is determined based on at least all files in the reference chain from the second file in an offline state to the third file in an online state, including: when the part of the third file in an online state referenced by the files in the reference chain is changed, the content displayed by the first file is determined based on at least the changes of the second file in an offline state and the third file in an online state.
[0017] In some embodiments, the content displayed by the first file is determined based on at least a second file in an online state in the reference chain, including:
[0018] In the case where the first file is not granted permission for the second file, the relevant content in the first file that refers to the content of the second file is displayed as first information, and the first information is used to indicate the referenced content of the second file; or
[0019] In the case where the first file authorizes the second file, the relevant content in the first file that refers to the content of the second file is determined based at least on the second file that is in an online state.
[0020] A second aspect of the disclosed embodiment provides a method for processing a file reference, which is executed by a server and includes:
[0021] Determining that the first file is a file with a cascading reference relationship, the cascading reference relationship indicates a reference relationship among the first file, the second file, and the third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file;
[0022] When a first file is accessed and there is at least a second file in a reference chain of the first file, and / or at least a third file is online, update the relevant content in the first file based on at least the content determined in the files in the reference chain from the first file to the files in the online state.
[0023] In some embodiments, the method also includes: when the first file is accessed and there is at least one second file in the reference chain of the first file that is offline, and there is no third file in the reference chain that is online, updating the relevant content in the first file at least based on the content determined based on the second file that is offline.
[0024] In some embodiments, updating the relevant content in the first file based on at least the content determined by the files in the reference chain from the first file to the files in an online state includes: when there is at least one second file in the reference chain of the first file that is offline and there is a third file in the reference chain that is online, updating the relevant content in the first file based on at least the content determined by the files in the reference chain from the second file in an offline state to the third file in an online state.
[0025] In some embodiments, updating the relevant content in the first file based on at least the content determined in the file in the reference chain from the first file to the file in an online state includes: when there is at least one second file in the reference chain of the first file that is online, updating the relevant content in the first file based on at least the content determined in the second file in an online state in the reference chain.
[0026] In some embodiments, the method further includes: when the user accessing the first file is the first user, obtaining a first request initiated by the first user, the first request is used to grant the first file permission for the second file, and the first user has permission to access the first file and the second file.
[0027] In some embodiments, updating relevant content in a first file based at least on content determined in a reference chain from a second file in an offline state to a third file in an online state includes: updating relevant content in the first file that references the content of the second file and displaying it as first information when the first file is not granted permission for the second file, wherein the first information is used to indicate the referenced content of the second file.
[0028] In some embodiments, the method further comprises:
[0029] In the case where it is determined that the first file is granted the permission for the second file, a reference subchain is determined in the reference chain, the reference subchain indicating a reference relationship between files from the second file in an offline state to a third file in an online state;
[0030] When it is determined that there is a group of unauthorized files with a direct reference relationship in the reference sub-chain, the relevant content of the first file that references the second file content is determined based on at least the second file in an offline state, or the relevant content of the first file that references the second file content is updated to first information, and the first information is used to indicate the referenced second file content.
[0031] In some embodiments, when it is determined that all files with direct reference relationships in the reference sub-chain are authorized, the relevant content of the first file that references the content of the second file is determined based at least on all files in the reference chain from the second file in an offline state to the third file in an online state.
[0032] In some embodiments, relevant content in the first file that references the content of the second file is determined based at least on all files in the reference chain from the second file in an offline state to the third file in an online state, including: when a part of the third file in an online state that is referenced by a file in the reference chain is changed, updating relevant content in the first file that is determined based at least on the changes in the second file in an offline state and the third file in an online state.
[0033] In some embodiments, updating the related content in the first file based on at least the content determined in the second file in the reference chain that is online includes:
[0034] In the case where the first file is not granted permission for the second file, the relevant content in the first file that references the content of the second file is updated to first information, where the first information is used to indicate the referenced content of the second file; or
[0035] In the case where the first file authorizes the second file, the relevant content in the first file that refers to the content of the second file is determined based at least on the second file being in an online state.
[0036] A third aspect of the present disclosure provides a device for processing file references, the device comprising:
[0037] The access module is configured to access a first file, wherein the first file is a file having a cascading reference relationship, the cascading reference relationship indicates a reference relationship among the first file, the second file and the third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file;
[0038] The display module is configured to display the first file when there is at least one second file in the reference chain of the first file and / or when there is at least one third file in an online state, wherein the content displayed by the first file is determined based on at least one file in the reference chain from the first file to the file in an online state.
[0039] A third aspect of the present disclosure provides a device for processing file references, the device comprising:
[0040] A first determination module is configured to determine that the first file is a file with a cascading reference relationship, the cascading reference relationship indicates a reference relationship among the first file, the second file, and the third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file;
[0041] An update module is configured to update the relevant content in the first file based on at least the content determined by the files in the reference chain from the first file to the files in the online state when the first file is accessed and there is at least a second file in the reference chain of the first file, and / or there is at least a third file in the online state.
[0042] A fifth aspect of the present disclosure provides an electronic device, including:
[0043] processor;
[0044] a memory for storing processor-executable instructions;
[0045] The processor is configured to implement any file reference processing method of the embodiment of the present disclosure when running executable instructions.
[0046] A sixth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores an executable program. When the executable program is executed by a processor, the processing method of any file reference in the embodiment of the present disclosure is implemented.
[0047] A seventh aspect of the embodiments of the present disclosure provides a computer program product, which includes a computer program or instructions. When the computer program product or instructions are executed by a processor, the processing method of any file reference in the embodiments of the present disclosure is implemented.
[0048] In an embodiment of the present disclosure, when accessing a first file having a cascading reference relationship, the cascading reference relationship indicates a reference relationship among the first file, the second file and the third file, and a reference chain formed according to the reference relationship, wherein the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file. If there is at least one second file in the reference chain of the first file, and / or at least one third file is online, the content displayed in the first file can be determined based on at least the files in the reference chain from the first file to the files in the online state; in this way, automatic updating of multi-layer file references can be achieved, that is, the problem that the existence of offline files hinders the transmission of changes to lower-level files in the reference chain is solved, data intercommunication between files is achieved, and it is beneficial for source data to be updated to the first file through one or more layers of files, so that data with a cascading reference relationship can maintain consistency, and data updates are more timely and reliable.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0051] Figure 1 The diagram is a schematic diagram of a cascade reference according to an exemplary embodiment.
[0052] Figure 2 The figure is a flowchart of a first method for processing file references according to an exemplary embodiment.
[0053] Figure 3 The diagram is a schematic diagram showing files with cascading reference relationships according to an exemplary embodiment.
[0054] Figure 4 The figure is a flowchart of a second method for processing file references according to an exemplary embodiment.
[0055] Figure 5 It is a flowchart of a third method for processing file references according to an exemplary embodiment.
[0056] Figure 6 It is a flowchart of a fourth method for processing file references according to an exemplary embodiment.
[0057] Figure 7 It is a schematic diagram showing a subscription relationship according to an exemplary embodiment.
[0058] Figure 8 It is a flowchart of a fifth method for processing file references according to an exemplary embodiment.
[0059] Fig. 9 It is a flowchart of a sixth method for processing file references according to an exemplary embodiment.
[0060] Fig.10 It is a flowchart of a seventh method for processing file references according to an exemplary embodiment.
[0061] Fig.11 It is a flowchart of an eighth method for processing file references according to an exemplary embodiment.
[0062] Fig.12 It is a flowchart of a ninth method for processing file references according to an exemplary embodiment.
[0063] Fig.13 The diagram is a schematic diagram of the structure of a device for processing file references according to an exemplary embodiment.
[0064] Fig.14 The diagram is a schematic diagram of the structure of a device for processing file references according to an exemplary embodiment.
[0065] Fig.15 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0066] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the embodiments of the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present disclosure as detailed in the appended claims.
[0067] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0068] In order to further explain the embodiment of the present disclosure, some contents of the cascade reference of the file in the embodiment of the present disclosure are described. The cascade reference can be a multi-level reference, but the number of levels is not limited to 2. The number of levels is limited by the specific scenario and server computing resources.
[0069] For example, a cascading reference can be: assuming that the company in file A references the area of file B across tables, and the area in file B references the area of file C across tables, then the data that file A depends on is also affected by file C, and updates to file C are passed to file A through file B; this reference relationship is a cascading reference relationship.
[0070] For example, Figure 1 As shown, the cell A1 of worksheet A in file A refers to the cell A1 of worksheet A in file B, and the cell A1 of worksheet A in file B refers to the cell A1 of worksheet A in file C; here, the formula of the cell A1 of worksheet A in file A is: =[file B.xlsx] worksheet]! $A$1, and the formula of the cell A1 of worksheet A in file B is: [file C.xlsx] worksheet]! $A$1. Here, file A can be the first file, file B can be the second file, and file C can be the third file.
[0071] like Figure 2 As shown, the present disclosure provides a method for processing file references, comprising the following steps:
[0072] Step 11: Determine that the first file is a file with a cascading reference relationship, where the cascading reference relationship indicates a reference relationship among the first file, the second file, and the third file, and a reference chain formed according to the reference relationship, where the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file;
[0073] Step 12: When the first file is accessed and there is at least one second file in the reference chain of the first file, and / or there is at least one third file online, update the relevant content in the first file based on at least the content determined in the files in the reference chain from the first file to the files online.
[0074] The method for processing file references provided in the embodiments of the present disclosure can be executed by various terminals or electronic devices; the terminal or electronic device is a terminal or electronic device used as a service end (or server). Optionally, the terminal or electronic device may include but is not limited to at least one of the following: a computer, a server, a tablet computer, a smart wearable device, a vehicle-mounted device, a smart home device, and a smart office device. Exemplarily, the method for processing file references provided in the embodiments of the present disclosure is executed by a service end (e.g., a server).
[0075] In some embodiments, the first file, the second file, and the third file may all be files of various types.
[0076] Exemplarily, the first file, the second file and / or the third file may be a table-type file. For example, the first file, the second file and the third file may all be spreadsheets. A spreadsheet, also known as an electronic data table, is a file supported by a computer program that simulates a calculation table on paper. It displays a grid consisting of a series of rows and columns. Numerical values, calculation formulas, or texts may be stored in cells. For example, the first file, the second file and the third file may all be spreadsheets supported by EXCEL or WPS.
[0077] Exemplarily, the first file, the second file and / or the third file may be files including tables. For example, the first file, the second file and the third file may all be files of presentation type and / or document type, and the first file, the second file and the third file may include electronic tables, etc.
[0078] Exemplarily, the first file, the second file and / or the third file may be non-table type documents. For example, the first file, the second file and the third file may all be presentation type and / or document type files, and the first file, the second file and the third file may all contain text, graphics, audio and / or video files. Optionally, the first file, the second file and the third file may include links and / or areas with cell formats; links and / or areas with cell formats in one file may be used to reference content in another file.
[0079] In some embodiments, the first file, the second file and the third file may be online files or offline files. Exemplarily, the first file, the second file and the third file may all be online form files.
[0080] Here, online files are usually files stored on the server side, which can be accessed and operated through the network, and can also be set to allow multiple users to access and modify the file content at the same time. Offline files refer to files stored locally on the client side, which can be directly accessed without going through the network. When multiple users access the same offline file, they cannot view each other's changes to the file in real time.
[0081] Furthermore, the state of the online file may include an online state and an offline state. The online state means that there is a client accessing the online file through the network. The offline state means that there is no client accessing the online file through the network.
[0082] In some embodiments, an offline file may have an associated online file. When the offline file is opened using a client, the offline file may be switched to an online file associated with the offline file, so that the online file is in an online state. The online file may be accessed and operated through the network, and may be set to allow multiple users to access and modify the file content at the same time. Furthermore, after the online file is saved, the offline file associated with the online file may be synchronized based on the online file.
[0083] In some embodiments, a cascade reference relationship refers to a complex reference structure between files in a file system, including: a reference chain of one or more file references. This relationship reflects the multi-level and multi-link reference association of the reference relationship between files, which helps to achieve information transmission and sharing, but may also increase the complexity and management difficulty of the file system.
[0084] In some embodiments, a reference chain may be defined as: an ordered reference sequence formed by reference relationships among a first file, a second file, and a third file in a file system having a cascading reference relationship.
[0085] Specifically, starting from the first file, through the first file's direct reference to the second file, and then through the second file's direct or indirect reference to the third file, a complete reference path is the reference chain.
[0086] For example, if the first file A references the second file B, and the second file B references the file C, then the path "ABC" formed from A to B and then to C is a reference chain.
[0087] For another example, if the first file A contains a link to the second file B, and the part of the second file B pointed to by the first file A contains a link to the third file C, then the path "ABC" formed from A to B and then to C is a reference chain.
[0088] For another example, if the second file B references the third file C, and also through other intermediate files, such as the second file B references the third file D, and the third file D references the third file C, then the "ABDC" path formed from the first file A, through the second file B, the third file D and finally to the third file C is also a reference chain. The "ABC" path formed from the first file A, through the second file B and finally to the third file C is also a reference chain.
[0089] The existence of reference chains helps to clearly understand the interdependence and association between files, and facilitates effective management, maintenance and analysis of the file system.
[0090] In one implementation, the reference may be implemented by setting a link in the file pointing to the referenced object, thereby implementing the reference of the file to the referenced object.
[0091] Furthermore, if Figure 3 As shown, the combination of multiple reference chains can also form a reference tree. Among them, the reference tree for file A includes three reference chains, such as: file A-file B1-file C1; file A-file B2-file C2; file A-file B2-file C3-file C4.
[0092] In some embodiments, the reference relationship may include: a direct reference relationship and an indirect reference relationship; wherein, a direct reference relationship refers to a file directly containing a reference to another file. For example, the path, name or identifier pointing to the second file is clearly written in the first file, so that the second file can be directly accessed through this clear reference. This is a direct reference relationship. An indirect reference relationship refers to a file that does not directly contain a reference to another file, but refers to the target file through at least one intermediate file. For example, the first file directly references the second file, and the second file references the third file. Then, for the first file and the third file, there is an indirect reference relationship between them. That is, a direct reference is a "one-step" reference, and an indirect reference requires "multi-step jumps" through intermediate links to reach the target file.
[0093] In the embodiment of the present disclosure, the first file and the second file are in a direct reference relationship; the first file and the third file are in an indirect reference relationship.
[0094] In some embodiments, when the cascading reference relationship includes at least 4 levels, the second file can directly or indirectly reference other third files.
[0095] For example, Figure 3As shown, the first file may include file A, the second file may include file B1 and file B2, and the third file may include file C1, file C2, file C3 and file C4; file A directly references B1 and B2; file A indirectly references file C1, file C2, file C3 and file C4; file B1 directly references file C1, file B2 directly references file C2 and file C3, and file B2 indirectly references file C4 through file C3.
[0096] Exemplarily, the definition of the cascade reference relationship among the first file, the second file, and the third file may be as follows: Figure 3 As shown: (1) Definition of direct reference: When file A references file B2 and file B2 references file C2, file A and file B2, file B2 and file C2 are in a direct reference relationship respectively; (2) Definition of indirect reference: When file A references file B2 and file B2 references file C2, it is equivalent to file A referencing file C2 through file B2, then file A and file C2 are in an indirect reference relationship.
[0097] In some embodiments, based on the first file referencing the second file, it is also possible to implement that the relevant content of the content of the second file referred to in the first file is changed along with the change of the content of the second file.
[0098] In some embodiments, based on the first file indirectly referencing the third file through the second file, it can be achieved that: the content of the second file changes with the content of the third file, and the content of the first file changes with the content of the second file, then the content of the first file can be changed with the content of the third file.
[0099] In some embodiments, the cascading reference relationship may indicate a reference relationship between the first content of the first file, the second content of the second file, and the third content of the third file.
[0100] In this embodiment, there are two situations for indirect reference:
[0101] In one case, the upper file in the reference chain references the lower file, and the part of the lower file referenced by the upper file continues to reference the lower file of the lower file, forming a layer-by-layer dependency relationship. The upper file in the reference chain indirectly references the lower file of the lower file. For example, the A1 part of file A references the B1 part of file B, and the B1 part of file B references the C1 part of file C. Then, file A indirectly references file C, or in other words, the A1 part of file A indirectly references the C1 part of file C. The update of the C1 part of file C affects the update of the B1 part of file B, which in turn affects the update of the A1 part of file A.
[0102] In another case, if the upper file in the reference chain references the lower file, and the other parts of the lower file other than the part referenced by the upper file continue to reference the lower file of the lower file, then the upper file in the reference chain indirectly references the lower file of the lower file, but the lower file of the lower file will not affect the upper file of the lower file. For example, the A1 part of file A references the B1 part of file B, and the B2 part of file B references the C1 part of file C. Then, file A indirectly references file C, but the update of the C1 part of file C will not affect the update of the A1 part of file A.
[0103] Optionally, the direct reference between files includes at least one of the following methods, which is specifically described by taking the direct reference of the first file to the second file as an example:
[0104] Method 1: Acquire the second content of the second file referenced by the first file, and display the first content in the first file as the second content.
[0105] Exemplarily, the content of the second cell of the second file is obtained, and the content of the second cell is the second content; and the content of the first cell in the first file is displayed as the content of the second cell, and the content of the first cell is the first content. Specifically, if the formula "=$AAA$BBB" is written in the first cell of the first file, where "$AAA" represents the address of the second file and "$BBB" represents the address of the second cell, then the first cell of the first file can reference the second cell of the second file. The above reference method of the address of the second file, the address of the second cell, and the formula is only an example, and the specific representation method is not limited.
[0106] Method 2: Obtain the second content of the second file referenced by the first file, and perform preset processing on the second content; display the first content in the first file as the second content after preset processing, wherein the preset processing may include at least one of the following: format processing, content processing.
[0107] Exemplarily, the format processing may include: adjusting the format of the second content to a format that matches the first content, and adjusting the format of the second content to a preset format.
[0108] Among them, format processing may include text format processing, image format conversion, text format processing, etc. Exemplarily, text format processing may include font selection, font size selection, etc. of text; for example, the second content of the second file may be displayed in the first file, and the second content may be adjusted to a font and / or font size that matches the first content. Exemplarily, image format conversion may include converting an image into a format such as JPEG or GIF; for example, the first content in the first file is displayed as a second image in a predetermined JPEG format, and the second image is the second content of the second file and is displayed in a GIF format in the second file. Exemplarily, text format processing may include page margin adjustment, line spacing adjustment, special paragraph format adjustment, etc.; for example, the second content of the second file is displayed in the first file, and the second content is adjusted to the same line spacing and / or page spacing as the first content.
[0109] Exemplarily, the content processing may include at least one of the following: formula calculation processing, content generation processing, and the like.
[0110] Among them, the formula calculation processing can be processed by a formula calculation service; the formula calculation service can calculate at least the second content according to the formula corresponding to the first content to obtain the calculated second content as the output result of the formula calculation service. Exemplarily, the formula corresponding to the first content can be: a formula configured for the first content. For example, the content displayed in the first cell of the first file is the first content, and the first formula is set in the first cell. The first formula is used to calculate the sum of the squares of the contents of the second cell to the sixth cell of the second file, wherein the contents of the second cell to the sixth cell of the second file are the second content; the formula calculation service calculates the sum of the squares of the contents of the second cell to the sixth cell of the second file, and displays the sum of the squares as the first content in the first cell of the first file.
[0111] Among them, the content generation process can be processed by a content generation service; the content generation service is a service that can automatically generate content, and the generated content can include text, rich text, etc. Specifically, the content generation service is integrated with preset functions related to content processing. This function can be implemented by a neural network model or a preset content processing rule. Exemplarily, the neural network model can be a large language model, a generative adversarial model, an encoder and / or a decoder, etc., which can be used to implement functions related to content processing such as proofreading text errors, detecting sensitive words, summaries or document polishing. The preset content processing rule can be a rule for proofreading text errors, detecting sensitive words or document polishing, so as to implement content processing functions such as proofreading text errors, detecting sensitive words or document polishing. In a specific embodiment, the content generation service can process the received content with the corresponding function and then output the result. For example, the second content can be used as the input content of the content generation service, and the content generation service generates the processed second content after processing the input second content as the output result of the content generation service.
[0112] Method three: obtaining the second content of the second file referenced by the first file, and displaying the first content in the first file as first information indicating the second content, wherein the first information may include at least one of the following: a link, a formula, a character string, an icon, etc.
[0113] The displaying of the first content of the first file as the first information indicating the second content may be performed without granting the first file permission for the second file.
[0114] Optionally, the way in which the second file directly references the third file is similar to the way in which the first file directly references the second file, and the way in which the second file directly references the third file can refer to the way in which the first file directly references the second file.
[0115] In the disclosed embodiment, among two files having a reference relationship, the content of one file will change as the content of the other file changes. The specific update method can be determined according to the status of the files, such as updating based on the historical version of the referenced file, or updating in real time based on the changes of the referenced file.
[0116] In some embodiments, when two files that have a reference relationship are in an offline state, since the referenced file in an offline state will not be changed on the server side, there is no need to use a subscription method to transmit the changed data in real time, and the offline version of the offline file can be used to determine the relevant content. For example, when a first file references a second file, when the first file is online and the second file is offline, the offline version of the second file can be obtained, and at least the relevant content of the first file that references the content of the second file can be updated according to the offline version of the second file.
[0117] In some other embodiments, when two files that have a reference relationship are both online, the modified data can be transmitted between the files in real time through subscription, so as to promptly update the content related to the reference. For example, when a first file references a second file, and when both the first file and the second file are online, a channel can be established for the first file to subscribe to the second file, so that the changes of the second file can be transmitted to the first file through the channel, so as to update the content related to the content of the first file that references the second file.
[0118] In some embodiments, the first file subscribing to the second file means that the first file subscribes to the changes of the second file. When the first file successfully subscribes to the second file, if the second file is changed, the content related to the changed content of the second file can be updated in the first file.
[0119] In some embodiments, the modification of the second file may include modification of at least part of the content of the second file.
[0120] Optionally, the second file includes a second content, and the second content of the second file is processed to obtain a fourth content, and the fourth content is the content obtained after the second file is modified. Exemplarily, processing the second content of the second file to obtain the fourth content may include: performing a first operation on the second content of the second file to obtain the fourth content; wherein the first operation may include but is not limited to at least one of the following: adding, deleting, modifying, etc. at least part of the second content.
[0121] In some embodiments, the subscription between the first file and the second file may include: a subscription between the first file and part or all of the content of the second file. Exemplarily, the server establishes a subscription between the first file and part or all of the content of the second file.
[0122] In some embodiments, establishing a subscription between a first file and part or all of the contents of a second file means that: there is at least one set of related contents between the first file and the second file, and a subscription between at least part of the related contents can be achieved.
[0123] The following is a detailed description using the example of the relevant content being the content having a reference relationship.
[0124] Exemplarily, the first file may include a first first content and a second first content; the second file may include a first second content and a second second content; it is assumed that: the first first content of the first file may reference the first second content of the second file, and the second first content of the first file may reference the second second content of the second file.
[0125] At this time, a method for implementing the subscription between the first file and part or all of the content of the second file can be: the server establishes a subscription between the first file and the entire content of the second file; for example, a subscription is established between the first first content of the first file and the first second content of the second file, and a subscription is established between the second first content of the first file and the second second content of the second file. If the first second content of the second file is changed, the changed content of the first second content in the second file is updated in the first first content of the first file; or, if the second content of the second file is changed, the changed content of the second second content in the second file is updated in the second first content of the first file.
[0126] Another way to implement the subscription between the first file and part or all of the content of the second file may be: the server establishes a subscription between the first file and part of the content of the second file; for example, a subscription is established between the first first content of the first file and the first second content of the second file, or a subscription is established between the second first content of the first file and the second second content of the second file. For example, if the first first content of the first file subscribes to the first second content of the second file; if the first second content of the second file is changed, the changed content of the first second content of the second file is updated in the first first content of the first file; or, if the changed content of the second content of the second file is changed, if the second first content of the first file does not subscribe to the second second content of the second file, the second second content of the first file is not updated.
[0127] In the case of establishing a subscription between the first file and part of the content of the second file, it can be determined whether to establish a subscription between the contents based on the aforementioned different subscription preconditions. For example, the subscription precondition includes that the user accessing the first file has access rights to the first file and the second file. In the above embodiment, if the user has access rights including: allowing access to the first first content of the first file, allowing access to the second first content of the first file, allowing access to the first second content of the second file, and not allowing access to the second second content of the second file, then in the case where the first first content references the first second content and the second first content references the second second content, since the user has access rights to the first first content and the first second content, a subscription between the first first content and the first second content can be established; since the user does not have access rights to the second second content, a subscription between the second first content and the second second content cannot be established.
[0128] In some other embodiments, the establishment of a subscription between a first file and part or all of the contents of a second file refers to: the subscription of the first file to the second file is a content-level subscription or a file-level subscription. Exemplarily, in the embodiment of the present disclosure, when the subscription of the first file to the second file is a content-level subscription, the second file will be updated in the first file only when the content subscribed by the first file is changed; and even if the content not subscribed by the first file is changed, it cannot be updated in the first file.
[0129] In some embodiments, the manner in which the second file subscribes to the third file, or the manner in which the third file subscribes to other third files, may refer to the manner in which the first file subscribes to the second file.
[0130] In some embodiments, the file is in an online state and an offline state, and different update methods can be used. For example, the online state uses a subscription method; the offline state uses an offline version method.
[0131] In some embodiments, in step 12, updating the relevant content in the first file based on at least the content determined in the file from the first file to the file in the online state in the reference chain may be: for the same reference chain, updating the relevant content in the first file based on at least the content determined in the file from the first file to the first file in the online state in the reference chain. For the relevant content based on at least the content determined in the file from the first file to the file in the online state in the reference chain, there are two cases:
[0132] 1) If the first file in the reference chain that is online is the second file, the determination is based at least on the second file;
[0133] 2) If the first file in the reference chain that is online is the third file, it is determined at least based on the second file and the third file.
[0134] like Figure 3 As shown, for example, if file B2 is online, file A needs file B2 to confirm; at the same time, if file B1 is offline and file C1 is online, file A needs file B1 and file C1 to confirm; thus, file A needs at least file B1, file C1 and file B2 to confirm.
[0135] For another example, if file B2 is offline, file C2 is offline, and file C3 is online, then file A needs to be confirmed by at least file B2, file C2, and file C3; at this time, the situation of the file B1 branch is not considered.
[0136] For another example, if file B2 is online, file C2 is online, file C3 is offline, and file C4 is online, then file A needs to be determined by at least file B2, file C3, and file C4; in this case, it does not need to be determined based on file C2, because when file C2 is online, the content of file C2 will be automatically synchronized to file B2, so there is no need to consider file C2 additionally. In this case, the branch of file B1 is not considered.
[0137] In some embodiments, for the same reference chain, updating the relevant content in the first file based on at least the content determined from the first file to the online file in the reference chain can be: based on at least the modified content of the file from the first file to the online file in the reference chain. Here, the modification of the file means that the content of the file is modified.
[0138] Optionally, the content of the file being changed may include at least part of the content of the file being changed. Exemplarily, the content of the second file being changed may include at least part of the content of the second file being changed. Exemplarily, the content of the third file being changed may include at least part of the content of the third file being changed.
[0139] In the present embodiment, when accessing a first file with a cascading reference relationship, the cascading reference relationship indicates the reference relationship between the first file, the second file and the third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, the second file directly references or indirectly references the third file, if there is at least one second file in the reference chain of the first file, and / or, at least one third file is online, then the relevant content in the first file is updated at least based on the content determined by the file in the reference chain from the first file to the file in the online state; in this way, automatic updating of multi-layer file references can be achieved, that is, the problem that the existence of offline files hinders the transmission of changes to lower-level files in the reference chain can be solved, and data intercommunication between files is achieved, which is beneficial for source data to be updated to the first file through one or more layers of files, so that data with a cascading reference relationship can be consistent, and data updates are more timely and reliable.
[0140] In some technical solutions, when there are multiple layers of files, for example, the first file references the second file, and the second file references the third file, when the second file is an offline file, the second file cannot obtain updates from the third file, so that the first file can only obtain old data from the second file, and cannot achieve updates of multiple layers of file references. In the embodiment of the present disclosure, when the second file is offline, the first file can be updated based on the content determined by the file in the reference chain from the first file to the file in the online state, for example, the first file can be updated based on the offline second file and the online third file, so that data intercommunication between files can be achieved even when there is an offline file that hinders the transmission of changes to the lower-level files in the reference chain.
[0141] like Figure 4 As shown, in some embodiments, updating the relevant content in the first file in step 12 based on at least the content determined in the reference chain from the first file to the file in the online state includes:
[0142] Step 121: When there is at least one second file in an offline state in the reference chain of the first file and there is a third file in an online state in the reference chain, update the relevant content in the first file based on at least the content determined by the files in the reference chain from the second file in an offline state to the third file in an online state.
[0143] In some embodiments, in step 121, updating the relevant content in the first file based on at least the content determined based on the files in the reference chain from the second file in an offline state to the third file in an online state can be: for the same reference chain, updating the first file based on at least all offline files in the reference chain from the second file in an offline state to the third file in an online state and all third files in an online state.
[0144] like Figure 3 As shown, for example, if file B2 is offline and file C3 is online, then file A needs at least file B2 and file C3 to confirm. For another example, if file B2 and C3 are offline and file C4 is online, then file A needs at least file B2, file C3 and file C4 to confirm.
[0145] In an optional embodiment, after updating the content of the first file, the server sends the updated first file to the client for display; or, the content of the first file displayed by the client is the content of the first file updated by the server.
[0146] In some embodiments, for the same reference chain, updating the first file is determined based at least on all offline files in the reference chain from the second file in an offline state to the third file in an online state and all third files in an online state, including: determining at least based on the modified content of all offline files in the reference chain from the second file in an offline state to the third file in an online state and all third files in an online state.
[0147] like Figure 3 As shown, for example, if file B2 is offline and file C3 is online, then file C3 corresponds to the first file version and file B2 corresponds to the second file version. For another example, if files B2 and C3 are offline and file C4 is online, then file C4 corresponds to the first file version and files B2 and C3 correspond to the second file version.
[0148] In the above, the first file version is the version stored corresponding to the file belonging to the online file, which has the characteristics of real-time update, and the second file version is the version stored corresponding to the file in the offline state, which refers to the version of the file that was last closed and saved. For example, the first file version is the version corresponding to the third file in the online state in the reference chain from the second file in the offline state to the second file in the online state; the second file version is the version corresponding to all offline files in the reference chain from the second file in the offline state to the third file in the online state, and the offline file includes the second file in the offline state and the third file in the offline state.
[0149] Exemplarily, the first file references the second file, the second file references the third file, the first file and the third file are online, and the second file is offline; the first file version includes the online version of the third file; the second file version includes the offline version of the second file.
[0150] Optionally, the first file version may be at least part of an online file, or may be at least one of multiple online files; the second file version may be at least part of an offline file, or may be at least one of multiple offline files.
[0151] Optionally, the first file version may be at least a portion of an online file (such as a third file) as an example for description, and the first file version includes at least one of the following:
[0152] The modified content in the third file, that is, the modified content in the third file;
[0153] A third file after the content has been modified;
[0154] Content in the third file that is related to the previous file in the reference chain (the previous offline second file or the previous offline third file);
[0155] The third file refers to the modified content related to the upper-layer file (the second file in the upper-layer offline state or the third file in the upper-layer offline state).
[0156] For example, if file B2 is offline and file C3 is online, the changes in the third file (e.g., file C3) related to the previous file are: the changes in the content in file C3 related to file B2. For another example, if files B2 and C3 are offline and file C4 is online, the changes in the third file (e.g., file C4) related to the previous file are: the changes in the content in file C4 related to file C3.
[0157] The modified content may refer to the modified content, the modified operation and / or the identifier of the modified content.
[0158] For example, when the change to the third file is to perform a first operation on the third content of the third file to obtain the fourth content, the third content is the content in the third file, the fourth content is the content after the third content is changed, the first operation is the change operation, and the identifier of the fourth content is the identifier of the changed content.
[0159] Then, the modified content may refer to at least one of the fourth content, the first operation, and an identifier of the fourth content.
[0160] The following is a detailed description using the modified content as an example.
[0161] For example, when the first file version is the entire third file, the first file version may include: the third file with modified content. The first file may update the part of the first file related to the third file based on the first file version having the entire content of the third file.
[0162] For another example, when the first file version is part of the third file, the first file version may include: the modified part of the third file, such as the modified content in the third file, and the modified content in the third file related to the upper-level file (the second file in the upper-level offline state or the third file in the upper-level offline state).
[0163] For another example, when the first file version is part of the third file, the first file version may include: the part of the third file related to the first file, such as the content in the third file related to the second file, and the changed content in the third file related to the upper-level file (the second file in the upper-level offline state or the third file in the upper-level offline state).
[0164] For another example, when the first file version is part of the third file, the first file version may include: the part of the third file that is related to the second file, and the modified part of the third file, such as the modified content of the third file that is related to the upper-level file (the second file in the upper-level offline state or the third file in the upper-level offline state).
[0165] Exemplarily, the modified content in the third file may be: a snapshot of the modified content in the third file, etc. For example, if the content in the second to sixth cells in the third file is modified, the first file version may include the modified second to sixth cells in the third file.
[0166] Here, a snapshot refers to a copy or a replica of data reproduction; for example, for a file, a snapshot of the file may refer to an instant copy of the file, which includes all information of the file at the time when the snapshot is generated.
[0167] Exemplarily, the third file after the content is changed may be: a snapshot of the third file after the content is changed, etc. For example, if the content in the second to sixth cells in the third file is changed, the first file version may include the third file, and the second to sixth cells in the third file display the changed content.
[0168] Exemplarily, the content in the third file related to the first file may be: a snapshot of the content in the third file related to the first file; for example, the content in the third file related to the upper-layer file (the second file in the upper-layer offline state or the third file in the upper-layer offline state) may be: a snapshot of the content of the part of the third file referenced by the first file.
[0169] Exemplarily, the changed content related to the second file in the third file may be: a snapshot of the changed content related to the first file in the third file; for example, the changed content related to the first file in the third file may be: a snapshot of the changed content of the part of the content in the third file referenced by the upper-layer file (the second file in the upper-layer offline state or the third file in the upper-layer offline state), and the third file has a first second content and a second second content, both of which are referenced by the second file, but only the second second content is changed, then the changed content is a snapshot of the modified second second content.
[0170] The related content refers to the content with correlation. In the embodiment of the present disclosure, the correlation between one file and another file means that the content of one file is changed as the content of the other file is changed.
[0171] In this way, the first file version with the content of the third file changed can be obtained by obtaining a snapshot or the like, that is, the first file version can be obtained in a variety of file formats to adapt to more application scenarios.
[0172] Optionally, the description of the second file version is similar to that of the first file version, and may refer to a version stored corresponding to a file in an offline state in a reference chain. The second file version may be at least a portion of an offline file, or may be at least one of multiple offline files.
[0173] For example, Figure 3As shown, the first content of file A references the second content of file B2, and the second content of file B2 references the third content of file C3; when file A and file C3 are online and file B2 is offline, the server obtains the first file version in which the third content of file C3 is changed; and based on the first file version in which the third content of file C3 is changed and the second file version of file B2 stored in an offline state, determines that the second content related to file C3 in file B2 is changed; and based on the change in the second content in file B2, updates the first content in file A. For example, file A references four rows and four columns of data in file B2; the first row and column of the four rows and four columns of data in file B2 references the first row and column of data in file C3, and the second row and column of the four rows and four columns of data in file B2 references the second row and column of data in file C3; if file C3 is changed, the server obtains the first text version of file C3 and the stored second file version of file B, and determines that the first row and column of data in file C3 is changed, then updates the first row and column of data in file C3 to the first row and column of data in the four rows and four columns of data in file B2, and updates the four rows and four columns of data in file B2 including the updated first row and column to file A.
[0174] In the disclosed embodiment, cascading references between files can be implemented, so that changes to a third file in an online state (such as file C3) can also be updated and synchronized to the first file when the second file (such as file B2) is in an offline state, thereby realizing data interoperability during multi-layer cascading references.
[0175] Furthermore, since the second file (e.g., file B2) is in an offline state, the first file (file A) can be updated without opening the second file (file B2) or updating the second file (e.g., file B2), thereby greatly reducing resource waste and allowing data in files with cascading reference relationships to be updated.
[0176] In some embodiments, the method also includes: updating the first file when the second file switches from an offline state to an online state, wherein the content of the first file update is determined at least based on the second file in an online state; updating the second file, wherein the content of the second file update is determined at least based on the next layer file of the second file in the reference chain.
[0177] For example, Figure 3As shown, file A references file B2, file B2 references file C3, and file C3 references file C4. If file B2 is switched from offline to online, and files C3 and C4 are in offline states; when file A is accessed, the updated content of file A is determined based on file B2. Alternatively, if file B2 is switched from offline to online, and file C3 is online; when file A is accessed, the updated content of file A is determined based on file B2; optionally, the update of file B2 is determined based on file C3.
[0178] In this way, when the second file (for example, file B2) is switched from an offline state to an online state, the changes in the content of the third file (for example, file C3) referenced by the second file during the offline period are updated to the second file, so that the data of the second file and the third file can be kept consistent, making it easy to manage data between files.
[0179] like Figure 4 As shown, in some embodiments, updating the relevant content in the first file in step 12 based on at least the content determined in the reference chain from the first file to the file in the online state includes:
[0180] Step 122: When there is at least one second file in the reference chain of the first file that is online, update the content in the first file that is related to the content determined based on at least the second file in the reference chain that is online.
[0181] Here, in the case where the second file refers to the third file, the update of the online second file can be updated along with the modification of the third file.
[0182] In some embodiments, updating the relevant content in the first file in step S122 based on at least the content determined in the second file that is online in the reference chain may include: for the same reference chain, updating the relevant content in the first file based on at least the content determined in the second file that is online in the reference chain.
[0183] In some embodiments, for the same reference chain, updating the relevant content in the first file based on at least the content determined in the second file in the reference chain that is online includes: determining based on at least the modified content of the second file in the reference chain that is online.
[0184] like Figure 3 As shown, for example, if file B2 is online, file A is determined based on at least file B2; file B2 corresponds to a first file version. That is, the first file version includes: a version of a second file that is online.
[0185] Optionally, the first file version may be at least a portion of the second file. The at least a portion may include a portion of the second file that is related to the first file and / or a modified portion of the second file.
[0186] Optionally, the first file version includes at least one of the following: modified content in the second file, that is, modified content in the second file; the second file after the content is modified; content in the second file related to the first file; modified content in the second file related to the first file. The modified content may refer to the modified content, the modified operation and / or the identifier of the modified content.
[0187] In an embodiment of the present disclosure, the content included in the first file version of the second file is analogous to the content included in the first file version of the third file; the embodiment description of the content included in the first file version of the second file can detect the embodiment description of the content included in the first file version of the third file.
[0188] In the disclosed embodiment, when a second file in an online state exists in the reference chain of a first file, the first file can be updated based on at least the second file in the online state, thereby also realizing data intercommunication between files and updating of cascaded references of multi-layer files.
[0189] In the disclosed embodiment, the first file may reference at least one second file; when the first file references multiple second files, different second files may be in different states, such as offline or online; thus, in the reference chain of the first file, only the second file in the offline state, or the second file in the online state, or both the second file in the offline state and the second file in the online state may appear. If the second file in the offline state appears in the reference chain of the first file, the first file may be updated based on the above step 121 on the reference chain; if the second file in the online state appears in the reference chain of the first file, the first file may be updated based on the above step 122 on the reference chain.
[0190] like Figure 5 As shown, in some embodiments, the method further includes:
[0191] Step 13: When the first file is accessed and there is at least one second file in the reference chain of the first file that is offline, and there is no third file in the reference chain that is online, update the relevant content in the first file based on at least the content determined based on the second file that is offline.
[0192] In some optional embodiments, the method for processing file references provided by the embodiments of the present disclosure may include step 11 and step 13.
[0193] In some embodiments, updating the relevant content in the first file based at least on the content of the second file in an offline state in step 13 may include: for the same reference chain, updating the relevant content in the first file based at least on the content determined based on the second file in an offline state.
[0194] In some embodiments, for the same reference chain, updating the relevant content in the first file based on at least the content determined in the second file in an offline state includes: updating the first file based on at least the modified content of the second file in an offline state.
[0195] like Figure 3 As shown, for example, file B2 is offline, and files C3 and C4 are offline; then file A is determined by file B2. Optionally, the updated content of file A can also be determined based on files B2 and C3.
[0196] In this way, when the second file in the same reference chain is offline and there is no third file in an online state, it can also be updated according to the second file version in the offline state. For example, it can be updated according to the second file version of the second file in the offline state that was most recently saved by the second file, so as to ensure the consistency of data between the first file and the second file as much as possible.
[0197] For example, Figure 6 As shown, the method for processing file references provided by the embodiment of the present disclosure may include the following steps:
[0198] Step 11: Determine that the first file is a file with a cascading reference relationship, the cascading reference relationship indicates the reference relationship between the first file, the second file and the third file, and the reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file.
[0199] Step 141 , when a first file is accessed, it is determined that there is at least one second file in the reference chain of the first file that is in an offline state; then step 1411 or step 1412 is executed.
[0200] Step 1411: when there is a third file in the reference chain in an online state, update the relevant content in the first file based on at least the content determined from the second file in the offline state to the third file in the online state in the reference chain.
[0201] Step 1412: When there is no third file in the reference chain that is in an online state, update the relevant content in the first file based on at least the content determined based on the second file that is in an offline state.
[0202] Step 142 , when the first file is accessed, it is determined that there is at least one second file in the reference chain of the first file that is online; then step 1421 is executed.
[0203] Step 1421: Update the relevant content in the first file based on at least the file-determined content of the second file in the online state in the reference chain.
[0204] Thus, in the disclosed embodiment, the update of the first file can be determined according to whether there is a second file in the reference chain of the first file that is offline or online; for example, if there is a second file that is offline, the existence of the offline file hinders the change transmission of the lower-level file in the reference chain, and the first file can be updated by further determining whether there is a third file that is online; if there is a third file that is online, the first file can be updated based on the content determined from the second file that is offline to the third file that is online, thereby solving the problem that the existence of the offline file hinders the change transmission of the lower-level file in the reference chain, realizing the intercommunication of data between files, so that the data in the cascade reference relationship can be kept consistent, or if there is no third file that is online, the first file can be updated at least based on the second file in the offline state, and the consistency of data between the first file and the second file can be maintained as much as possible; for another example, if there is a second file that is online, the first file can be directly updated based on the second file in the online state, thereby also realizing the intercommunication of data between files, and ensuring the consistency of data between the first file and the second file.
[0205] In the above description, when the files with reference relationship are all online, the changes can be updated in time based on subscription. For example, the first file references the second file, and the second file references the third file. When the first file and the second file are both online, the first file can subscribe to the changes of the second file to update the relevant content in the first file based on the changes of the second file. Similarly, when the second file and the third file are both online, the second file can subscribe to the changes of the third file to update the relevant content in the second file based on the changes of the third file.
[0206] In an embodiment of the present disclosure, for a first file having a cascading reference relationship, in the same reference chain of the first file, if at least one of the second files exists in the reference chain of the first file, and / or at least one of the third files exists in an online state, the first file is displayed, wherein the content displayed by the first file is determined based at least on the files in the reference chain from the first file to the files in an online state. If there are offline files in the reference chain from the first file to the files in an online state, the changes cannot be updated in a timely manner by subscription due to the existence of the offline files. In this embodiment, the first file can be used to replace the offline file to subscribe to the online file in the reference chain, so as to bypass the offline file and update the changes of the online file to the first file in a timely manner.
[0207] Specifically, Figure 7 As shown, the embodiment of the present disclosure provides a subscription relationship between a first file and other files when a second file is online. The first file references the second file; the part of the second file referenced by the first file indirectly references the third file. One case is: the second file is offline, and the first file replaces the second file to subscribe to the third file. Another case is: the second file is online, and the first file subscribes to the second file.
[0208] In some embodiments, in order to ensure the security of files, for files with reference relationships, when transferring changes along the reference chain, it is necessary to consider the user permissions of each file in the reference chain. For example, if the user who opens the first file does not have access rights to the second or third file, it is set that the changes of the second or third file cannot be transferred along the reference chain to the first file.
[0209] In some technical solutions, if a user needs to open the first file, no matter which user it is, it is necessary to grant the user access rights to the second file so that the changes in the second file referenced by the first file can be updated and displayed in the first file; if there are multiple users, it is necessary to authorize access rights to the second file for multiple users, which makes the process very cumbersome. In the embodiment of the present disclosure, it is not necessary to set access rights to the second file for each user. It is only necessary to grant the first file access rights to the second file, and the content or changes in the content of the second file referenced by the first file can be updated in the first file, reducing the cumbersome process of file authorization. Furthermore, it can be set that all upper-level files in the reference chain of the first file authorize lower-level files, so that changes in lower-level files in the reference chain of the first file can be transmitted along the reference chain and updated to the first file.
[0210] like Figure 8 As shown, in some embodiments, the method further includes:
[0211] Step 15: When the user accessing the first file is the first user, a first request initiated by the first user is obtained, where the first request is used to grant the first file permission for the second file, and the first user has permission to access the first file and the second file.
[0212] Optionally, obtaining the first request initiated by the first user includes: obtaining the first request initiated by the first user sent by the client.
[0213] In some embodiments, it can be considered that once the server receives the first request sent by the client for requesting authorization, the server will execute the operation of granting the first file permission to the second file, so that the client determines that the first file has been granted permission to the second file.
[0214] In other embodiments, after receiving the first request for authorization sent by the client, the server may determine whether to grant the first file permission for the second file based on the first request. For example, the server obtains the first file and determines whether to grant the first file permission for the second file.
[0215] Optionally, the permissions of the first file for the second file can be considered as file permissions rather than simple user permissions. Granting the first file permissions for the second file means that the server can bypass the user permission judgment for accessing the first file and the second file, and when the first file has permissions for the second file, the content of the first file can be updated based on the changes in the second file. Currently, the premise for granting the first file permissions for the second file is that the user logged in by the client initiating the first request is the first user, and the first user has permissions to access the first file and the second file. In other words, in the embodiment of the present disclosure, the user permissions are actually judged in advance, and there is no need to judge the user permissions again during the file update stage, which improves the efficiency of file updates and reduces the frequency of updates being blocked.
[0216] In some embodiments, when the first file is granted permission for the second file, any user with access rights to the first file accesses the first file, which can trigger the first file to update the content related to the second file. In order to save server resources, optionally, in the case where there is no user accessing the first file, the update of the first file is not triggered. In the case where the first file is not granted permission for the second file, only the first user can trigger the first file to update the content related to the second file, and the first user is a user with access rights to the first file and the second file.
[0217] Further, after the triggering of the first file to update the content related to the second file is completed, the updated content related to the second file in the first file can be set to display in different ways.
[0218] Optionally, the first display method is: any user with access rights to the first file, regardless of whether or not he has access rights to the second file, can view the content related to the first file and the second file. Since granting the first file permission to the second file means that the server can bypass the user permission judgment for accessing the first file and the second file, when the first file has permission to the second file, the content of the first file can be updated based on the changes in the second file; in this way, even if the second user does not have access rights to the second file, since the first file is granted permission to the second file, the changes in the second file can be updated to the first file, thereby realizing effective management based on file-level authorization.
[0219] The second display method is: the content related to the second file updated in the first file is displayed based on the user's access rights to the second file. For example, if the user has access rights to the first file but does not have access rights to the second file, the user cannot view the content related to the second file in the first file. In this way, the corresponding content can be displayed when accessing the first file based on the first file's permissions to the second file and / or whether the user has access rights to the referenced second file, so that non-private data can be displayed externally and private data is strictly kept confidential, reducing the risk of private data being leaked while achieving effective permission control.
[0220] The third display mode is: the content related to the content of the second file referenced in the first file is displayed as the first information, and the first information is used to indicate the referenced content of the second file. In this way, the content that is not granted with file permissions will not be referenced and displayed, thereby improving the security of private data.
[0221] In some embodiments, when the first file is granted permission for the second file, the second display mode is adopted. When the first file is not granted permission for the second file, the third display mode is adopted.
[0222] In some embodiments, when the first file is granted permission for the second file, the first display mode is adopted. When the first file is not granted permission for the second file, the second display mode is adopted.
[0223] In some embodiments, when the first file is granted permission for the second file, the first display mode is adopted. When the first file is not granted permission for the second file, the third display mode is adopted. For the sake of clarity, this embodiment is described in this display mode, and other display modes are similar.
[0224] In the embodiment of the present disclosure, during the process of accessing the first file, the first file can be granted permission for the second file; during the process of accessing the second file, the second file can be granted permission for the third file; during the process of accessing the third file, the third file can be granted permission for other third files.
[0225] In the disclosed embodiment, if it is determined that the first file is granted permission for the second file, the first file is updated with the relevant content determined at least based on the content of the second file that is online. In this way, even if the second user does not have access rights to the second file, since the first file is granted permission for the second file, the changes in the second file can be updated to the first file without the need for user authorization of the file, thereby achieving effective management based on file-level authorization. Similarly, if all upper-level files in the reference chain of the first file authorize lower-level files, the changes in lower-level files in the reference chain of the first file can be transmitted and updated to the first file along the reference chain.
[0226] It should be noted that, when the user accessing the first file is the second user, if the second user does not have permission to access the second file, the second user cannot initiate the first request, or the server rejects the first request initiated by the second user, or the server determines not to grant the first file permission to the second file in response to the first request initiated by the second user.
[0227] In some embodiments, when the second file is accessed and the second file references a third file, the first request is also used to request that the second file be granted permission for the third file. When the third file is accessed and the third file references other third files, the first request is also used to request that the third file be granted permission for other third files.
[0228] like Fig. 9 As shown, the method for processing file references provided by the embodiment of the present disclosure may include at least one of the following authorization situations and an update method of the first file corresponding to each authorization situation:
[0229] The first authorization situation: the first file does not authorize the second file's permissions. The first authorization situation may correspond to the first update method or the second update method.
[0230] The first updating method: when there is at least one second file in the reference chain of the first file that is offline and there is a third file in the reference chain that is online, the related content of the second file referenced in the first file is updated and displayed as the first information, and the first information is used to indicate the content of the referenced second file.
[0231] The second updating method: when there is at least one second file online in the reference chain of the first file, the relevant content of the first file that references the content of the second file is updated to the first information, and the first information is used to indicate the content of the referenced second file.
[0232] The second authorization situation: the first file grants the permission to the second file. The second authorization situation may correspond to the third update method and the fourth update method.
[0233] The third update method: in the case where there is at least one second file in an offline state in the reference chain of the first file, and there is a third file in an online state in the reference chain, a reference subchain is determined in the reference chain, the reference subchain indicates the reference relationship between the second file in an offline state and the third file in an online state, and the update method is determined according to whether there is a group of files with direct reference relationships in the reference subchain that are not authorized. The third update method may include: a first sub-update method and a second sub-update method.
[0234] First sub-update method: When there is a group of files with direct reference relationship in the reference sub-chain that are not authorized, there are the first and second cases:
[0235] The first case: determining the relevant content in the first file that refers to the content of the second file based at least on the second file in an offline state.
[0236] The second situation: the relevant content in the first file that references the content of the second file is updated to the first information, where the first information is used to indicate the referenced content of the second file.
[0237] Second sub-update method: When all files with direct reference relationships in the reference sub-chain are authorized, there is a third situation:
[0238] The third case: determining the relevant content of the first file that refers to the content of the second file based at least on all files in the reference chain from the second file in an offline state to the third file in an online state.
[0239] Fourth updating method: when there is at least one second file in the reference chain of the first file that is online, determine the relevant content of the first file that references the content of the second file based at least on the second file that is online.
[0240] In some embodiments, for the first updating method, for example, updating the relevant content in the first file in step 121 based on at least the content determined in the reference chain from the second file in an offline state to the third file in an online state includes: when the first file is not granted permission for the second file, updating the relevant content of the second file content referenced in the first file is displayed as first information, and the first information is used to indicate the referenced second file content.
[0241] Optionally, the first information may include at least one of the following: a link, a formula, a character string, an icon, etc.
[0242] Optionally, for the same reference chain of the first file, when the first file is not granted permission to the second file, but the second file in the reference chain is granted permission to the third file, and / or the third file in the reference chain is granted permission to other third files, if the second file is offline, the relevant content of the second file referenced in the first file is updated and displayed as the first information.
[0243] In some embodiments, for the second updating method, for example, updating the relevant content in the first file in step 122, which is at least based on the content determined by the second file that is online in the reference chain, includes: when the first file is not granted permission for the second file, the relevant content in the first file that references the content of the second file is updated to first information, and the first information is used to indicate the content of the referenced second file.
[0244] Optionally, for the same reference chain of the first file, when the first file is not granted permission to the second file, but the second file in the reference chain is granted permission to the third file, and / or the third file in the reference chain is granted permission to other third files, if the second file is online, the relevant content of the second file referenced in the first file is updated and displayed as the first information.
[0245] In the disclosed embodiment, when it is determined that the first file is not granted permission for the second file, regardless of whether the second file is in an offline state or an online state, it is displayed as the first information, so that the content for which the file permission is not granted is not referenced and displayed, thereby improving the security of private data.
[0246] In some embodiments, for the first case of the first sub-update method of the third update method, for example, the method further includes:
[0247] In the case where it is determined that the first file is granted the permission for the second file, a reference subchain is determined in the reference chain, the reference subchain indicating a reference relationship between files from the second file in an offline state to a third file in an online state;
[0248] When it is determined that a group of files having a direct reference relationship exists in the reference subchain but is not authorized, the relevant content in the first file that references the content of the second file is determined based at least on the second file in an offline state.
[0249] For example, Figure 3 As shown, file A references file B2, file B2 references file C3, and file C3 references file C4; file A is granted permission for file B2, but file B2 is not granted permission for file C3 and / or file C3 is not granted permission for file C4. If file B2 is offline, file A is updated according to file B2.
[0250] In an optional embodiment, the method further includes: in the same reference chain, when the first file is granted permission for the second file, but the second file is not granted permission for the third file, then, according to the connection status of the second file, the relevant content in the first file that references the content of the second file is updated. If the connection status of the second file is online, the first file is updated according to the second file in the online state; or, if the connection status of the second file is offline, the first file is updated according to the second file in the offline state.
[0251] For example, Figure 3 As shown, file A references file B2, and file B2 references file C3; file A is granted permission for file B2, but file B2 is not granted permission for file C3. If file B2 is online, file A is updated according to file B2; or, if file B2 is offline, file A can also be updated according to file B2.
[0252] In an embodiment of the present disclosure, when it is determined that the first file is granted permission to have access to the second file, it can be determined that the first file should be updated based at least on the second file that is in an offline state, based on the fact that there is a group of files with a direct reference relationship in the reference sub-chain that are not authorized, so as to ensure the consistency of data between the first file and the second file as much as possible.
[0253] In some embodiments, for the second situation of the first sub-update method of the third update method, for example, the method further includes:
[0254] In the case where it is determined that the first file is granted the permission for the second file, a reference subchain is determined in the reference chain, the reference subchain indicating a reference relationship between files from the second file in an offline state to a third file in an online state;
[0255] When it is determined that a group of files with a direct reference relationship exists in the reference subchain and are not authorized, the relevant content in the first file that references the second file content is updated to first information, where the first information is used to indicate the referenced second file content.
[0256] In an optional embodiment, the method further includes: in the same reference chain, when the first file is granted permission for the second file but the second file is not granted permission for the third file, updating the relevant content in the first file that references the second file to display as the first information.
[0257] For example, Figure 3 As shown, file A references file B2, file B2 references file C3, and file C3 references file C4; file A is granted permission for file B2, but file B2 is not granted permission for file C3; then the relevant content in the first file that references the second file is updated and displayed as the first information.
[0258] In an optional embodiment, the method further includes: if there is a case in the reference chain where no file permission is granted, the first information may be displayed.
[0259] For example, Figure 3 As shown, file A references file B2, file B2 references file C3, and file C3 references file C4; wherein, file A is not granted permission for at least one of file B2, file B2 for file C3, and file C3 for file C4, then the relevant content of file A referencing file B2 is updated and displayed as the first information.
[0260] In an optional embodiment, in the same reference chain, if the second file is an offline file, the first file is granted permission to the second file, and the second file is granted permission to the directly referenced third file, wherein the second file indirectly references other third files through the directly referenced third file, and the third file directly referenced by the second file references other third files; but the third file directly referenced by the second file is not granted permission to other third files, then the relevant content in the first file that references the second file is updated and displayed as the first information.
[0261] For example, Figure 3 As shown, file A references file B2, file B2 references file C3, and file C3 references file C4; wherein, file C3 is not granted permission for file C4, then the relevant content of file A that references file B2 is updated and displayed as the first information.
[0262] In this way, when there is a case in the reference chain where file permissions are not granted, all of them are displayed as the first information, thereby further improving the security of private data.
[0263] In some embodiments, for the third case of the second sub-update method of the third update method, for example, the method also includes: when it is determined that all files with a direct reference relationship in the reference sub-chain are authorized, at least based on all files in the reference chain from the second file in an offline state to the third file in an online state, the relevant content of the second file content referenced in the first file is determined.
[0264] For example, Figure 3 As shown, file A is granted to file B2, and file B2 is granted to file C3; file B2 is in an offline state, and file C3 is in an online state, then file A is determined based on file B2 and file C3.
[0265] Exemplarily, the relevant content of the second file referenced in the first file is determined based at least on all files in the reference chain from the second file in an offline state to the third file in an online state, including: when a part of the third file in an online state referenced by the files in the reference chain is changed, updating the relevant content of the content determined in the first file based at least on the changes of the second file in an offline state and the third file in an online state.
[0266] Specifically, when a part of a third file in an online state that is referenced by a file in a reference chain is changed, the first file is updated with relevant content based at least on the content determined by all offline files in the reference chain from the second file in an offline state to the third file in an online state and the changes to the third file in the online state.
[0267] In the embodiment of the present disclosure, when it is determined that the first file is granted permission to have access to the second file, it can be determined to update the first file based on the second file in an offline state and the third file in an online state, based on the fact that all files with a direct reference relationship in the reference sub-chain are authorized, thereby achieving timely updating of data between files.
[0268] In some embodiments, for the fourth updating method, for example, updating the relevant content in the first file in step 122 based on at least the content determined by the second file in an online state in the reference chain includes: when granting the first file permission for the second file, determining the relevant content of the second file referenced in the first file based on at least the second file in an online state.
[0269] Exemplarily, the first file is granted for the second file, and the second file is online, then the relevant content in the first file that refers to the content of the second file is determined based at least on the second file that is online.
[0270] In the embodiment of the present disclosure, when the first file is granted permission for the second file, if the second file is an online file, the first file can be updated based on the second file, thereby achieving timely update of data between files.
[0271] In order to clearly explain the file authorization, this application takes granting a first file permission to a second file as an example for explanation.
[0272] In some embodiments, the permission of the first file to the second file includes one of the following:
[0273] A first sub-right, wherein the first sub-right is used to indicate the permission granted to the first file for all contents of the second file;
[0274] The second sub-right is used to indicate the right granted to the first file for a predetermined portion of content of the second file.
[0275] For example, if it is determined that the first file is granted the first sub-rights for the second file, when any content of the second file is modified, the content related to the second file can be updated in the first file.
[0276] Exemplarily, if it is determined that the first file is granted the second sub-rights for the second file, such as granting the first file the second sub-rights for the first second content of the second file, but not granting the second sub-rights for the second second content of the second file; then when the first second content of the second file is changed, the content related to the first second content of the second file can be updated in the first file; and when the second second content of the second file is changed, the content related to the second second content of the second file cannot be updated in the first file. Here, the first second content of the second file is a predetermined part of the content. Optionally, the first second content and the second second content of the second file can both be considered as sub-files of the second file.
[0277] Exemplarily, the first second content and the second second content of the second file in the above example can both be considered as subfiles of the second file. For example, the first second content and the second second content of the second file can be divided into the first subfile and the second subfile of the second file respectively, and the first subfile and the second subfile can be two files stored in the same storage location; if the first file is granted permission for the first subfile and the first file is not granted permission for the second file, then in the case of a change in the first subfile, the content related to the changed content of the first subfile can be updated in the first file, and / or, in the case of a change in the second subfile, the changed content of the second subfile cannot be updated in the first file.
[0278] In the embodiments of the present disclosure, the first file can authorize the entire second file, or the first file can authorize part of the content of the second file; if the first file authorizes part of the content of the second file, smaller granularity authorization management can be achieved.
[0279] In the embodiments of the present disclosure, when there are multiple files, at least some of the files can be opened to the outside and / or at least some of the files can be kept confidential, or at least some of the content in a file can be opened to the outside and / or at least some of the content can be kept confidential, thereby flexibly achieving effective permission management over the data of multiple files.
[0280] In some embodiments, the permission of the first file to the second file may include a subscription permission. Optionally, both the first sub-permission and the second sub-permission may refer to a subscription permission.
[0281] The first sub-rights may refer to the right to grant the first file to subscribe to the entire contents of the second file; that is, the first sub-rights are file-level subscription rights. For example, if the first file is granted the first sub-rights for the second file, the first file or part of the first file's contents may subscribe to the entire contents of the second file.
[0282] The second sub-rights may refer to the right to grant the first file to subscribe to a predetermined part of the content of the second file; that is, the second sub-rights may be a content-level right. For example, the second file includes a first second content and a second second content; if the first file is granted the second sub-rights for the second file, and the first second content is a predetermined part of the content, then the part of the content of the first file may subscribe to the first second content of the second file; or, if the first file is granted the second sub-rights for the second file, and the second second content is a predetermined part of the content, then the part of the content of the first file may subscribe to the second second content of the second file.
[0283] In some embodiments, granting the first file permission for the second file may include: granting at least one first file permission for the second file. Optionally, granting multiple first files permission for the second file. In this way, granting multiple files to one file can be achieved.
[0284] In some other embodiments, granting the first file permission for the second file may include: granting a first file permission for at least one second file.
[0285] Optionally, the first file is granted permissions for multiple second files, so that one file can grant permissions to multiple files.
[0286] Optionally, the first file is granted permission for the first part of the content of the first second file, and the first file is granted permission for the second part of the content of the second second file. In this way, the granting control of one file for different parts of the content of multiple files can be achieved.
[0287] Optionally, the first file is granted the first sub-rights for some of the second files among the multiple second files and the second sub-rights for the other parts of the second files. Exemplarily, the first file is granted the rights for three second files; wherein, the first file is granted the first sub-rights for the first second file, the first file is granted the second sub-rights for the first part of the content of the second second file, and the first file is granted the second sub-rights for the second part of the content of the third second file. In this way, one file can be authorized to the entire contents of some files among multiple files and / or to the partial contents of some files, thereby achieving more flexible file authorization management and control.
[0288] The following is a method for processing file references executed by the client, which is similar to the description of the method for processing file references executed by the server mentioned above; for technical details and beneficial effects not disclosed in the embodiment of the method for processing file references executed by the client in the disclosed embodiment, please refer to the description of the embodiment of the method for processing file references executed by the server in the disclosed embodiment, which will not be repeated here.
[0289] like Fig.10 As shown, the second aspect of the embodiment of the present disclosure provides a method for processing file references, which is applied to a client and includes:
[0290] Step 21: accessing a first file, wherein the first file is a file having a cascading reference relationship, the cascading reference relationship indicates a reference relationship among the first file, the second file, and the third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file;
[0291] Step 22: Display the first file when there is at least one second file in the reference chain of the first file and / or when there is at least one third file online, wherein the content displayed by the first file is determined based at least on the files in the reference chain from the first file to the files online.
[0292] In some embodiments, the first file, the second file, and the third file may be the first file, the second file, and the third file in the above embodiments, respectively; the first user and the second user may be the first user and the second user in the above embodiments, respectively; the direct reference and the indirect reference may be the direct reference and the indirect reference in the above embodiments, respectively.
[0293] In some embodiments, the method also includes: displaying the first file when there is at least one second file in the reference chain of the first file that is in an offline state and there is no third file in the reference chain that is in an online state, and the content displayed by the first file is determined at least based on the second file that is in an offline state.
[0294] In some embodiments, the content displayed by the first file is determined based at least on the files in the reference chain from the first file to the files in the online state, including: when there is at least one second file in the reference chain of the first file that is offline, and there is a third file in the reference chain that is online, the content displayed by the first file is determined based at least on the files in the reference chain from the second file in the offline state to the third file in the online state.
[0295] In some embodiments, the content displayed by the first file is determined based at least on the files in the reference chain from the first file to the files in an online state, including: when there is at least one second file in the reference chain of the first file that is online, the content displayed by the first file is determined based at least on the second file in the reference chain that is online.
[0296] In some embodiments, the method further includes: when the user accessing the first file is the first user, sending a first request initiated by the first user, the first request is used to grant the first file permission for the second file, and the first user has permission to access the first file and the second file.
[0297] In some embodiments, the content displayed by the first file is determined based at least on the files in the reference chain from the second file in an offline state to the third file in an online state, including: when the first file is not granted permission for the second file, the relevant content in the first file that references the content of the second file is displayed as first information, and the first information is used to indicate the content of the referenced second file.
[0298] In some embodiments, the method further includes: in a case where the first file is granted permission for the second file, determining a reference subchain in the reference chain, the reference subchain indicating a reference relationship between files from the second file in an offline state to a third file in an online state;
[0299] In which, when there is a group of files with a direct reference relationship in the reference sub-chain that are not authorized, the relevant content of the first file that references the second file content is determined at least based on the second file that is in an offline state, or the relevant content of the first file that references the second file content is displayed as first information, and the first information is used to indicate the referenced second file content.
[0300] In some embodiments, when all files with direct reference relationships in the reference sub-chain are authorized, the relevant content of the first file that references the content of the second file is determined based at least on all files in the reference chain from the second file in an offline state to the third file in an online state.
[0301] In some embodiments, the relevant content of the second file referenced in the first file is determined based on at least all files in the reference chain from the second file in an offline state to the third file in an online state, including: when the part of the third file in an online state referenced by the files in the reference chain is changed, the content displayed by the first file is determined based on at least the changes of the second file in an offline state and the third file in an online state.
[0302] In some embodiments, the content displayed by the first file is determined based on at least a second file in an online state in the reference chain, including:
[0303] In the case where the first file is not granted permission for the second file, the relevant content in the first file that refers to the content of the second file is displayed as first information, and the first information is used to indicate the referenced content of the second file; or
[0304] In the case where the first file authorizes the second file, the relevant content in the first file that refers to the content of the second file is determined based at least on the second file that is in an online state.
[0305] In order to further explain any embodiment of the present disclosure, several specific embodiments are provided below. The following specific embodiments take the cascade reference of three layers of files as an example; wherein the cascade reference relationship of the three layers of files is: the first file references the second file, and the second file references the third file.
[0306] Example 1
[0307] like Fig.11 As shown, a method for processing file references is provided in an embodiment of the present disclosure, which is executed by a server and includes the following steps:
[0308] Step 31: Determine that the first file references the second file, and obtain the content of the second file.
[0309] Optionally, when the second file is online, the server obtains the first file version of the second file. Here, both the first file and the second file are online, and the first file has been granted permission for the second file, and the first file can subscribe to the second file; the first file version is the version of the second file in the online state. The server can also send the first file version to the client. Here, since both the first file and the second file are online files, the generated subscription relationship can be: the first file subscribes to the second file.
[0310] Optionally, when the second file is in an offline state, the server obtains the second file version of the second file. Here, the first file is in an online state and the second file is in an offline state, and the first file has been granted permission for the second file. Since the second file is in an offline state, the first file cannot subscribe to the real-time update of the second file; the second file version is the version of the second file in the offline state. The server can also send the second file version to the client.
[0311] Step 32: Determine whether the second file has a reference; if not, end; if so, execute step 33.
[0312] Optionally, the server can determine whether the second file contains a link to the third file based on the first file version of the second file or the second file version of the second file; if so, execute step 33; if not, it means that no matter whether the second file is online or offline, there is no update of the third file that will affect the content of the second file, then only the first file version of the second file or the second file version of the second file is needed to determine the content of the first file, and the process can be terminated after the content of the first file is determined. For example, when the first file is a table and the first file references the second file by referencing the cell of the second file in the cell of the first cell, after obtaining the content of the second file and calculating the content of the first file, the result of the calculation is displayed and the calculation is terminated.
[0313] Step 33: Determine that the first file has an indirect reference relationship with the third file.
[0314] Optionally, the server determines that there is a link containing a third file, and determines that the first file and the third file have an indirect reference relationship. Here, since the second file is offline, the first file cannot subscribe to the second file; but since the first file can indirectly reference the third file through the second file, the subscription relationship can be generated as follows: the first file subscribes to the third file on behalf of the second file.
[0315] Step 34: Based on the indirect reference relationship between the first file and the third file, obtain the content of the third file.
[0316] Optionally, for the same reference chain, when the second file is offline and the third file directly referenced by the second file is online, the server obtains the first file version of the third file, where the first file version is the version of the third file in the online state. The server may also send the first file version of the third file to the client.
[0317] Step 35: Based on the content of the third file, determine the second file with the modified content.
[0318] Optionally, the server may determine that the second file references relevant content of the third file based on the first file version of the third file and the second file version of the second file, and generate a new second file; the new second file is the second file with modified content.
[0319] Step 36: Update the first file with content related to the modified content of the second file.
[0320] Optionally, the server updates the relevant content of the referenced second file in the first file based on the second file with modified content.
[0321] The subscription relationship in the embodiment of the present disclosure may be: when the second file is online, the first file subscribes to the second file; or, when the second file is offline and the third file is online, the first file (on behalf of the second file) subscribes to the third file.
[0322] In the disclosed embodiment, when the first file references the second file and the second file is not online (in an offline state), the indirect reference relationship between the second file and the third file can be determined, so that the first file can subscribe to the third file (on behalf of the second file) and the first file can be updated when the third file is modified.
[0323] For example, in scenarios where data associations are relatively long, this method is prone to occur: the bottom layer collects business data, and the files on the data collection end are online in real time; the middle layer aggregates the bottom layer data into intermediate data files, and the rules of the data files are fixed and often offline; then the upper layer organizes the intermediate data files and generates a file for display. The disclosed embodiment can solve the problem in the above scenario that when displaying, the bottom layer data source is changed, but the intermediate summary data file is not online and cannot be synchronized to the display file; that is, when the bottom layer data source is changed, even if the intermediate summary data file is not online, it can be synchronized to the upper layer display file.
[0324] Example 2
[0325] like Fig.12 As shown, a method for processing file references is provided in an embodiment of the present disclosure, comprising the following steps:
[0326] Here, the first file references the second file, and the second file references the third file; if the second file is offline and the third file is online, the first file subscribes to the third file; or, if the second file is online, the first file subscribes to the second file.
[0327] In the case where the first file subscribes to the third file, step 41 is executed.
[0328] Step 41: The server determines that the third file is changed.
[0329] Step 42: The server notifies the temporary processor of the second file to update the third file.
[0330] Step 43: The temporary processor of the second file obtains a third file with changed content. Optionally, the third file with changed content may be a version of the first file.
[0331] Step 44: The temporary processor of the second file sends the third file whose content is changed and obtained by calculation to the temporary processor of the first file.
[0332] Here, the temporary processor of the second file may perform calculation based on the third file with changed content and the second file version of the stored second file to obtain the second file with changed content, and the second file is in an offline state.
[0333] Optionally, step 44 may be replaced by: the temporary processor of the second file sends the stored second file version of the second file and the third file with changed content (e.g., the first file version of the third file) to the temporary processor of the first file. Here, the first temporary processor may determine the second file with changed content based on the second file version of the second file and the first file version of the third file.
[0334] In the embodiment of the present disclosure, when the first file references the second file and the second file references the third file, and the second file is not online, the changes in the second file content due to the changes in the third file can be determined by obtaining the third file whose content has changed and the content of the second file in an offline state, and then the content related to the changes in the second file content is updated in the first file to achieve the first file referencing the content of the third file. In this way, when the intermediate file is not online in the cascade reference scenario, the upper file (i.e., the first file) can also reference the changes in the data source of the underlying file (i.e., the third file).
[0335] like Fig.13 As shown, the present disclosure provides a file reference processing device, including:
[0336] A first determination module 51 is configured to determine that the first file is a file with a cascading reference relationship, where the cascading reference relationship indicates a reference relationship among the first file, the second file, and the third file, and a reference chain formed according to the reference relationship, where the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file;
[0337] The update module 52 is configured to update the relevant content in the first file based on at least the content determined in the files in the reference chain from the first file to the online file when the first file is accessed and there is at least a second file in the reference chain of the first file, and / or there is at least a third file in an online state.
[0338] A file reference processing device provided by an embodiment of the present disclosure is applied in a server.
[0339] In some embodiments, the update module 52 is configured to update the relevant content in the first file based on at least the content determined based on the second file in an offline state when the first file is accessed and there is at least one second file in the reference chain of the first file in an offline state, and there is no third file in an online state in the reference chain.
[0340] In some embodiments, the update module 52 is configured to update the relevant content in the first file based on at least the content determined from the second file in the offline state to the third file in the online state in the reference chain, when there is at least one second file in the reference chain of the first file that is offline and there is a third file in the online state in the reference chain.
[0341] In some embodiments, the update module 52 is configured to update the relevant content of the first file based on at least the content determined by the second file in the reference chain that is online, when there is at least one second file in the reference chain of the first file that is online.
[0342] In some embodiments, the device also includes: an acquisition module, which is configured to acquire a first request initiated by the first user when the user accessing the first file is the first user, the first request is used to grant the first file permission to the second file, and the first user has permission to access the first file and the second file.
[0343] In some embodiments, the update module 52 is configured to update the related content in the first file that references the content of the second file to be displayed as first information when the first file is not granted permission for the second file, where the first information is used to indicate the referenced content of the second file.
[0344] In some embodiments, the first determination module 51 is configured to determine a reference subchain in the reference chain when determining that the first file is granted permission for the second file, the reference subchain indicating a reference relationship between files from the second file in an offline state to the third file in an online state;
[0345] The update module 52 is configured to determine the relevant content of the second file content referenced in the first file based on at least the second file in an offline state when it is determined that there is a group of files with a direct reference relationship in the reference sub-chain that are not authorized, or to update the relevant content of the second file content referenced in the first file to the first information, where the first information is used to indicate the referenced second file content.
[0346] In some embodiments, the update module 52 is configured to determine the relevant content of the second file referenced in the first file based at least on all files in the reference chain from the second file in an offline state to the third file in an online state, when it is determined that all files with a direct reference relationship in the reference sub-chain are authorized.
[0347] In some embodiments, the update module 52 is configured to update the relevant content of the first file based on at least the content determined based on the changes of the second file in the offline state and the third file in the online state when the part referenced by the file in the reference chain of the third file in the online state is changed.
[0348] In some embodiments, the updating module 52 is configured to update the relevant content in the first file that references the content of the second file to first information when the first file is not granted permission for the second file, where the first information is used to indicate the referenced content of the second file; or
[0349] The updating module 52 is configured to determine, when the first file authorizes the second file, relevant content in the first file that refers to the content of the second file based at least on the second file being in an online state.
[0350] like Fig.14 As shown, the present disclosure provides a file reference processing device, including:
[0351] The access module 61 is configured to access a first file, wherein the first file is a file having a cascade reference relationship, the cascade reference relationship indicates a reference relationship among the first file, the second file and the third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file;
[0352] The display module 62 is configured to display the first file when there is at least one second file in the reference chain of the first file and / or when there is at least one third file online, wherein the content displayed by the first file is determined based on at least one file in the reference chain from the first file to the file in the online state.
[0353] A file reference processing device provided by an embodiment of the present disclosure is applied to a service end (or server).
[0354] In some embodiments, the display module 62 is configured to display the first file when there is at least one second file in the reference chain of the first file that is offline and there is no third file in the reference chain that is online, and the content displayed by the first file is determined at least based on the second file that is offline.
[0355] In some embodiments, the display module 62 is configured to display the first file when there is at least one second file in the reference chain of the first file that is offline and there is a third file in the reference chain that is online, and the content displayed by the first file is determined based on at least the files in the reference chain from the second file in the offline state to the third file in the online state.
[0356] In some embodiments, the display module 62 is configured to display the first file when there is at least one second file online in the reference chain of the first file, and the content displayed by the first file is determined based on at least the second file online in the reference chain.
[0357] In some embodiments, the device also includes: a sending module, which is configured to send a first request initiated by the first user when the user accessing the first file is the first user, the first request is used to grant the first file permission to the second file, and the first user has permission to access the first file and the second file.
[0358] In some embodiments, the display module 62 is configured to display the relevant content in the first file that references the content of the second file as first information when the first file is not granted permission for the second file, where the first information is used to indicate the referenced content of the second file.
[0359] In some embodiments, the apparatus further comprises: a second determination module configured to, in the case of determining that the first file is granted permission for the second file, determine a reference subchain in the reference chain, the reference subchain indicating a reference relationship between files from the second file in an offline state to a third file in an online state;
[0360] In which, when there is a group of files with a direct reference relationship in the reference sub-chain that are not authorized, the relevant content of the first file that references the second file content is determined at least based on the second file that is in an offline state, or the relevant content of the first file that references the second file content is displayed as first information, and the first information is used to indicate the referenced second file content.
[0361] In some embodiments, when all files with direct reference relationships in the reference sub-chain are authorized, the relevant content of the first file that references the content of the second file is determined based at least on all files in the reference chain from the second file in an offline state to the third file in an online state.
[0362] In some embodiments, the relevant content of the second file referenced in the first file is determined based on at least all files in the reference chain from the second file in an offline state to the third file in an online state, including: when the part of the third file in an online state referenced by the files in the reference chain is changed, the content displayed by the first file is determined based on at least the changes of the second file in an offline state and the third file in an online state.
[0363] In some embodiments, the content displayed by the first file is determined based on at least a second file in an online state in the reference chain, including:
[0364] In the case where the first file is not granted permission for the second file, the relevant content in the first file that refers to the content of the second file is displayed as first information, and the first information is used to indicate the referenced content of the second file; or
[0365] In the case where the first file authorizes the second file, the relevant content in the first file that refers to the content of the second file is determined based at least on the second file that is in an online state.
[0366] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0367] An embodiment of the present disclosure further provides an electronic device, including:
[0368] processor;
[0369] a memory for storing processor-executable instructions;
[0370] The processor is configured to implement the file reference processing method of any embodiment of the present disclosure when running executable instructions.
[0371] The electronic device may be the terminal in the above embodiment.
[0372] The memory may include various types of storage media, which are non-transitory computer storage media that can continue to remember information stored thereon after the communication device loses power.
[0373] The processor can be connected to the memory through a bus or the like to read the executable program stored in the memory, for example, to implement the following Figure 2 , Figure 4 , Figure 5 , Figure 6 , Figures 8 to 12 The method for handling file references shown in any of the items.
[0374] like Fig.15 FIG. 1 is a diagram showing a structure of an electronic device 70 according to an exemplary embodiment. The electronic device 70 may be a terminal in the above embodiment. For example, the electronic device 70 may be provided as a network side device. Fig.14 The electronic device 70 includes a processing component 71, which further includes one or more processors, and a memory resource represented by a processor 72 for storing instructions executable by the processing component 71, such as an application. The application stored in the processor 72 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 71 is configured to execute instructions to perform any method of the aforementioned method applied in the base station.
[0375] The electronic device 70 may further include a power supply component 73 configured to perform power management of the electronic device 70, a wired or wireless network interface 74 configured to connect the electronic device 70 to a network, and an input / output (I / O) interface 75. The electronic device 70 may operate based on an operating system stored in the processor 72, such as Windows Server TM, MacOS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
[0376] The embodiments of the present disclosure further provide a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, wherein when the executable program is executed by a processor, the method for processing file references of any embodiment of the present disclosure is implemented. Figure 2 , Figure 4 , Figure 5 , Figure 6 , Figures 8 to 12 The method for handling file references shown in any of the items.
[0377] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the readable storage medium stores an executable program, wherein when the executable program is executed by a processor, the method for processing file references provided by any of the aforementioned technical solutions is implemented.
[0378] The computer-readable storage medium may specifically be: a non-temporary computer-readable storage medium.
[0379] Exemplarily, such as a memory including an executable program, the above instructions can be executed by the processing component 71 of the electronic device to complete the above method.
[0380] The non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0381] An embodiment of the present disclosure provides a computer program product, which includes a computer program or instructions. When the computer program product or the instructions are processed and executed, the method for processing file references provided by any one of the aforementioned technologies is implemented.
[0382] Those skilled in the art will readily appreciate other implementations of the disclosed embodiments after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the disclosed embodiments, which follow the general principles of the disclosed embodiments and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered merely exemplary, and the true scope and spirit of the disclosed embodiments are indicated by the following claims.
[0383] It should be understood that the embodiments of the present disclosure are not limited to the precise structures described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the embodiments of the present disclosure is limited only by the appended claims.
Claims
1. A method for processing file references, characterized in that: Executed by a client, the method includes: Accessing a first file, wherein the first file is a file having a cascading reference relationship, the cascading reference relationship indicating a reference relationship among the first file, a second file, and a third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file; When there is at least one of the second files in the reference chain of the first file, and / or when at least one of the third files is online, the first file is displayed, wherein the content displayed by the first file is determined based at least on the files in the reference chain from the first file to the files in the online state.
2. The method according to claim 1, characterized in that: The method further comprises: When there is at least one second file in the reference chain of the first file that is offline and there is no third file in the reference chain that is online, the first file is displayed, and the content displayed by the first file is determined based on at least the second file that is offline.
3. The method according to claim 1, characterized in that The content displayed by the first file is determined based on at least one file in the reference chain from the first file to the file in the online state, including: When there is at least one second file in the reference chain of the first file that is offline, and there is a third file in the reference chain that is online, the content displayed by the first file is determined based on at least the files in the reference chain from the second file in the offline state to the third file in the online state.
4. The method according to claim 1, characterized in that: The content displayed by the first file is determined based on at least one file in the reference chain from the first file to the file in the online state, including: In the case that there is at least one second file in the reference chain of the first file that is online, the content displayed by the first file is determined based on at least the second file in the reference chain that is online.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In the case that the user accessing the first file is a first user, a first request initiated by the first user is sent, where the first request is used to grant the first file permission for the second file, and the first user has permission to access the first file and the second file.
6. The method according to claim 3, characterized in that The content displayed by the first file is determined based on at least the files in the reference chain from the second file in an offline state to the third file in an online state, including: In the case where the first file is not authorized to target the second file, the relevant content in the first file that references the content of the second file is displayed as first information, and the first information is used to indicate the referenced content of the second file.
7. The method according to claim 3, characterized in that The method further comprises: In the case where it is determined that the first file is granted the permission for the second file, a reference subchain is determined in the reference chain, the reference subchain indicating a reference relationship between the second file in an offline state and the third file in an online state; Among them, when there is a group of files with direct reference relationship in the reference sub-chain that are not authorized, the relevant content of the first file that references the content of the second file is determined based on at least the second file in an offline state, or the relevant content of the first file that references the content of the second file is displayed as first information, and the first information is used to indicate the referenced content of the second file.
8. The method according to claim 3, characterized in that When all files with direct citation relationships in the citation sub-chain are authorized, the relevant content of the first file citing the content of the second file is determined based on at least all files in the citation chain from the second file in an offline state to the third file in an online state.
9. The method according to claim 8, characterized in that The relevant content in the first file that refers to the content of the second file is determined based on at least all files in the reference chain from the second file in an offline state to the third file in an online state, including: When a portion of the third file in the online state referenced by files in the reference chain is modified, the content displayed by the first file is determined based at least on the modifications of the second file in the offline state and the third file in the online state.
10. The method according to claim 4, characterized in that The content displayed by the first file is determined based on at least the second file in the reference chain that is online, including: In the case where the first file is not granted permission for the second file, the relevant content in the first file that refers to the content of the second file is displayed as first information, where the first information is used to indicate the referenced content of the second file; or In the case where the first file is granted permission for the second file, the relevant content in the first file that refers to the content of the second file is determined based at least on the second file that is online in the reference chain.
11. A method for processing file references, characterized in that: Executed by the server, the method includes: Determining that the first file is a file with a cascading reference relationship, the cascading reference relationship indicates a reference relationship among the first file, the second file, and the third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file; When the first file is accessed and at least one of the second files exists in the reference chain of the first file, and / or at least one of the third files is online, the relevant content in the first file is updated based on at least the content determined from the first file to the file in the online state in the reference chain.
12. The method according to claim 11, characterized in that The method further comprises: When the first file is accessed, and there is at least one second file in the reference chain of the first file that is in an offline state, and there is no third file in the reference chain that is in an online state, update the relevant content in the first file at least based on the content determined by the second file that is in an offline state.
13. The method according to claim 11, characterized in that The updating of the content related to the content in the first file at least based on the content determined from the first file to the file in the online state in the reference chain includes: When there is at least one second file in the reference chain of the first file that is in an offline state, and there is the third file in an online state in the reference chain, update the relevant content in the first file based on at least the content determined based on the files in the reference chain from the second file in an offline state to the third file in an online state.
14. The method according to claim 11, characterized in that The updating of the content related to the content in the first file at least based on the content determined from the first file to the file in the online state in the reference chain includes: In the case that there is at least one second file in the reference chain of the first file that is in an online state, the relevant content in the first file is updated based on at least the content determined based on the second file in the reference chain that is in an online state.
15. The method according to any one of claims 11 to 14, characterized in that: The method further comprises: In the case that the user accessing the first file is a first user, a first request initiated by the first user is obtained, where the first request is used to grant the first file permission for the second file, and the first user has permission to access the first file and the second file.
16. The method according to claim 13, characterized in that The updating of the first file includes at least the content related to the content determined based on the content from the second file in the offline state to the third file in the online state in the reference chain, including: In the case where the first file is not granted permission for the second file, the related content in the first file that references the content of the second file is updated and displayed as first information, where the first information is used to indicate the referenced content of the second file.
17. The method according to claim 13, characterized in that The method further comprises: In the case where it is determined that the first file is granted the permission for the second file, a reference subchain is determined in the reference chain, the reference subchain indicating a reference relationship between the second file in an offline state and the third file in an online state; When it is determined that there is a group of unauthorized files with a direct reference relationship in the reference sub-chain, the relevant content of the first file that references the second file content is determined at least based on the second file in an offline state, or the relevant content of the first file that references the second file content is updated to first information, and the first information is used to indicate the referenced second file content.
18. The method according to claim 17, characterized in that When it is determined that all files with direct reference relationships in the reference sub-chain are authorized, the relevant content of the first file that references the content of the second file is determined based at least on all files in the reference chain from the second file in an offline state to the third file in an online state.
19. The method according to claim 18, characterized in that The determining, at least based on all files in the reference chain from the second file in an offline state to the third file in an online state, the relevant content in the first file that references the content of the second file includes: When a portion of the third file in an online state referenced by a file in the reference chain is modified, the first file is updated with relevant content determined at least based on the modification of the second file in an offline state and the third file in an online state.
20. The method according to claim 14, characterized in that The updating of the content related to the content in the first file at least based on the content determined in the second file in the online state in the reference chain includes: In the case where the first file is not granted permission for the second file, the relevant content in the first file that references the content of the second file is updated to first information, where the first information is used to indicate the referenced content of the second file; or In the case where the first file is granted the permission for the second file, the relevant content in the first file that refers to the content of the second file is determined based at least on the second file that is online in the reference chain.
21. A file reference processing device, characterized in that: include: an access module configured to access a first file, wherein the first file is a file having a cascading reference relationship, the cascading reference relationship indicating a reference relationship among the first file, a second file, and a third file, and a reference chain formed according to the reference relationship, the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file; The display module is configured to display the first file when at least one of the second files exists in the reference chain of the first file and / or when at least one of the third files exists online, wherein the content displayed by the first file is determined based on at least one file in the reference chain from the first file to the file in the online state.
22. A file reference processing device, characterized in that: include: A first determining module is configured to determine that the first file is a file with a cascading reference relationship, wherein the cascading reference relationship indicates a reference relationship among the first file, the second file, and the third file, and a reference chain formed according to the reference relationship, wherein the second file is a file directly referenced by the first file, the third file is a file indirectly referenced by the first file at least through the second file, and the second file directly or indirectly references the third file; An update module is configured to update the relevant content in the first file based on at least the content determined from the first file to the file in the online state in the reference chain when the first file is accessed and at least one of the second files exists in the reference chain of the first file, and / or at least one of the third files exists in an online state.
23. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method for processing file references as described in any one of claims 1 to 10 or claims 11 to 20 when running the executable instructions.
24. A readable storage medium, characterized in that: The readable storage medium stores an executable program, wherein the executable program, when executed by a processor, implements the method for processing file references described in any one of claims 1 to 10 or claims 11 to 20.
25. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instruction is executed by a processor, the method for processing file references described in any one of claims 1 to 10 or claims 11 to 20 is implemented.
Citation Information
Patent Citations
Method and application for sharing and cooperating online non-structural file based on node granularity semantics
CN101561826A
Document processing method and device, terminal and storage medium
CN109918345A
Reference document updating method and device, electronic equipment and storage medium
CN111858518A
Document updating method and device, equipment and medium
CN114997114A
