Method and device for accessing soft link, electronic equipment and storage medium
By directly obtaining and sending the target data of the target object when responding to the client's soft link access request on the server, the problem of excessive number of soft link access requests in the prior art is solved, and the user's operation efficiency is improved.
Patent Information
- Application Number
- CN202411962807.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the server needs to send two access requests through soft links, which leads to an increase in user operation time and reduces the efficiency of accessing target files or folders.
When the server responds to the client's soft link access request, it determines the access path contained in the soft link, and obtains the target data of the target object based on the path and sends it directly to the client, reducing the number of access requests.
Users only need to access the soft link once to obtain the target data of the target object corresponding to the soft link, which reduces the user's operation time and improves the efficiency of accessing target files or folders.
Smart Images

Figure CN119848897A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for accessing a soft link. Background Art
[0002] With the rapid development of computer technology, the number of files or folders in terminal devices is increasing. Every time a target file or target folder needs to be opened, it is necessary to search for the corresponding target file or target folder in the corresponding directory.
[0003] In the related art, the above problem can be solved by creating a soft link, but the server needs to send two access requests through the soft link in the related art, namely, accessing the soft link to obtain the target address of the target file or target folder, and accessing the target file or target folder through the target address. Sending two access requests increases the user's operation time and reduces the efficiency of accessing the target file or target folder. Summary of the invention
[0004] In order to solve the problems in the above-mentioned prior art, the example of the present application provides a method, device, electronic device and storage medium for accessing soft links, which can reduce the number of times access requests are sent, reduce the user's operation time, and improve the efficiency of accessing target files or target folders.
[0005] In a first aspect, an embodiment of the present application provides a method for accessing a soft link, which is applied to a server, and the method includes:
[0006] In response to an access request from a client for a soft link, determining an access path contained in the soft link corresponding to the access request; the access request is generated by the client based on an access operation of the user for the soft link;
[0007] Determine the type of the target object corresponding to the access request based on the access path;
[0008] If the type of the target object is in file format or directory format, acquiring target data of the corresponding target object based on the access path, and sending the target data to the client;
[0009] If the type of the target object is in soft link format, and the access path contained in the target object points to the soft link, a prompt message is sent to the client; the prompt message is used to prompt the user that the soft link is invalid.
[0010] Through the above method, after receiving the access request for the soft link from the client, the server can determine the access path contained in the soft link, obtain the target data of the target object based on the access path, and then return the target data to the client. In other words, the user only needs to access the soft link once to obtain the target data of the target object corresponding to the soft link, without having to obtain the address of the target object through the soft link and then determine the target data of the target object through the address, which reduces the user's operation time and improves the efficiency of accessing the target file or target folder.
[0011] In a possible implementation manner, before responding to the client's access request for the soft link, the method further includes:
[0012] In response to a request from the client to create a soft link, determine an environment for creating the soft link, and send a path of the environment for creating the soft link to the client;
[0013] If the environment for creating the soft link is the bucket where the target object is located, creating the soft link based on the target information of the target object transmitted by the client; the bucket is a container for storing data;
[0014] If the environment for creating the soft link is different from the bucket where the target object is located, and the environment for creating the soft link and the bucket where the target object is located are located in the same domain, then creating the soft link based on the target information of the target object transmitted by the client and the address of the bucket where the target object is located; the domain is a container of a storage bucket;
[0015] If the environment for creating the soft link and the target object are located in different domains, the soft link is created based on the target information of the target object transmitted by the client, the address of the bucket where the target object is located, and the address of the domain where the target object is located.
[0016] Through the above method, it is possible to determine whether the two are in the same bucket or the same domain based on the path of the soft link creation environment and the path of the target object, and create different soft links based on different situations. Compared with the related art, the present application can create corresponding soft links for various situations in different buckets and domains, so that users can access target objects in various locations through soft links.
[0017] In a possible implementation, acquiring target data of a corresponding target object based on the access path includes:
[0018] Determining whether the user has a target access right, wherein the target access right includes at least one of an access right to a domain where a target object is located, an access right to a bucket where a target object is located, and an access right to a target object;
[0019] If so, after determining that the user's access rights meet the conditions for accessing the target object from the creation environment, the target data of the target object corresponding to the soft link is obtained based on the access path and the target information of the target object transmitted by the client during the soft link creation process.
[0020] Through the above method, it can be determined whether the user can access the target objects in different buckets and domains according to the different permissions the user has. If the user has the corresponding permissions, the target object can be accessed. By verifying the user's permissions, the security of the target object can be increased.
[0021] In a possible implementation, the soft link includes a target version of the target object;
[0022] The acquiring target data of the corresponding target object includes:
[0023] The target data corresponding to the target version included in the soft link is obtained from the data of the multiple versions of the target object.
[0024] Through the above method, one-to-many soft links can be implemented. The target object usually has multiple versions. By adding the target version of the target object in the soft link, the target data corresponding to the target version that needs to be obtained through the soft link can be determined, thereby improving the flexibility of the soft link.
[0025] In a second aspect, an embodiment of the present application provides a method for accessing a soft link, which is applied to a client, and the method includes:
[0026] In response to the user's access operation on the soft link, a corresponding access request is generated, and the access request is sent to the server;
[0027] Receive target data or prompt information returned by the server in response to the access request; the target data is obtained by the server based on the access path in the soft link; the prompt information is generated by the server based on the content of the target object corresponding to the access path in the soft link.
[0028] Through the above method, after the user sends the access operation of the soft link, the client can send the corresponding access request to the server, and after processing on the server, receive the corresponding target operation to display to the user. The user only needs to access the soft link to obtain the target data of the target object corresponding to the soft link, without having to obtain the address of the target object through the soft link and then determine the target data of the target object through the address, which reduces the user's operation time and improves the efficiency of accessing the target file or target folder.
[0029] In a possible implementation manner, before responding to the user's access operation on the soft link, the method further includes:
[0030] Receive the path of the environment for creating the soft link sent by the server, and determine the bucket and domain where the soft link is located based on the path of the environment of the soft link;
[0031] If the soft link and the target object are in the same bucket, a first interface is displayed to the user; the first interface is used to receive target information of the target object input by the user, and transmit the target information to the server, so that the server creates the soft link based on the target information;
[0032] If the soft link is in a different bucket from the target object, and the soft link is in the same domain as the target object, a second interface is displayed to the user; the second interface is used to receive target information of the target object and the address of the bucket where the target object is located, input by the user, and transmit the target information and the address of the bucket where the target object is located to the server, so that the server creates the soft link based on the target information and the address of the bucket where the target object is located;
[0033] If the soft link and the target object are located in different domains, a third interface is displayed to the user; the third interface is used to receive the target information of the target object, the address of the bucket where the target object is located, and the address of the domain where the target object is located, which are input by the user, and transmit the target information, the address of the bucket where the target object is located, and the address of the domain where the target object is located to the server, so that the server creates the soft link based on the target information, the address of the bucket where the target object is located, and the address of the domain where the target object is located.
[0034] Through the above method, it is possible to determine whether the two are in the same bucket or the same domain based on the path of the soft link creation environment and the path of the target object, and display different interfaces to the user based on different situations to collect different relevant information that can create soft links. Compared with the related art, the present application can create corresponding soft links for various situations in different buckets and domains, so that users can access target objects in various locations through soft links.
[0035] In a third aspect, an embodiment of the present application provides a device for accessing a soft link, which is applied to a server, and the device includes:
[0036] An access request response unit, configured to respond to an access request from a client for a soft link, and determine an access path contained in the soft link corresponding to the access request; the access request is generated by the client based on an access operation of a user for the soft link;
[0037] Determine the type of the target object corresponding to the access request based on the access path;
[0038] a target data sending unit, configured to obtain target data of the corresponding target object based on the access path if the type of the target object is in file format or directory format, and send the target data to the client;
[0039] If the type of the target object is in soft link format, and the access path contained in the target object points to the soft link, a prompt message is sent to the client; the prompt message is used to prompt the user that the soft link is invalid.
[0040] In a fourth aspect, an embodiment of the present application provides a device for accessing a soft link, which is applied to a client, and the device includes:
[0041] An access operation response unit, used to respond to a user's access operation on a soft link, generate a corresponding access request, and send the access request to the server;
[0042] A target data receiving unit is used to receive target data or prompt information returned by the server in response to the access request; the target data is obtained by the server based on the access path in the soft link; the prompt information is generated by the server based on the content of the target object corresponding to the access path in the soft link.
[0043] In a fifth aspect, an embodiment of the present application provides an electronic device including:
[0044] A memory for storing program instructions;
[0045] The processor is used to call the program instructions stored in the memory and execute the steps included in the method described in the first aspect or the second aspect according to the obtained program instructions.
[0046] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect or the second aspect is implemented.
[0047] The example of the present application provides a method, device, electronic device and storage medium for accessing soft links. The client can respond to the user's access operation on the soft link, generate a corresponding access request, and send the access request to the server. The server can respond to the client's access request for the soft link, determine the access path contained in the soft link corresponding to the access request, and obtain the target data of the corresponding target object based on the access path, and send the target data to the client. The client can receive the target data returned by the server for the access request and display it to the user. That is to say, through the method of the present application, the user only needs to access the soft link once to obtain the target data of the target object corresponding to the soft link, without having to obtain the address of the target object through the soft link and then determine the target data of the target object through the address, thereby reducing the user's operation time and improving the efficiency of accessing the target file or target folder. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0049] Figure 1 A schematic diagram of an application scenario of a method for accessing a soft link provided in an embodiment of the present application;
[0050] Figure 2 An interactive flow chart of a method for accessing a soft link provided in an embodiment of the present application;
[0051] Figure 3 A specific interactive flow chart of a method for accessing a soft link provided in an embodiment of the present application;
[0052] Figure 4 A structural block diagram of a device for accessing a soft link provided in an embodiment of the present application;
[0053] Figure 5 A structural block diagram of a device for accessing a soft link provided in an embodiment of the present application;
[0054] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0056] In the description of the embodiments of the present application, unless otherwise specified, "and" means or. For example, A / B can mean A or B. The "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0057] Specifically, in the description of the present application, it needs to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application, and, unless otherwise specified, the "connection" and "connection" mentioned in the present application include direct and indirect connections (connections).
[0058] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0059] The present application is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] In one possible embodiment, Figure 1 A schematic diagram of an application scenario of a method for accessing a soft link provided by an embodiment of the present application is shown. Figure 1 As shown, Figure 1The system includes a server 100 and a client 200, wherein the server 100 and the client 200 can be located in the same terminal device or in different terminal devices, and the client 200 can be used to receive user input, convert the user input into a request that can be processed by the terminal device, and send the request that can be processed by the terminal device to the server 100. The server 100 can process the request sent by the client 200 and return the processed result to the client 200, and the client 200 can display the processed result to the user. The terminal device can be a mobile phone, a tablet computer, a portable wearable device, etc., wherein the portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc.
[0061] Figure 1 The application scenario is only an example of an application scenario for implementing the embodiment of the present application. The embodiment of the present application is not limited to the above Figure 1 The application scenarios described. The fault testing method provided by the exemplary embodiment of the present application is described below with reference to the accompanying drawings in combination with the application scenarios described above. It should be noted that the application scenarios described above are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect.
[0062] Figure 2 An interactive flow chart of a method for accessing a soft link provided by an embodiment of the present application is shown, such as Figure 2 As shown, the method may include the following steps:
[0063] Step S201: The client generates a corresponding access request in response to the user's access operation on the soft link.
[0064] In a possible embodiment, before executing step S201, the server can implement the creation of a soft link in the following manner: first, the client receives the user's operation request to create a soft link, and sends the operation request to create a soft link to the server. After receiving the operation request to create a soft link, the server can determine the environment for creating the soft link, and send the path of the environment for creating the soft link to the client. After the client receives the path of the environment for creating the soft link sent by the server, it can determine the bucket and domain where the soft link is located based on the path of the soft link environment. The bucket and domain where the target object is located are also known, so different interfaces can be generated based on the location of the soft link and the target object. Among them, the bucket is a container for storing data, and the domain is a container for storing buckets. It should be noted that the user has the write permission for the data in the environment for creating the soft link, and the environment of the soft link can include the bucket where the soft link is located and the domain where the soft link is located.
[0065] If the soft link is the same as the bucket where the target object is located, a first interface can be displayed to the user. The first interface can be used to receive target information of the target object input by the user. Usually, when the soft link is the same as the bucket where the target object is located, the target information of the target object can be the name of the target object. The first interface may include an input box and a confirmation button. The input box can be used to receive the name of the target object input by the user. After the user completes entering the name of the target object, the user can click the confirmation button. After clicking the confirmation button, the client can transmit the name of the target object to the server so that the server can create a soft link based on the name of the target object.
[0066] If the soft link is different from the bucket where the target object is located, but the soft link is in the same domain as the target object, a second interface can be displayed to the user. The second interface can be used to receive target information of the target object input by the user. Usually, when the soft link is different from the bucket where the target object is located, the target information of the target object can be the name of the target object and the address of the bucket where the target object is located. The second interface can include two input boxes and a confirmation button. One input box can be used to receive the name of the target object input by the user, and the other input box can receive the address of the bucket where the target object is located input by the user. After completing the input of the name of the target object and the address of the bucket where the target object is located, the user can click the confirmation button. After clicking the confirmation button, the client can transmit the name of the target object and the address of the bucket where the target object is located to the server, so that the server can create a soft link based on the name of the target object and the address of the bucket where the target object is located.
[0067] If the soft link is different from the domain where the target object is located, a third interface can be displayed to the user. The third interface can be used to receive the target information of the target object input by the user. Usually, when the soft link is different from the domain where the target object is located, the target information of the target object can be the name of the target object, the address of the bucket where the target object is located, and the address of the domain where the target object is located. The third interface may include three input boxes and a confirmation button. One input box can be used to receive the name of the target object input by the user, another input box can receive the address of the bucket where the target object is located input by the user, and another box can receive the address of the domain where the target object is located input by the user. After completing the input of the name of the target object, the address of the bucket where the target object is located, and the address of the domain where the target object is located, the user can click the confirmation button. After clicking the confirmation button, the client can transmit the name of the target object, the address of the bucket where the target object is located, and the address of the domain where the target object is located to the server, so that the server can create a soft link based on the name of the target object, the address of the bucket where the target object is located, and the address of the domain where the target object is located.
[0068] In a possible embodiment, after the soft link is created, the client may generate a corresponding access request in response to the user's access operation on the soft link.
[0069] Step S202: The client sends an access request to the server.
[0070] In a possible embodiment, the client may send the access request generated in step S201 to the server.
[0071] Step S203: The server responds to the client's access request for the soft link and determines the access path included in the soft link corresponding to the access request.
[0072] In a possible embodiment, after receiving an access request from a client for a soft link, the server may determine an access path contained in the soft link corresponding to the access request, wherein the access path is an access path for a target object in the soft link.
[0073] Step S204: the server obtains target data of the corresponding target object based on the access path.
[0074] In a possible embodiment, since the server has obtained the access path of the target object, the server can directly send an access request to the access path to obtain the target data of the target object. However, before obtaining the target data, the server can determine whether the user has the target access permission.
[0075] Specifically, if the soft link is in the same bucket as the target object, it is possible to verify whether the user has access rights to the target object. If it is determined that the user has access rights to the target object, the target data of the target object corresponding to the soft link can be obtained based on the access path and the name of the target object transmitted by the client during the soft link creation process. If the user does not have access rights to the target object, a corresponding error message can be sent to the client so that the client can display the corresponding error message to the user. If the soft link is in a different bucket than the target object, but the soft link is in the same domain as the target object, it is possible to verify whether the user has access rights to the target object and the bucket where the target object is located. Based on the access path and the name of the target object transmitted by the client during the soft link creation process, the target data of the target object corresponding to the soft link can be obtained. If the user does not have access rights to the target object, the client can obtain the corresponding error message. If the user has access rights to the target object, a corresponding error message can be sent to the client so that the client can display the corresponding error message to the user; if the soft link is different from the domain where the target object is located, it can be verified whether the user has access rights to the domain where the target object is located, the target object, and the bucket where the target object is located. If it is determined that the user has access rights to the domain where the target object is located, the target object, and the bucket where the target object is located, the target data of the target object corresponding to the soft link can be obtained based on the access path and the name of the target object transmitted by the client during the soft link creation process. If the user does not have access rights to the domain where the target object is located, the target object, and the bucket where the target object is located, a corresponding error message can be sent to the client so that the client can display the corresponding error message to the user.
[0076] In a possible embodiment, the soft link may contain a target version of the target object. Therefore, in the process of obtaining the target data of the target object, the target data corresponding to the target version contained in the soft link can be obtained from the data of multiple versions of the target object. For example, if the target version of the target object contained in the soft link is version 3, the target object contains 4 versions, namely, version 1, the corresponding data is 1, version 2, the corresponding data is 2, version 3, the corresponding data is 3, version 4, the corresponding data is 4, and since the target version of the target object contained in the soft link is version 3, the target data obtained should be data 3 corresponding to version 3. In the related art, the version number is not added to the soft link, and only the latest data of the target object can be obtained by accessing the target object through the soft link. Therefore, the present application can improve the flexibility of the soft link by adding the version number to the soft link, and can obtain different versions of target data according to different user needs.
[0077] It should be noted that the server will execute step S204 only after determining that the type of the target object is in file format or directory format. If the server determines that the type of the target object is in soft link format and the access path contained in the target object points to the soft link in the access request sent by the client, the corresponding access request can be deleted and a prompt message can be generated. The prompt message can be used to prompt the user that the soft link is invalid. After confirming the prompt message, the user can regenerate the correct soft link and access the soft link again.
[0078] Step S205: the server sends the target data to the client.
[0079] In a possible embodiment, the server may send the target data generated in step S204 to the client.
[0080] In another possible embodiment, the server may also send the prompt information generated in step S204 to the client.
[0081] Step S206: the client receives the target data returned by the server in response to the access request.
[0082] In a possible embodiment, the client can display the target data to the user after receiving the target data returned by the server in response to the access request, and the client can also display the prompt information to the user after receiving the prompt information returned by the server in response to the access request. In the above process, the user only sends an access request once, that is, an access to the soft link, and obtains the target data of the target object corresponding to the soft link. There is no need to obtain the address of the target object through the soft link and then determine the target data of the target object through the address, which reduces the user's operation time and improves the efficiency of accessing the target file or target folder.
[0083] The example of the present application provides a method, device, electronic device and storage medium for accessing soft links. The client can respond to the user's access operation on the soft link, generate a corresponding access request, and send the access request to the server. The server can respond to the client's access request for the soft link, determine the access path contained in the soft link corresponding to the access request, and obtain the target data of the corresponding target object based on the access path, and send the target data to the client. The client can receive the target data returned by the server for the access request and display it to the user. That is to say, through the method of the present application, the user only needs to access the soft link once to obtain the target data of the target object corresponding to the soft link, without having to obtain the address of the target object through the soft link and then determine the target data of the target object through the address, thereby reducing the user's operation time and improving the efficiency of accessing the target file or target folder.
[0084] In one possible embodiment, Figure 3 A specific flow chart of a method for accessing a soft link provided by an embodiment of the present application is shown. Figure 3 As shown, the method comprises the following steps:
[0085] Step S301: the client generates a request for creating a soft link in response to a user input.
[0086] Step S302: The client sends a creation request to the server.
[0087] Step S303: the server responds to the client's request for creating a soft link and determines the path of the environment for creating the soft link.
[0088] Step S304: the server sends the path of the soft link environment to the client.
[0089] Step S305, the client receives the path of the environment for creating the soft link sent by the server, determines the bucket and domain where the soft link is located based on the path of the environment of the soft link, and displays a corresponding interface to receive user input.
[0090] In a possible embodiment, if the soft link and the target object are in the same bucket, a first interface is displayed to the user; the first interface is used to receive the name of the target object input by the user.
[0091] In another possible embodiment, if the soft link and the target object are in different buckets, and the soft link and the target object are in the same domain, a second interface is displayed to the user; the second interface is used to receive the name of the target object and the address of the bucket where the target object is located input by the user.
[0092] In another possible embodiment, if the soft link and the target object are located in different domains, a third interface is displayed to the user; the third interface is used to receive the name of the target object, the address of the bucket where the target object is located, and the address of the domain where the target object is located, which are input by the user.
[0093] Step S306: the client sends the user input to the server.
[0094] Step S307: the server creates a corresponding soft link based on the user input transmitted by the client.
[0095] In a possible embodiment, if the environment for creating the soft link is the bucket where the target object is located, the soft link is created based on the name of the target object transmitted by the client.
[0096] In another possible embodiment, if the environment for creating the soft link is different from the bucket where the target object is located, and the creation environment and the bucket where the target object is located are in the same domain, a soft link is created based on the name of the target object transmitted by the client and the address of the bucket where the target object is located.
[0097] In another possible embodiment, if the environment for creating the soft link and the target object are located in different domains, the soft link is created based on the name of the target object transmitted by the client, the address of the bucket where the target object is located, and the address of the domain where the target object is located.
[0098] Step S308: The server sends a message to the client indicating that the soft link has been successfully created.
[0099] Step S309: the client generates a corresponding access request in response to the user's access operation on the soft link.
[0100] Step S310: The client sends an access request to the server.
[0101] Step S311, the server responds to the client's access request for the soft link and determines the access path contained in the soft link corresponding to the access request.
[0102] Step S312: the server obtains target data of the corresponding target object based on the access path.
[0103] Step S313: the server sends the target data to the client.
[0104] Step S314: the client receives the target data returned by the server in response to the access request, and displays the target data to the user.
[0105] Based on the same inventive concept, Figure 4 A structural block diagram of a device for accessing a soft link provided in an embodiment of the present application, the device for accessing a soft link can be applied to a server, such as Figure 4 As shown, the device 400 for accessing a soft link may include:
[0106] The access request response unit 401 is used to respond to the access request of the client for the soft link and determine the access path contained in the soft link corresponding to the access request; the access request is generated by the client based on the user's access operation on the soft link;
[0107] Determine the type of the target object corresponding to the access request based on the access path;
[0108] A target data sending unit 402 is configured to obtain target data of the corresponding target object based on the access path if the type of the target object is in file format or directory format, and send the target data to the client;
[0109] If the type of the target object is in soft link format, and the access path contained in the target object points to the soft link, a prompt message is sent to the client; the prompt message is used to prompt the user that the soft link is invalid.
[0110] In a possible implementation manner, the access request response unit 401 is further configured to respond to the client's request for creating a soft link, determine an environment for creating the soft link, and send a path of the environment for creating the soft link to the client;
[0111] If the environment for creating the soft link is the bucket where the target object is located, creating the soft link based on the target information of the target object transmitted by the client; the bucket is a container for storing data;
[0112] If the environment for creating the soft link is different from the bucket where the target object is located, and the environment for creating the soft link and the bucket where the target object is located are located in the same domain, then creating the soft link based on the target information of the target object transmitted by the client and the address of the bucket where the target object is located; the domain is a container of a storage bucket;
[0113] If the environment for creating the soft link and the target object are located in different domains, the soft link is created based on the target information of the target object transmitted by the client, the address of the bucket where the target object is located, and the address of the domain where the target object is located.
[0114] In a possible implementation, the target data sending unit 402 is specifically configured to determine whether the user has a target access right, wherein the target access right includes at least one of an access right to the domain where the target object is located, an access right to the bucket where the target object is located, and an access right to the target object;
[0115] If so, after determining that the user's access rights meet the conditions for accessing the target object from the creation environment, the target data of the target object corresponding to the soft link is obtained based on the access path and the target information of the target object transmitted by the client during the soft link creation process.
[0116] In a possible implementation, the target data sending unit 402 is specifically configured to obtain the target data corresponding to the target version included in the soft link from the data of multiple versions of the target object.
[0117] Based on the same inventive concept, Figure 5 A structural block diagram of a device for accessing a soft link provided in an embodiment of the present application, the device for accessing a soft link can be applied to a client, such as Figure 5 As shown, the device 500 for accessing a soft link may include:
[0118] The access operation response unit 501 is used to respond to the user's access operation on the soft link, generate a corresponding access request, and send the access request to the server;
[0119] The target data receiving unit 502 is used to receive the target data or prompt information returned by the server in response to the access request; the target data is obtained by the server based on the access path in the soft link; the prompt information is generated by the server based on the content of the target object corresponding to the access path in the soft link.
[0120] In a possible implementation, the access operation response unit 501 is further configured to receive a path of an environment for creating the soft link sent by the server, and determine the bucket and domain where the soft link is located based on the path of the environment of the soft link;
[0121] If the soft link and the target object are in the same bucket, a first interface is displayed to the user; the first interface is used to receive target information of the target object input by the user, and transmit the target information to the server, so that the server creates the soft link based on the target information;
[0122] If the soft link is in a different bucket from the target object, and the soft link is in the same domain as the target object, a second interface is displayed to the user; the second interface is used to receive target information of the target object and the address of the bucket where the target object is located, input by the user, and transmit the target information and the address of the bucket where the target object is located to the server, so that the server creates the soft link based on the target information and the address of the bucket where the target object is located;
[0123] If the soft link and the target object are located in different domains, a third interface is displayed to the user; the third interface is used to receive the target information of the target object, the address of the bucket where the target object is located, and the address of the domain where the target object is located, which are input by the user, and transmit the target information, the address of the bucket where the target object is located, and the address of the domain where the target object is located to the server, so that the server creates the soft link based on the target information, the address of the bucket where the target object is located, and the address of the domain where the target object is located.
[0124] Based on the same inventive concept, the embodiment of the present application provides an electronic device, which can implement the function of the method for accessing a soft link discussed above, please refer to Figure 6 The electronic device 600 includes a memory 601, a processor 602 and a bus 603.
[0125] The memory 601 is used to store computer programs executed by the processor 602. The memory 601 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0126] The memory 601 may be a volatile memory, such as a random-access memory (RAM); the memory 601 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 601 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 601 may be a combination of the above memories.
[0127] The processor 602 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 602 is used to implement the method for accessing a soft link in the above embodiment when calling a computer program stored in the memory 601 .
[0128] The specific connection medium between the memory 601 and the processor 602 is not limited in the embodiment of the present application. Figure 6 In the embodiment, the memory 601 and the processor 602 are connected via a bus 603. The bus 603 is connected to the processor 602 via a bus 603. Figure 6 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. Bus 603 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0129] Based on the same inventive concept, the embodiment of the present application provides a computer-readable storage medium, and the computer program product includes: computer program code, when the computer program code is executed on a computer, the computer executes any of the methods for accessing soft links discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to the method for accessing soft links, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0130] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0131] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0132] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0134] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for accessing a soft link, characterized in that: Applied to the server, the method includes: In response to an access request from a client for a soft link, determining an access path contained in the soft link corresponding to the access request; the access request is generated by the client based on an access operation of the user for the soft link; Determine the type of the target object corresponding to the access request based on the access path; If the type of the target object is in file format or directory format, acquiring target data of the corresponding target object based on the access path, and sending the target data to the client; If the type of the target object is in soft link format, and the access path contained in the target object points to the soft link, a prompt message is sent to the client; the prompt message is used to prompt the user that the soft link is invalid.
2. The method according to claim 1, characterized in that Before responding to the access request of the client for the soft link, the method further includes: In response to a request from the client to create a soft link, determine an environment for creating the soft link, and send a path of the environment for creating the soft link to the client; If the environment for creating the soft link is the bucket where the target object is located, creating the soft link based on the target information of the target object transmitted by the client; the bucket is a container for storing data; If the environment for creating the soft link is different from the bucket where the target object is located, and the environment for creating the soft link and the bucket where the target object is located are located in the same domain, then creating the soft link based on the target information of the target object transmitted by the client and the address of the bucket where the target object is located; the domain is a container of a storage bucket; If the environment for creating the soft link and the target object are located in different domains, the soft link is created based on the target information of the target object transmitted by the client, the address of the bucket where the target object is located, and the address of the domain where the target object is located.
3. The method according to claim 2, characterized in that The acquiring target data of the corresponding target object based on the access path includes: Determining whether the user has a target access right, wherein the target access right includes at least one of an access right to a domain where a target object is located, an access right to a bucket where a target object is located, and an access right to a target object; If so, after determining that the user's access rights meet the conditions for accessing the target object from the creation environment, the target data of the target object corresponding to the soft link is obtained based on the access path and the target information of the target object transmitted by the client during the soft link creation process.
4. The method according to claim 1, characterized in that The soft link contains the target version of the target object; The acquiring target data of the corresponding target object includes: The target data corresponding to the target version included in the soft link is obtained from the data of the multiple versions of the target object.
5. A method for accessing a soft link, characterized in that: Applied to a client, the method comprises: In response to the user's access operation on the soft link, a corresponding access request is generated, and the access request is sent to the server; Receive target data or prompt information returned by the server in response to the access request; the target data is obtained by the server based on the access path in the soft link; the prompt information is generated by the server based on the content of the target object corresponding to the access path in the soft link.
6. The method according to claim 5, characterized in that Before responding to the user's access operation on the soft link, the method further includes: Receive the path of the environment for creating the soft link sent by the server, and determine the bucket and domain where the soft link is located based on the path of the environment of the soft link; If the soft link and the target object are in the same bucket, a first interface is displayed to the user; the first interface is used to receive target information of the target object input by the user, and transmit the target information to the server, so that the server creates the soft link based on the target information; If the soft link is in a different bucket from the target object, and the soft link is in the same domain as the target object, a second interface is displayed to the user; the second interface is used to receive target information of the target object and the address of the bucket where the target object is located, input by the user, and transmit the target information and the address of the bucket where the target object is located to the server, so that the server creates the soft link based on the target information and the address of the bucket where the target object is located; If the soft link and the target object are located in different domains, a third interface is displayed to the user; the third interface is used to receive the target information of the target object, the address of the bucket where the target object is located, and the address of the domain where the target object is located, which are input by the user, and transmit the target information, the address of the bucket where the target object is located, and the address of the domain where the target object is located to the server, so that the server creates the soft link based on the target information, the address of the bucket where the target object is located, and the address of the domain where the target object is located.
7. A device for accessing a soft link, characterized in that: Applied to the server, the device comprises: An access request response unit, configured to respond to an access request from a client for a soft link, and determine an access path contained in the soft link corresponding to the access request; the access request is generated by the client based on an access operation of the user for the soft link; Determine the type of the target object corresponding to the access request based on the access path; a target data sending unit, configured to obtain target data of the corresponding target object based on the access path if the type of the target object is in file format or directory format, and send the target data to the client; If the type of the target object is in soft link format, and the access path contained in the target object points to the soft link, a prompt message is sent to the client; the prompt message is used to prompt the user that the soft link is invalid.
8. A device for accessing a soft link, characterized in that: Applied to a client, the device comprises: An access operation response unit, used to respond to a user's access operation on a soft link, generate a corresponding access request, and send the access request to the server; A target data receiving unit is used to receive target data or prompt information returned by the server in response to the access request; the target data is obtained by the server based on the access path in the soft link; the prompt information is generated by the server based on the content of the target object corresponding to the access path in the soft link.
9. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-4 or any one of claims 5-6 according to the obtained program instructions.
10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 or any one of claims 5 to 6 is implemented.