CN112597118B - Shared file adding method and device - Google Patents

Shared file adding method and device Download PDF

Info

Publication number
CN112597118B
CN112597118B CN202110010190.5A CN202110010190A CN112597118B CN 112597118 B CN112597118 B CN 112597118B CN 202110010190 A CN202110010190 A CN 202110010190A CN 112597118 B CN112597118 B CN 112597118B
Authority
CN
China
Prior art keywords
shared
information
client
shared file
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110010190.5A
Other languages
Chinese (zh)
Other versions
CN112597118A (en
Inventor
高畅
谭千令
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Mass Storage Technology Co ltd
Original Assignee
Hangzhou Mass Storage Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Mass Storage Technology Co ltd filed Critical Hangzhou Mass Storage Technology Co ltd
Priority to CN202110010190.5A priority Critical patent/CN112597118B/en
Publication of CN112597118A publication Critical patent/CN112597118A/en
Application granted granted Critical
Publication of CN112597118B publication Critical patent/CN112597118B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The application provides a method for adding a shared file, which can be applied to a shared file device; in the method, the shared file device can generate shared file information by utilizing the shared device information in the storage device and the device information to be shared in the client, and send the shared file information to the client, so that the DI client can update the shared file according to the shared file information, thereby realizing that the DI client can automatically add the shared file, and further improving the user experience.

Description

Shared file adding method and device
Technical Field
The present invention relates to the field of data storage, and in particular, to a method and an apparatus for adding a shared file.
Background
The Data Insight (hereinafter referred to as DI) platform performs scanning operation on files in the Data storage device, and involves scanning the file storage device at the DI software level and scanning the files under the shared directory, and under normal conditions, manual adding operation needs to be performed on the DI platform level, that is, each shared device needs to be manually added once, each shared directory in the device needs to be manually added once, assuming that N stored devices exist, and the number of times of manual operations needs to be n×m times. In most cases, as the actual use situation becomes more and more complex along with the time, the number of files stored in the storage system is also more and more messy, and the stored devices are more and more according to the demands, and the real-time information synchronization of the files cannot be realized by manual operation. Therefore, a solution that can automatically implement the addition of the shared file by the DI client is needed.
Disclosure of Invention
The method and the device for adding the shared file are realized, so that the DI client can automatically add the shared file, and further user experience is improved.
The application provides a method for adding a shared file, which is applied to a shared file device and comprises the following steps:
generating a shared information reading instruction and an added information reading instruction in response to a shared file adding operation, and respectively sending user login information to a client and storage equipment to acquire a security authentication credential returned by the client and a security access credential returned by the storage equipment;
transmitting the data reading instruction and the security access certificate to the storage device to acquire shared device information returned by the storage device;
transmitting the added information reading instruction and the security authentication credentials to the client to acquire equipment information to be shared returned by the client;
generating shared file information according to the shared device information and the device information to be shared;
and sending the shared file information and the security authentication credentials to the client so that the client updates the shared file according to the shared file information.
Optionally, the sending the user login information to the client and the storage device to obtain the security authentication credential returned by the client and the security access credential returned by the storage device respectively includes:
sending the user login information to the client, and if the user login information passes the verification of the client, acquiring a security authentication credential returned by the client;
and sending the user login information to the storage equipment, and if the user login information passes through the verification of the storage equipment, acquiring a security access credential returned by the client.
Optionally, the shared device information includes sequence identifiers corresponding to the existing shared files and the shared files respectively; the equipment information to be shared comprises files to be shared; the generating shared file information according to the shared device information and the device information to be shared includes:
determining the sequence identification corresponding to the file to be shared according to the sequence identifications respectively corresponding to the existing shared files;
and generating shared file information according to the shared device information, the device information to be shared and the sequence identifier corresponding to the file to be shared.
Optionally, after the step of obtaining the security authentication credential returned by the client and the security access credential returned by the storage device, the method further includes:
verifying the security authentication credentials;
if the security authentication credentials pass verification, establishing communication connection with the client;
and if the security authentication credentials are not verified, disconnecting communication connection with the client.
Optionally, after the step of obtaining the security authentication credential returned by the client and the security access credential returned by the storage device, the method further includes:
verifying the security access credential;
if the security access credential passes the verification, establishing communication connection with the storage device;
and if the security access credential fails verification, disconnecting communication connection with the storage device.
Optionally, after generating the shared file information according to the shared device information, the device information to be shared, and the sequence identifier corresponding to the file to be shared, the method further includes:
and carrying out format conversion on the shared equipment information to obtain the shared equipment information after format conversion, wherein the format corresponding to the shared equipment information after format conversion is a data format which can be processed by the client.
Optionally, before the adding information reading instruction and the security authentication credential are sent to the client to obtain the device information to be shared returned by the client, the method further includes:
sending the secure authentication credentials to the client to verify whether the secure authentication credentials are valid;
receiving a verification result returned by the client;
and if the verification result is that the security authentication credential is valid, executing the step of sending the added information reading instruction and the security authentication credential to the client.
Optionally, after the sending the shared file information and the security authentication credential to the client so that the client performs shared file update according to the shared file information, the method further includes:
receiving an updating result of the shared file information returned by the client;
determining an updating mode corresponding to the updating result according to the updating result;
and performing operation processing according to the updating mode corresponding to the updating result.
Optionally, the client is a data mining (DI) client.
The application also provides a device for adding the shared file, which is applied to a device for sharing the file, and comprises:
The response unit is used for responding to the shared file adding operation, generating a shared information reading instruction and an added information reading instruction, and respectively sending user login information to a client and storage equipment to acquire a security authentication credential returned by the client and a security access credential returned by the storage equipment;
the sending unit is used for sending the data reading instruction and the security access certificate to the storage equipment so as to acquire shared equipment information returned by the storage equipment;
the sending unit is further configured to send the additional information reading instruction and the security authentication credential to the client, so as to obtain equipment information to be shared returned by the client;
the generation unit is used for generating shared file information according to the shared equipment information and the equipment information to be shared;
and the sending unit is further used for sending the shared file information and the security authentication credentials to the client so that the client can update the shared file according to the shared file information.
Optionally, the response unit is specifically configured to:
sending the user login information to the client, and if the user login information passes the verification of the client, acquiring a security authentication credential returned by the client;
And sending the user login information to the storage equipment, and if the user login information passes through the verification of the storage equipment, acquiring a security access credential returned by the client.
Optionally, the shared device information includes sequence identifiers corresponding to the existing shared files and the shared files respectively; the equipment information to be shared comprises files to be shared; the generating unit is specifically configured to:
determining the sequence identification corresponding to the file to be shared according to the sequence identifications respectively corresponding to the existing shared files;
and generating shared file information according to the shared device information, the device information to be shared and the sequence identifier corresponding to the file to be shared.
Optionally, the apparatus further comprises a verification unit configured to:
verifying the security authentication credentials;
if the security authentication credentials pass verification, establishing communication connection with the client;
and if the security authentication credentials are not verified, disconnecting communication connection with the client.
Optionally, the verification unit is further configured to:
verifying the security access credential;
if the security access credential passes the verification, establishing communication connection with the storage device;
And if the security access credential fails verification, disconnecting communication connection with the storage device.
Optionally, the device further comprises a conversion unit for:
and carrying out format conversion on the shared equipment information to obtain the shared equipment information after format conversion, wherein the format corresponding to the shared equipment information after format conversion is a data format which can be processed by the client.
Optionally, the verification unit is further configured to:
sending the secure authentication credentials to the client to verify whether the secure authentication credentials are valid;
receiving a verification result returned by the client;
and if the verification result is that the security authentication credential is valid, executing the step of sending the added information reading instruction and the security authentication credential to the client.
Optionally, the apparatus further includes an updating unit configured to:
receiving an updating result of the shared file information returned by the client;
determining an updating mode corresponding to the updating result according to the updating result;
and performing operation processing according to the updating mode corresponding to the updating result.
Optionally, the client is a data mining (DI) client.
According to the technical scheme, the application provides a method for adding the shared file, the method is applied to a shared file device, the method can respond to shared file adding operation to generate a shared information reading instruction and an added information reading instruction, and user login information is respectively sent to a client and storage equipment to acquire a security authentication credential returned by the client and a security access credential returned by the storage equipment; transmitting the data reading instruction and the security access certificate to the storage device to acquire shared device information returned by the storage device; transmitting the added information reading instruction and the security authentication credentials to the client to acquire equipment information to be shared returned by the storage equipment; generating shared file information according to the shared device information and the device information to be shared; and sending the shared file information and the security authentication credentials to the client so that the client updates the shared file according to the shared file information. In this way, in the scheme provided by the application, the shared file device can generate shared file information by using the shared device information in the storage device and the device information to be shared in the client, and send the shared file information to the client, so that the DI client can update the shared file according to the shared file information, thereby realizing that the DI client can automatically realize the addition of the shared file, and further improving the user experience.
Further effects of the above-described non-conventional preferred embodiments will be described below in connection with the detailed description.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present application, the drawings that are required for the description of the embodiments or prior art will be briefly described below, it being apparent that the drawings in the following description are only some of the embodiments described in the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart of a method for adding a shared file according to an embodiment of the present disclosure;
FIG. 2 is a schematic structural diagram of an apparatus for adding a shared file according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The inventor finds that the Data Insight (hereinafter referred to as DI) platform performs scanning operation on files in the Data storage device, and involves scanning the file storage device at the DI software level and scanning the files under the shared directory, and under normal conditions, the adding operation needs to be performed manually at the DI platform level, that is, each shared device needs to be performed manually, each shared directory in the device needs to be performed manually, and assuming that N stored devices exist, and the number of times of manual operations is n×m. In most cases, as the actual use situation becomes more and more complex along with the time, the number of files stored in the storage system is also more and more messy, and the stored devices are more and more according to the demands, and the real-time information synchronization of the files cannot be realized by manual operation. Therefore, a solution that can automatically implement the addition of the shared file by the DI client is needed.
Accordingly, the application provides a method for adding a shared file, which is applied to a shared file device, and can respond to shared file adding operation, generate a shared information reading instruction and an added information reading instruction, and respectively send user login information to a client and a storage device to acquire a security authentication credential returned by the client and a security access credential returned by the storage device; transmitting the data reading instruction and the security access certificate to the storage device to acquire shared device information returned by the storage device; transmitting the added information reading instruction and the security authentication credentials to the client to acquire equipment information to be shared returned by the storage equipment; generating shared file information according to the shared device information and the device information to be shared; and sending the shared file information and the security authentication credentials to the client so that the client updates the shared file according to the shared file information. In this way, in the scheme provided by the application, the shared file device can generate shared file information by using the shared device information in the storage device and the device information to be shared in the client, and send the shared file information to the client, so that the DI client can update the shared file according to the shared file information, thereby realizing that the DI client can automatically realize the addition of the shared file, and further improving the user experience.
Various non-limiting embodiments of the present application are described in detail below with reference to the attached drawing figures.
Referring to fig. 1, a method for adding a shared file in an embodiment of the present application is shown, where the method may be applied to a shared file device, and may be a client (for example, a mobile device such as a mobile phone, a notebook, an electronic communication watch, or the like) or a server. In this embodiment, the method may include, for example, the steps of:
s101: and responding to the shared file adding operation, generating a shared information reading instruction and an added information reading instruction, and respectively sending user login information to a client and a storage device to acquire a security authentication credential returned by the client and a security access credential returned by the storage device.
When a user needs to perform a shared file addition to a client, such as a data mining (DI) client, a shared file addition operation (such as clicking a corresponding key) may be input through the shared file device, and login information (such as a user name, a password of the user name used) of the user may be input, so that the shared file device may acquire the user login information and the shared file addition operation. Wherein the user login information may include at least one of the following information: the IP address of the client (the IP address of the Data Insight client), the IP address of the storage device (the IP address of the Data Insight storage device), the user name used by the user, the password of the user name used, the domain of the user used; where a domain refers to a management unit of an integrated resource, which is herein understood as a group of users.
Then, the shared file device may send the user login information to the client, and if the user login information passes through the verification of the client, the secure authentication credentials returned by the client are obtained, and the shared file device may locally store the secure authentication credentials. Specifically, after the shared file device may send the user login information to the client, the client may verify the user login information, and if the user login information passes the verification, a security authentication credential corresponding to the user login information is generated. For example, the client may verify an IP address of the client (IP address of the Data entity client), a user name used by the user, a password of the user name used, and a domain of the user used, specifically, the client may store a plurality of authenticated user login information in advance, and after receiving the user login information, the client may first determine whether authenticated user login information corresponding to the user login information is stored in advance; if not, stopping the operation, and after waiting for the preset time, the client can acquire the user login information again; if yes, the user login information can pass the verification, a security authentication credential corresponding to the user login information is generated, and the security authentication credential is returned to the shared file device. Specifically, since the client may locally store the port number for providing the service, the management account, the password corresponding to the management account, and the operation rights corresponding to each user (for example, which operations may be performed), the user login information is verified, so that the shared file device may obtain the security authentication credential corresponding to the user login information (the security authentication credential is a security authentication manner, in order to ensure that each access is an operation of a user that is actually logged in, and in order to not require that each client that is legal, the client must be a specific machine, and therefore, a credential (TOKEN) manner is used, the successfully logged-in user may obtain a string of characters, and the subsequent operation may be deemed as a legal request by the client and the storage device as long as the string of characters is included, and the operation is allowed, and the string of characters is the authentication manner of the credential, which is the so-called security authentication credential. It should be noted that, when the client is a DI client, the format of the user login information may be a URL format.
And the shared file device can send the user login information to the storage equipment, if the user login information passes through the verification of the storage equipment, the secure access credential returned by the client is obtained, and the shared file device can locally store the secure access credential. Specifically, after the shared file device may send the user login information to the storage device, the storage device may verify the user login information, and if the user login information passes the verification, a security access credential corresponding to the user login information is generated. For example, the storage device may verify an IP address of the storage device (IP address of the Data Insight storage device), a user name used by the user, a password of the user name used, and a domain of the user used, specifically, the storage device may store a plurality of authenticated user login information in advance, and after receiving the user login information, the storage device may first determine whether authenticated user login information corresponding to the user login information is stored locally; if not, stopping the operation, and after waiting for a preset time length, the storage device can acquire the user login information again; if yes, the user login information can pass the verification, a security access credential corresponding to the user login information is generated, and the security access credential is returned to the shared file device. Specifically, since the port number for providing the service, the management account, the password corresponding to the management account and the operation authority corresponding to each user (for example, which operations can be performed) may be stored in advance in the storage device, the user login information is verified, so that the shared file device may obtain the security access credential corresponding to the user login information (the security access credential is a security authentication manner, in order to ensure that each access is an operation of a user that is actually logged in, and in order to not require that the storage device that is operated legally, a credential (TOKEN) is used, the successfully logged-in user may obtain a string of characters, and the storage device may be identified as a legal request as long as the string of characters is included in the subsequent operation, and the string of characters is a credential authentication manner, which is a so-called security access credential. It should be emphasized that the time of acquiring the security authentication credential may be the same as or different from the time of acquiring the security access credential, for example, the security access credential may be acquired first and then the security authentication credential may be acquired.
It should be noted that, in one implementation, the user login information may include request header information (header), request header parameters (params), and return status information parameters (response). Specifically, the user login information is required to be added with request header information, so that deterministic parameter acquisition and security guarantee can be ensured. For example, all request headers may require the addition of the following parameters: the Content of the User-Agent contains the User information (User-Agent) that sent the request, the Date and time (Date) that the request sent, the MIME information (Content-Type) that corresponds to the entity that Requested, the Content Length (Content-Length) that the request, the Cookie value (Cookie), the request Type (X-request-width), the credential random code (ibasettoken). All subsequent url operations from login can use the parameters as the standard to carry out communication with the same data format, so as to ensure the safety and consistency of communication. Thus, the information of the request header can be some information containing security, and all the url of the request can be provided with the request header information of the same standard, so that the security is ensured.
It should be noted that, in one implementation, after the step of obtaining the security authentication credential returned by the client and the security access credential returned by the storage device, the method further includes:
verifying the security authentication credentials;
if the security authentication credentials pass verification, establishing communication connection with the client;
and if the security authentication credentials are not verified, disconnecting communication connection with the client.
Specifically, the shared file device may verify the security authentication credential, for example, perform legal verification (for example, may decode the security authentication credential, determine whether the client corresponding to the decoded string is an authenticated client), and if the security authentication credential passes the legal verification, for example, if the security authentication credential has no format error or exceeds a legal date, establish a communication connection with the client, that is, after the security authentication credential is verified without error, keep a connection with the client, and record the security authentication credential; if the security authentication credential is wrong in format or exceeds a legal date, the security authentication credential can be considered to be not verified, and then the communication connection with the client can be disconnected, for example, a verification result can be visually fed back, and the connection with the client is disconnected.
It should be noted that, in one implementation, after the step of obtaining the security authentication credential returned by the client and the security access credential returned by the storage device, the method further includes:
verifying the security access credential;
if the security access credential passes the verification, establishing communication connection with the storage device;
and if the security access credential fails verification, disconnecting communication connection with the storage device.
Specifically, the shared file device may verify the security access credential, for example, perform legal verification (for example, may decode the security access credential, determine whether the storage device corresponding to the decoded character string is an authenticated storage device), and if the security access credential passes the legal verification, for example, if the security access credential has no format error or exceeds a legal date, establish a communication connection with the storage device, that is, after the security access credential is verified, the security access credential is kept connected with the storage device, and record the security access credential; if the security access certificate has a format error or exceeds a legal date, the security access certificate can be considered to be not authenticated, and then the communication connection with the storage device can be disconnected, for example, the authentication result can be visually fed back, and the connection with the storage device is disconnected.
S102: and sending the data reading instruction and the security access certificate to the storage device to acquire the shared device information returned by the storage device.
After generating the data reading instruction and acquiring the security access credential, the shared file device may send the data reading instruction and the security access credential to the storage apparatus.
After the storage device receives the data reading instruction and the security access credential, the shared device information may be determined according to the data reading instruction and the security access credential. Specifically, the storage device may verify the security access credential first, and if the security access credential passes the verification, the storage device may determine, according to the data reading instruction, shared device information, and return the shared device information to the shared file device.
For example, the storage device may store the corresponding security access credential in advance, and after receiving the data reading instruction sent by the shared file device, the storage device may first determine whether the security access credential sent by the shared file device matches the security access credential stored in advance in the storage device; if not, stopping the operation, and after waiting for a preset time length, the storage device can acquire the data reading instruction and the security access certificate again; if the security access credential passes the verification, determining the shared equipment information, returning the shared equipment information to the shared file device, and storing the shared equipment information locally after the shared file device acquires the shared equipment information.
The shared device information may include at least the following information: storage device platform address information, storage device platform port information, storage device platform sharing type information, shared files (such as shared file structure information and shared file names of storage device platforms) existing in the storage device platform, and sequence identifiers (namely shared file identifier information in the storage device platform) respectively corresponding to the shared files.
It should be noted that, in one implementation manner, after the generating shared file information according to the shared device information, the device information to be shared, and the sequence identifier corresponding to the file to be shared, the method further includes:
and carrying out format conversion on the shared equipment information to obtain the shared equipment information after format conversion, wherein the format corresponding to the shared equipment information after format conversion is a data format which can be processed by the client.
The shared file device can perform format conversion on the shared device information to obtain the shared device information after format conversion, wherein the format corresponding to the shared device information after format conversion is a data format which can be processed by the client. For example, format conversion refers to that the DI client needs specific structural format data to successfully process the shared device information (i.e., the DI client can only process data in a specific format), so that the shared device information returned by the storage device needs to be converted into a data format required by the DI client, which may be referred to as structural data, i.e., format conversion; for example, it is assumed that the shared device information returned by the storage device is in XML format, converted (i.e., format-converted) into dictionary format by deconstructing, and assembled into data information in dictionary format required by the DI client, i.e., the shared device information after format conversion.
S103: and sending the added information reading instruction and the security authentication credentials to the client to acquire the equipment information to be shared returned by the client.
After generating the additional information reading instruction and acquiring the security authentication credential, the shared file device may send the additional information reading instruction and the security authentication credential to the client.
After the client receives the added information reading instruction and the security authentication credential, the information of the device to be shared can be determined according to the added information reading instruction and the security authentication credential. Specifically, the client may verify the security authentication credential first, and if the security authentication credential passes the verification, the client may determine the device information to be shared according to the instruction for reading the added information, and return the device information to be shared to the shared file device.
For example, the client may store the corresponding security authentication credentials in advance, and after the storage device receives the data reading instruction sent by the shared file device, it may first determine whether the security authentication credentials sent by the shared file device match the security authentication credentials stored in advance in the storage device; if not, stopping the operation, and after waiting for a preset time length, the client can acquire the added information reading instruction and the security authentication credentials again; if so, the security authentication credentials pass verification, equipment information to be shared is determined, the equipment information to be shared is returned to the shared file device, and after the shared file device acquires the equipment information to be shared, the equipment information to be shared can be stored locally.
It should be noted that, the device information to be shared may at least include the following information: the shared file device id to be added, the shared file device name to be added, the shared file to be added, and the sharing event information corresponding thereto (the sharing time information may include, for example, at least one of an operation code, a target path, a target type, a target sid, an adder user name, an adder domain, an adding timestamp, and an adder address).
In one implementation, before the adding information reading instruction and the security authentication credential are sent to the client to obtain the device information to be shared returned by the client, the method further includes:
sending the secure authentication credentials to the client to verify whether the secure authentication credentials are valid;
receiving a verification result returned by the client;
and if the verification result is that the security authentication credential is valid, executing the step of sending the added information reading instruction and the security authentication credential to the client.
Before the shared file device sends the added information reading instruction and the security authentication credential to the client, the shared file device may verify whether the security authentication credential of the preamble operation is still valid. Specifically, the shared file device may send the security authentication credential to the client to verify whether the security authentication credential is valid, for example, the shared file device may send a request to the client to query the shared directory information once, and the client may return a verification result to the shared file device according to whether the security authentication credential is still stored in the queried shared directory information. Specifically, if the client can query that the secure authentication credentials are still stored in the shared directory information, a verification result is returned to the shared file device, where the verification result is valid for the secure authentication credentials (for example, if the secure authentication credentials are still valid, the verification result may be a status code of 200), and at this time, the shared file device may execute the step of sending the additional information reading instruction and the secure authentication credentials to the client. If the client can query the shared directory information and the security authentication credentials are not stored in the shared directory information, a verification result is returned to the shared file device, and the verification result is that the security authentication credentials are invalid (for example, if the security authentication credentials are invalid, the verification result may be 401 status codes and credential invalidation information), at this time, the shared file device does not execute the step of sending the additional information reading instruction and the security authentication credentials to the client, but can apply for the security authentication credentials again to the client.
S104: and generating shared file information according to the shared equipment information and the equipment information to be shared.
In this embodiment, the shared device information includes an existing shared file and a sequence identifier corresponding to each shared file respectively; the device information to be shared comprises a file to be shared. In one implementation manner, the shared file device may determine the sequence identifier corresponding to the file to be shared according to the sequence identifier corresponding to each of the existing shared files, and it may be understood that the shared file device may calculate the sequence identifier corresponding to the file to be shared according to the sequence identifier corresponding to each of the existing shared files; for example, the DI client is configured with a unique sequence identifier for each added shared file, or may call an ID, where the ID is an incremental sequence of numbers, for example, 20 shared files are added now, the IDs of the 20 shared files are respectively from 1 to 20 continuously, when a new shared file (i.e. a file to be shared) is added, the ID number of the file to be shared is 21, and it is required that qangadio is not repeatable, so when a new file to be shared is added, the largest sequence identifier in the original shared file is first queried, and a 1 increment operation is performed on the largest sequence identifier, that is, the sequence identifier obtained by adding 1 to the largest sequence identifier in the existing shared file is used as the sequence identifier of the file to be shared.
Then, the shared file device may generate shared file information according to the shared device information, the device information to be shared, and the sequence identifier corresponding to the file to be shared. For example, the shared device information, the device information to be shared (such as the shared device information after format conversion), and the set of sequence identifiers corresponding to the file to be shared may be used as shared file information, that is, the shared file information may include the shared device information, the device information to be shared (such as the shared device information after format conversion), and the sequence identifier corresponding to the file to be shared.
S105: and sending the shared file information and the security authentication credentials to the client so that the client updates the shared file according to the shared file information.
After the shared file device determines the shared file information, the shared file device may send the shared file information and the secure authentication credentials to the client. The client may verify the security authentication credential (for example, may decode the security authentication credential to determine whether a device corresponding to the decoded string is an authenticated legal device), and if the verification is passed, may receive the shared file information, and update the shared file according to the shared file information.
In one implementation, before the sending the shared file information and the secure authentication credentials to the client, the method further comprises:
sending the secure authentication credentials to the client to verify whether the secure authentication credentials are valid;
receiving a verification result returned by the client;
and if the verification result is that the security authentication credentials are valid, executing the step of sending the audit log to be updated and the security authentication credentials to the client.
Before the shared file device sends the shared file information and the security authentication credentials to the client, the shared file device may verify whether the security authentication credentials operated by the preamble are still valid. Specifically, the shared file device may send the security authentication credential to the client to verify whether the security authentication credential is valid, for example, the shared file device may send a request to the client to query the shared directory information once, and the client may return a verification result to the shared file device according to whether the security authentication credential is still stored in the queried shared directory information. Specifically, if the client can query that the secure authentication credentials are still stored in the shared directory information, a verification result is returned to the shared file device, where the verification result is valid for the secure authentication credentials (for example, if the secure authentication credentials are still valid, the verification result may be a status code of 200), and at this time, the shared file device may execute the step of sending the shared file information and the secure authentication credentials to the client. If the client can query the shared directory information and does not store the security authentication credentials, a verification result is returned to the shared file device, and the verification result is that the security authentication credentials are invalid (for example, if the security authentication credentials are invalid, the verification result may be 401 status codes and credential invalidation information), at this time, the shared file device does not execute the step of sending the shared file information and the security authentication credentials to the client, but can apply for the security authentication credentials again to the client.
According to the technical scheme, the application provides a method for adding the shared file, the method is applied to a shared file device, the method can respond to shared file adding operation to generate a shared information reading instruction and an added information reading instruction, and user login information is respectively sent to a client and storage equipment to acquire a security authentication credential returned by the client and a security access credential returned by the storage equipment; transmitting the data reading instruction and the security access certificate to the storage device to acquire shared device information returned by the storage device; transmitting the added information reading instruction and the security authentication credentials to the client to acquire equipment information to be shared returned by the storage equipment; generating shared file information according to the shared device information and the device information to be shared; and sending the shared file information and the security authentication credentials to the client so that the client updates the shared file according to the shared file information. In this way, in the scheme provided by the application, the shared file device can generate shared file information by using the shared device information in the storage device and the device information to be shared in the client, and send the shared file information to the client, so that the DI client can update the shared file according to the shared file information, thereby realizing that the DI client can automatically realize the addition of the shared file, and further improving the user experience.
In one implementation, after the sending the shared file information and the security authentication credentials to the client to enable the client to perform a shared file update according to the shared file information, the method further includes:
receiving an updating result of the shared file information returned by the client;
determining an updating mode corresponding to the updating result according to the updating result;
and performing operation processing according to the updating mode corresponding to the updating result.
It should be noted that, the update result may be a status code, where the status code may reflect the update result of the shared file information and the reason for failure when the update result is failure, for example, the status code of 200 indicates that the audit log is updated successfully, if the status code of 500 is some parameter, an error may occur to cause the update failure of the shared file information, and if the status code of 401 causes the update failure of the shared file information.
In this embodiment, if the client side updates the shared file information successfully, the client side may return an update result of the shared file information (that is, the update is successful) to the shared file device, so after the shared file device receives the update result of the shared file information returned by the client side, it may be determined, according to the update result, that an update mode corresponding to the update result is: recording a successful result and waiting for the next execution; and the shared file device can perform operation processing according to the updating mode corresponding to the updating result.
After the client fails to update the shared file information, the client can return the update result of the shared file information (namely, the update fails) to the shared file device, so that after the shared file device receives the update result of the shared file information returned by the client, the update mode corresponding to the update result can be determined to be a record failure result according to the update result, an error prompt is returned to the shared file device, the result is fed back, the execution plan is terminated, and the next re-execution is waited; and the shared file device can perform operation processing according to the updating mode corresponding to the updating result.
It should be noted that, the active feedback of the client will be prompted when the refresh function is actively executed, and the relevant state will not be actively prompted in the background automatic running process.
Therefore, after the client fails to update the shared file information, the shared file device can be notified, and the shared file device can prompt the user of the failure and inform the user of the reason, so that the user experience is improved.
Fig. 2 shows a specific embodiment of the device for adding the shared file according to the present application. The apparatus of this embodiment is an entity apparatus for performing the method of the foregoing embodiment. The technical solution is essentially identical to the above embodiment, and the corresponding description in the above embodiment is also applicable to this embodiment. In this embodiment, the adding device of the shared file is applied to a shared file device, and the adding device of the shared file includes:
A response unit 201, configured to generate a shared information reading instruction and an added information reading instruction in response to a shared file adding operation, and send user login information to a client and a storage device, respectively, so as to obtain a security authentication credential returned by the client and a security access credential returned by the storage device;
a sending unit 202, configured to send the data reading instruction and the security access credential to the storage device, so as to obtain shared device information returned by the storage device;
the sending unit 202 is further configured to send the additional information reading instruction and the security authentication credential to the client, so as to obtain device information to be shared returned by the client;
a generating unit 203, configured to generate shared file information according to the shared device information and the device information to be shared;
the sending unit 202 is further configured to send the shared file information and the security authentication credential to the client, so that the client updates the shared file according to the shared file information.
Optionally, the response unit 201 is specifically configured to:
sending the user login information to the client, and if the user login information passes the verification of the client, acquiring a security authentication credential returned by the client;
And sending the user login information to the storage equipment, and if the user login information passes through the verification of the storage equipment, acquiring a security access credential returned by the client.
Optionally, the shared device information includes sequence identifiers corresponding to the existing shared files and the shared files respectively; the equipment information to be shared comprises files to be shared; the generating unit 203 is specifically configured to:
determining the sequence identification corresponding to the file to be shared according to the sequence identifications respectively corresponding to the existing shared files;
and generating shared file information according to the shared device information, the device information to be shared and the sequence identifier corresponding to the file to be shared.
Optionally, the apparatus further comprises a verification unit configured to:
verifying the security authentication credentials;
if the security authentication credentials pass verification, establishing communication connection with the client;
and if the security authentication credentials are not verified, disconnecting communication connection with the client.
Optionally, the verification unit is further configured to:
verifying the security access credential;
if the security access credential passes the verification, establishing communication connection with the storage device;
And if the security access credential fails verification, disconnecting communication connection with the storage device.
Optionally, the device further comprises a conversion unit for:
and carrying out format conversion on the shared equipment information to obtain the shared equipment information after format conversion, wherein the format corresponding to the shared equipment information after format conversion is a data format which can be processed by the client.
Optionally, the verification unit is further configured to:
sending the secure authentication credentials to the client to verify whether the secure authentication credentials are valid;
receiving a verification result returned by the client;
and if the verification result is that the security authentication credential is valid, executing the step of sending the added information reading instruction and the security authentication credential to the client.
Optionally, the apparatus further includes an updating unit configured to:
receiving an updating result of the shared file information returned by the client;
determining an updating mode corresponding to the updating result according to the updating result;
and performing operation processing according to the updating mode corresponding to the updating result.
Optionally, the client is a data mining (DI) client.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. At the hardware level, the electronic device comprises a processor, optionally an internal bus, a network interface, a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 3, but not only one bus or type of bus.
And the memory is used for storing the execution instruction. In particular, a computer program that executes instructions may be executed. The memory may include memory and non-volatile storage and provide the processor with instructions and data for execution.
In one possible implementation manner, the processor reads the corresponding execution instruction from the nonvolatile memory to the memory and then executes the execution instruction, and may also acquire the corresponding execution instruction from other devices to form the adding method device of the shared file on a logic level. The processor executes the execution instructions stored in the memory to implement the method for adding the shared file provided in any embodiment of the present application through the execution of the execution instructions.
The method executed by the apparatus for adding a shared file according to the embodiment shown in fig. 1 of the present application may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The embodiment of the application also provides a readable medium, wherein the readable storage medium stores an execution instruction, and when the stored execution instruction is executed by a processor of an electronic device, the electronic device can be enabled to execute the method for adding the shared file provided in any embodiment of the application, and the method is specifically used for executing the method for adding the shared file.
The electronic device described in the foregoing embodiments may be a computer.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware aspects.
All embodiments in the application are described in a progressive manner, and identical and similar parts of all embodiments are mutually referred, so that each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (9)

1. A method of adding a shared file, the method being applied to a shared file device, the method comprising:
generating a shared information reading instruction and an added information reading instruction in response to a shared file adding operation, and respectively sending user login information to a client and storage equipment to acquire a security authentication credential returned by the client and a security access credential returned by the storage equipment;
transmitting a data reading instruction and the security access certificate to the storage device to acquire shared device information returned by the storage device;
transmitting the added information reading instruction and the security authentication credentials to the client to acquire equipment information to be shared returned by the client;
generating shared file information according to the shared device information and the device information to be shared;
sending the shared file information and the security authentication credentials to the client so that the client updates the shared file according to the shared file information;
the shared equipment information comprises the sequence identifications corresponding to the existing shared files and the shared files respectively; the equipment information to be shared comprises files to be shared;
The generating shared file information according to the shared device information and the device information to be shared includes:
determining the sequence identification corresponding to the file to be shared according to the sequence identifications respectively corresponding to the existing shared files;
and generating shared file information according to the shared device information, the device information to be shared and the sequence identifier corresponding to the file to be shared.
2. The method according to claim 1, wherein the sending the user login information to the client and the storage device to obtain the security authentication credential returned by the client and the security access credential returned by the storage device respectively includes:
sending the user login information to the client, and if the user login information passes the verification of the client, acquiring a security authentication credential returned by the client;
and sending the user login information to the storage equipment, and if the user login information passes through the verification of the storage equipment, acquiring a security access credential returned by the client.
3. The method according to any of claims 1-2, wherein after the step of obtaining the security authentication credentials returned by the client and the security access credentials returned by the storage device, the method further comprises:
Verifying the security authentication credentials;
if the security authentication credentials pass verification, establishing communication connection with the client;
and if the security authentication credentials are not verified, disconnecting communication connection with the client.
4. The method according to any of claims 1-2, wherein after the step of obtaining the security authentication credentials returned by the client and the security access credentials returned by the storage device, the method further comprises:
verifying the security access credential;
if the security access credential passes the verification, establishing communication connection with the storage device;
and if the security access credential fails verification, disconnecting communication connection with the storage device.
5. The method according to claim 1, wherein after generating shared file information according to the shared device information, the device information to be shared, and the sequence identifier corresponding to the file to be shared, the method further comprises:
and carrying out format conversion on the shared equipment information to obtain the shared equipment information after format conversion, wherein the format corresponding to the shared equipment information after format conversion is a data format which can be processed by the client.
6. The method according to any of claims 1-2, wherein before the sending the add information read instruction and the secure authentication credential to the client to obtain device information to be shared returned by the client, the method further comprises:
sending the secure authentication credentials to the client to verify whether the secure authentication credentials are valid;
receiving a verification result returned by the client;
and if the verification result is that the security authentication credential is valid, executing the step of sending the added information reading instruction and the security authentication credential to the client.
7. The method according to any one of claims 1-2, wherein after the sending the shared file information and the security authentication credentials to the client to cause the client to perform a shared file update according to the shared file information, the method further comprises:
receiving an updating result of the shared file information returned by the client;
determining an updating mode corresponding to the updating result according to the updating result;
and performing operation processing according to the updating mode corresponding to the updating result.
8. The method of any of claims 1-2, wherein the client is a data mining DI client.
9. An adding device of a shared file, wherein the device is applied to a shared file device, and the adding device of the shared file comprises:
the response unit is used for responding to the shared file adding operation, generating a shared information reading instruction and an added information reading instruction, and respectively sending user login information to a client and storage equipment to acquire a security authentication credential returned by the client and a security access credential returned by the storage equipment;
the sending unit is used for sending the data reading instruction and the security access certificate to the storage equipment so as to acquire shared equipment information returned by the storage equipment;
the sending unit is further configured to send the additional information reading instruction and the security authentication credential to the client, so as to obtain equipment information to be shared returned by the client;
the generation unit is used for generating shared file information according to the shared equipment information and the equipment information to be shared;
the sending unit is further configured to send the shared file information and the security authentication credential to the client, so that the client updates a shared file according to the shared file information;
The shared equipment information comprises the sequence identifications corresponding to the existing shared files and the shared files respectively; the equipment information to be shared comprises files to be shared;
the generating shared file information according to the shared device information and the device information to be shared includes:
determining the sequence identification corresponding to the file to be shared according to the sequence identifications respectively corresponding to the existing shared files;
and generating shared file information according to the shared device information, the device information to be shared and the sequence identifier corresponding to the file to be shared.
CN202110010190.5A 2021-01-04 2021-01-04 Shared file adding method and device Active CN112597118B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110010190.5A CN112597118B (en) 2021-01-04 2021-01-04 Shared file adding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110010190.5A CN112597118B (en) 2021-01-04 2021-01-04 Shared file adding method and device

Publications (2)

Publication Number Publication Date
CN112597118A CN112597118A (en) 2021-04-02
CN112597118B true CN112597118B (en) 2024-03-29

Family

ID=75207463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110010190.5A Active CN112597118B (en) 2021-01-04 2021-01-04 Shared file adding method and device

Country Status (1)

Country Link
CN (1) CN112597118B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442332B (en) * 2022-08-30 2023-06-23 潍柴动力股份有限公司 Resource sharing method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841537A (en) * 2010-04-13 2010-09-22 北京时代亿信科技有限公司 Method and system for realizing file sharing access control based on protocol proxy
CN101877650A (en) * 2010-05-20 2010-11-03 中兴通讯股份有限公司 Method and system for updating software version automatically
CN102480494A (en) * 2010-11-23 2012-05-30 金蝶软件(中国)有限公司 File updating method, device and system
CN102882985A (en) * 2012-10-23 2013-01-16 上海够快网络科技有限公司 File sharing method based on cloud storage
US9805115B1 (en) * 2014-03-13 2017-10-31 Symantec Corporation Systems and methods for updating generic file-classification definitions
CN107682453A (en) * 2017-11-02 2018-02-09 郑州云海信息技术有限公司 A kind of file sharing method based on HTTP, system and equipment
WO2018085870A1 (en) * 2016-11-09 2018-05-17 Ait Austrian Institute Of Technology Gmbh Method for exchanging data fields of certified documents
CN111880874A (en) * 2020-07-13 2020-11-03 腾讯科技(深圳)有限公司 Media file sharing method, device and equipment and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841537A (en) * 2010-04-13 2010-09-22 北京时代亿信科技有限公司 Method and system for realizing file sharing access control based on protocol proxy
CN101877650A (en) * 2010-05-20 2010-11-03 中兴通讯股份有限公司 Method and system for updating software version automatically
CN102480494A (en) * 2010-11-23 2012-05-30 金蝶软件(中国)有限公司 File updating method, device and system
CN102882985A (en) * 2012-10-23 2013-01-16 上海够快网络科技有限公司 File sharing method based on cloud storage
US9805115B1 (en) * 2014-03-13 2017-10-31 Symantec Corporation Systems and methods for updating generic file-classification definitions
WO2018085870A1 (en) * 2016-11-09 2018-05-17 Ait Austrian Institute Of Technology Gmbh Method for exchanging data fields of certified documents
CN107682453A (en) * 2017-11-02 2018-02-09 郑州云海信息技术有限公司 A kind of file sharing method based on HTTP, system and equipment
CN111880874A (en) * 2020-07-13 2020-11-03 腾讯科技(深圳)有限公司 Media file sharing method, device and equipment and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WebDava:an administrator-free approach to web file-sharing;A.Levine等;《Wet Ice 2003.proceeding.Twelfth IEEE international workshops on enabling technologies》;20030915;第1-2页 *
基于区块链的电子政务数据共享设计研究;谷宁静;《信息安全与通信保密》;20200410(第4期);第91-87页 *

Also Published As

Publication number Publication date
CN112597118A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN109547458B (en) Login verification method and device, computer equipment and storage medium
CN110278187B (en) Multi-terminal single sign-on method, system, synchronous server and medium
US8869258B2 (en) Facilitating token request troubleshooting
CN113381979B (en) Access request proxy method and proxy server
CN108259457B (en) WEB authentication method and device
CN101426009A (en) Identity management platform, service server, uniform login system and method
CN111698250A (en) Access request processing method and device, electronic equipment and computer storage medium
CN111475795A (en) Method and device for unified authentication and authorization facing to multiple applications
CN111818088A (en) Authorization mode management method and device, computer equipment and readable storage medium
CN112434054A (en) Audit log updating method and device
CN111064708B (en) Authorization authentication method and device and electronic equipment
CN112860778B (en) Database management method, device, equipment and medium for desktop application program
CN112491776A (en) Security authentication method and related equipment
CN113360868A (en) Application program login method and device, computer equipment and storage medium
CN115022047B (en) Account login method and device based on multi-cloud gateway, computer equipment and medium
CN113761509B (en) iframe verification login method and device
CN115396192A (en) User identity verification method and device, computer equipment and storage medium
CN112165448A (en) Service processing method, device, system, computer equipment and storage medium
CN115982694A (en) Resource access method, device, equipment and medium
CN112597118B (en) Shared file adding method and device
CN112929388B (en) Network identity cross-device application rapid authentication method and system, and user agent device
CN112565239B (en) Authentication method, device, computer equipment and storage medium for integrating multiple operators
CN112685718A (en) Method for invalidating original access token during multi-terminal login of same account based on OAuth protocol
JP6848275B2 (en) Program, authentication system and authentication cooperation system
CN115529154A (en) Login management method, login management device, electronic device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant