Data access method and device, medium and equipment
By generating and sending target login information every time you access the target server, the problems of low security and affected access efficiency in traditional data access methods are solved, and higher security and user experience are achieved.
Patent Information
- Application Number
- CN202510318822.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-11
AI Technical Summary
In traditional data access methods, users need to remember fixed accounts and passwords, resulting in low security and impact on access efficiency.
By generating target login information in real time according to the preset login information generation rules every time you access the target server, the target login information is generated in real time and sent to the bound target terminal device, and the user uses the real-time generated login information for authentication.
It reduces the data security risks brought by fixed login information, improves the user experience, and avoids the trouble of users remembering complex login information.
Smart Images

Figure CN120296710A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to the field of data access technology, and more particularly to a data access method, apparatus, medium and device. Background Art
[0002] Samba is free software that implements the SMB (Server Message Block) protocol on Linux and Unix systems, consisting of a Samba server and a Samba client. Samba allows different computers within a local area network to share resources such as files and printers. When accessing data in a Samba server, users usually need to enter the correct account and password and complete the login.
[0003] However, there are still some problems when using traditional data access methods to access data in a Samba server. First, users need to remember the set account and password, but overly simple account and password are easily cracked, while overly complex account and password are likely to affect data access efficiency due to user forgetting or incorrect input. Second, since the account and password are usually fixed, there is a risk of being stolen, resulting in low security. Summary of the Invention
[0004] Embodiments of this application provide a data access method, apparatus, medium and device. Using the data access method provided by the embodiments of this application to solve the problem of low security in current data access methods.
[0005] On the one hand, embodiments of this application provide a data access method, the method includes:
[0006] In response to a startup operation for a target server, determine a target terminal device bound to the target server, where the target terminal device is used to receive login information sent by the target server;
[0007] According to a preset login information generation rule, generate in real time target login information for logging in to the target server;
[0008] Send the target login information to the target terminal device;
[0009] In response to a login operation for the target server, authenticate the input user login information according to the target login information;
[0010] When the target login information passes the authentication, allow access to the data in the target server.
[0011] Further, in the data access method described in the embodiments of the present application, the step of generating target login information for logging in to the target server in real time according to a preset login information generation rule includes:
[0012] Randomly generate target login information for logging in to the target server with a character length not exceeding the preset character length according to the preset character length, where the target login information includes a login account and a login password.
[0013] Further, in the data access method described in the embodiments of the present application, the step of generating target login information for logging in to the target server in real time according to a preset login information generation rule includes:
[0014] Select one from the multiple preset fixed login information as the target login information for logging in to the target server in sequential or disordered selection mode, where the target login information includes a login account and a login password.
[0015] Further, in the data access method described in the embodiments of the present application, before authenticating the input user login information according to the target login information, the method further includes:
[0016] Check whether there is cached login information in the target server, where the cached login information is the login information used when the target server logged in successfully last time;
[0017] If there is the cached login information, compare the target login information with the cached login information of the target server;
[0018] If the target login information is inconsistent with the cached login information, generate an error message and pop up a prompt, and at the same time cancel the step of authenticating the input user login information according to the target login information;
[0019] If there is no cached login information, or the target login information is consistent with the cached login information, execute the step of authenticating the input user login information according to the target login information.
[0020] Further, in the data access method described in the embodiments of the present application, after generating the error message and popping up the prompt, the method further includes:
[0021] In response to a reconnection operation for the target server, delete the cached login information;
[0022] Re-check whether there is cached login information in the target server. If there is no such cached login information, perform the step of authenticating the input user login information according to the target login information.
[0023] Further, in the data access method described in the embodiments of the present application, after generating the error message and popping up a prompt, the method further includes:
[0024] When it is detected that the duration since the error message was popped up exceeds a preset threshold, delete the cached login information;
[0025] Re-check whether there is cached login information in the target server. If there is no such cached login information, perform the step of authenticating the input user login information according to the target login information.
[0026] Further, in the data access method described in the embodiments of the present application, before authenticating the input user login information according to the target login information, the method further includes:
[0027] Check whether there is cached login information in the target server, where the cached login information is the login information used when the target server logged in successfully last time;
[0028] If there is such cached login information, compare the target login information with the cached login information of the target server;
[0029] If the target login information is inconsistent with the cached login information, generate an error message;
[0030] Intercept the error message and delete the cached login information;
[0031] Re-check whether there is cached login information in the target server. If there is no such cached login information, perform the step of authenticating the input user login information according to the target login information.
[0032] Correspondingly, another aspect of the embodiments of the present application further provides a data access device, and the data access device includes:
[0033] A determination module, configured to determine a target terminal device bound to the target server in response to a startup operation for the target server, where the target terminal device is used to receive login information sent by the target server;
[0034] A generation module, configured to generate in real time a target login information for logging in to the target server according to a preset login information generation rule;
[0035] A sending module, configured to send the target login information to the target terminal device;
[0036] An authentication module, configured to, in response to a login operation for the target server, authenticate the input user login information according to the target login information;
[0037] An authorization module, configured to allow access to the data in the target server when the target login information passes the authentication.
[0038] Correspondingly, another aspect of the embodiments of the present application further provides a computer storage medium, where the computer storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the data access method as described above.
[0039] Correspondingly, another aspect of the embodiments of the present application further provides an electronic device, including a processor and a memory, where the memory stores multiple instructions, and the processor loads the instructions to execute the data access method as described above.
[0040] The embodiments of the present application provide a data access method, device, medium, and device. The method determines a target terminal device bound to a target server by responding to a startup operation for the target server; generates target login information for logging in to the target server according to a preset login information generation rule; sends the target login information to the target terminal device; in response to a login operation for the target server, authenticates the input user login information according to the target login information; and allows access to the data in the target server when the target login information passes the authentication. By using the data access method provided by the embodiments of the present application, by generating target login information for logging in to the target server according to a preset login information generation rule each time the target server is accessed, and sending the target login information to the target terminal device bound to the target server, allowing the user to log in and access the data of the target server with the real-time generated target login information, the data security risk brought by fixed login information is reduced, and by sending the target login information to the target terminal device, the user does not need to remember complex login information, thereby improving the user experience. Description of the Drawings
[0041] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
[0042] Figure 1Schematic flowchart of the data access method provided by the embodiment of the present application.
[0043] Figure 2 Another schematic flowchart of the data access method provided by the embodiment of the present application.
[0044] Figure 3 Another schematic flowchart of the data access method provided by the embodiment of the present application.
[0045] Figure 4 Schematic structural diagram of the data access device provided by the embodiment of the present application.
[0046] Figure 5 Another schematic structural diagram of the data access device provided by the embodiment of the present application.
[0047] Figure 6 Schematic structural diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0048] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.
[0049] The embodiment of the present application provides a data access method. By generating, according to a preset login information generation rule, target login information for logging in to a target server each time the target server is accessed, and sending the target login information to a target terminal device bound to the target server, allowing a user to log in and access the data of the target server using the real-time generated target login information, the data security risk brought by fixed login information can be reduced, and by sending the target login information to the target terminal device, the user does not need to remember complex login information, thereby improving the user experience.
[0050] The term "and / or" appearing in the present application may be an association relationship describing associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present application generally represents an "or" relationship between the front and rear associated objects.
[0051] In the description and claims of this application and the above-mentioned drawings, terms such as "first", "second", etc. are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described here can be implemented in an order other than that shown or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or electronic device that includes a series of steps or modules does not necessarily have to be limited to those steps or modules clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products, or electronic devices. The naming or numbering of steps that appear in this application does not mean that the steps in the method flow must be executed in the chronological / logical order indicated by the naming or numbering. The named or numbered process steps can be changed in the order of execution according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of modules that appears in this application is a logical division, and there can be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling, direct coupling, or communication connection to each other can be through some interfaces. The indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. And the modules or sub-modules described as separate components can be physically separated or not, can be physical modules or not, or can be distributed to multiple circuit modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application.
[0052] The data access method involved in the embodiments of this application is mainly applied to an electronic device, which can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a server, etc., and is not limited here. Optionally, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or an IoT cloud (Internet of Things cloud) that provides the ability to store, process, and manage data generated by Internet of Things electronic devices, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms, and is not limited here.
[0053] For ease of understanding, the specific processes in the embodiments of this application are described below. Please refer to Figure 1 , Figure 1Schematic flowchart of an embodiment of the data access method provided by the embodiment of the present application.
[0054] In Figure 1 the embodiment shown, the method specifically includes the following steps:
[0055] S101, in response to a startup operation for a target server, determine a target terminal device bound to the target server, where the target terminal device is used to receive login information sent by the target server.
[0056] It should be explained that the target server refers to a server for storing data of a specified client, and the specified client can be an application program with user interaction functions. Taking the Samba server and client as an example, Samba is an application program that implements the SMB (Server Message Block) protocol on Linux and Unix systems. SMB refers to a communication protocol for sharing resources such as files and printers on a local area network, and it provides a sharing service for resources such as files and printers between different computers within the local area network.
[0057] When a user accesses data in the target server, usually the client corresponding to the target server needs to be started first, and correct login information is entered on the user interaction interface provided by the client to complete the login. After successful login, authorized access to the data in the target server can be obtained. In this embodiment, when it is detected that the user starts the client corresponding to the target server and successfully jumps to the user interaction interface provided by the client, it can be understood that the startup operation for the target server is detected. In the traditional data access method, the user only needs to enter the correct login information and complete the authentication to successfully log in to the target server. However, considering that when using the traditional data access method to access the data of the target server, the user needs to remember the set login information. When the login information is too simple, it is easily cracked, and when the login information is too complex, it is easily affected by user forgetting or input errors, which affects the data access efficiency.
[0058] To solve the above problems, in this embodiment, a target terminal device (such as a mobile phone or other device) is newly added on the basis of the original target server, and the target terminal device is bound to the target server in advance, and the target terminal and the target server are connected by data using Bluetooth communication or WiFi communication. When the startup operation for the target server is successfully responded to, by determining the target terminal device bound to the target server, the login information is sent to the target terminal device, so that the user does not need to specifically remember the complex login information.
[0059] S102, according to a preset login information generation rule, generate in real time target login information for logging in to the target server.
[0060] In this embodiment, by generating target login information for logging in to the target server according to a preset login information generation rule each time the target server is accessed, and sending the target login information to the target terminal device bound to the target server, allowing the user to log in and access the data of the target server using the real-time generated target login information, thereby reducing the data security risk brought by fixed login information, and by sending the target login information to the target terminal device, the user does not need to remember complex login information, thereby enhancing the user experience.
[0061] S103. Send the target login information to the target terminal device.
[0062] In this embodiment, the target terminal device can be a mobile phone, a computer or other terminal devices. The target terminal device can either be a terminal device independent of the client running the above example, or a terminal device running the client of the above example, which is not limited here.
[0063] S104. In response to a login operation for the target server, authenticate the input user login information according to the target login information.
[0064] In this embodiment, either the user can manually input the login information obtained by the target terminal device into the client for authentication, or a control can be set on the client, and when the user clicks the control, the login information on the target terminal device can be automatically input into the client for authentication. By comparing the target login information with the user input user login information, the user input user login information is authenticated. If the target login information is consistent with the user login information, it indicates that the current user login information passes the authentication.
[0065] S105. When the target login information passes the authentication, allow access to the data in the target server.
[0066] In this embodiment, if the user input user login information is authenticated and passes the authentication, the user can be authorized to access the data of the target server. Taking Samba as an example, under the action of the SMB protocol, the data on the target server can also be mounted to the client in the form of a folder for the user to click on the folder to view or modify the data of the target server.
[0067] In some embodiments, the generating, according to a preset login information generation rule, target login information for logging in to the target server in real time includes:
[0068] Randomly generate target login information for logging in to the target server with a character length not exceeding the preset character length, where the target login information includes a login account and a login password.
[0069] In this embodiment, the target login information with a character length not exceeding the preset character length can be randomly generated. For example, in a Unix-like system, the / dev / urandom device file provides an interface for obtaining random data. A random byte sequence can be read from this device file and used to generate random data as the login account and login password in the target login information. It is also possible to use the cryptography library openssl. Openssl provides a rand command that can be used to generate random data as the login account and login password in the target login information.
[0070] In some embodiments, the real-time generation of target login information for logging in to the target server according to the preset login information generation rules includes:
[0071] Select one from the multiple preset fixed login information as the target login information for logging in to the target server in a sequential or disordered selection manner, where the target login information includes a login account and a login password.
[0072] In this embodiment, multiple fixed login information can be preset, and when target login information needs to be generated, one of them can be selected as the target login information in a sequential or disordered selection manner.
[0073] In some embodiments, as Figure 2 shown, before S104, the method further includes the following steps:
[0074] S201, check whether there is cached login information in the target server, where the cached login information is the login information used when the target server logged in successfully last time;
[0075] S202, if there is the cached login information, compare the target login information with the cached login information of the target server;
[0076] S203, if the target login information is inconsistent with the cached login information, generate an error message and pop up a prompt, and at the same time cancel the step of authenticating the input user login information according to the target login information;
[0077] In S204, if the cached login information does not exist, or the target login information is the same as the cached login information, then perform the step of authenticating the input user login information according to the target login information.
[0078] In this embodiment, in order to retain the conventional data access method of fixed login information and further enhance the security of accessing data, a caching mechanism can be introduced. Through the combination of the caching mechanism and authentication, the security of accessing data can be further enhanced. Based on the caching mechanism, the login information used each time when successfully logging in to the target server is stored as cached data (i.e., cached login information). When receiving the input user login information next time, first check whether there is cached login information in the target server. If there is cached login information, compare the target login information with the cached login information in the target server. If the target login information is different from the cached login information, generate an error message (such as "1219 error") and pop up a prompt window, and at the same time cancel the step of authenticating the input user login information according to the target login information. If the cached login information does not exist, or the target login information is the same as the cached login information (i.e., retaining the conventional data access method of fixed login information), then perform the step of authenticating the input user login information according to the target login information.
[0079] In some embodiments, after generating the error message and popping up the prompt window, the method further includes:
[0080] In response to a reconnect operation for the target server, delete the cached login information;
[0081] Check again whether there is cached login information in the target server. If the cached login information does not exist, then perform the step of authenticating the input user login information according to the target login information.
[0082] In this embodiment, to solve the problem that the target login information inconsistent with the cached login information cannot be used to access the target server due to the pop-up prompt of the error message, the problem of the pop-up prompt of the error message can be solved by restarting the target server to forcibly delete the cached login information.
[0083] In some embodiments, after generating the error message and popping up the prompt window, the method further includes:
[0084] When it is detected that the duration since the pop-up prompt of the error message exceeds a preset threshold, delete the cached login information;
[0085] Recheck whether there is cached login information in the target server. If there is no such cached login information, perform the step of authenticating the input user login information according to the target login information.
[0086] In this embodiment, to solve the problem that the target login information inconsistent with the cached login information cannot be used to access the target server due to the pop-up prompt of the error message, a mechanism for automatically deleting the cached login information can also be set. When it is detected that the duration since the pop-up prompt of the error message exceeds a preset threshold, the cached login information is automatically deleted to solve the problem of the pop-up prompt of the error message.
[0087] In some embodiments, as Figure 3 shown, before S104, the method further includes the following steps:
[0088] S301, check whether there is cached login information in the target server, where the cached login information is the login information used when the target server logged in successfully last time;
[0089] S302, if there is such cached login information, compare the target login information with the cached login information of the target server;
[0090] S303, if the target login information is inconsistent with the cached login information, generate an error message;
[0091] S304, intercept the error message and delete the cached login information;
[0092] S305, recheck whether there is cached login information in the target server. If there is no such cached login information, perform the step of authenticating the input user login information according to the target login information.
[0093] In this embodiment, considering that if different login information is used for login each time the target server is accessed, it may happen that an error message is triggered because the cached login information in the client is inconsistent with the currently input user login information. Usually, it is necessary to wait for a period of time until the time set by the system for regularly clearing the cached login information arrives to clear the cached login information, or the user needs to actively reconnect to the target server to achieve the purpose of clearing the cached login information. However, due to the uncertain waiting duration and the fact that the user reconnecting to the target server affects the user experience, based on this technical defect, by intercepting the error message when it is detected that the target login information is inconsistent with the cached login information and an error message is generated, the purpose of deleting the cached login information can be achieved. This can not only avoid being unable to continue accessing the target server due to the inconsistency between the target login information and the cached login information, but also achieve the purpose of deleting the cached login information without the user's awareness and quickly. It should be noted that in some embodiments, the cached login information can be deleted by restarting the LanmanWorkstation (the service for managing cached data) service on the target server.
[0094] Any combination of the above all optional technical solutions can form an optional embodiment of the present application, which will not be elaborated here one by one.
[0095] In specific implementation, the present application is not limited by the execution order of the described steps. Without conflict, some steps can also be performed in other orders or simultaneously.
[0096] As can be seen from the above, the data access method provided by the embodiment of the present application determines a target terminal device bound to the target server in response to a startup operation for the target server, where the target terminal device is used to receive the login information sent by the target server; generates in real time a target login information for logging in to the target server according to a preset login information generation rule; sends the target login information to the target terminal device; in response to a login operation for the target server, authenticates the input user login information according to the target login information; and allows access to the data in the target server when the target login information passes the authentication. By using the data access method provided by the embodiment of the present application, by generating in real time a target login information for logging in to the target server according to a preset login information generation rule each time the target server is accessed and sending the target login information to the target terminal device bound to the target server, enabling the user to log in and access the data of the target server with the real-time generated target login information, the data security risk brought by the fixed login information can be reduced, and by sending the target login information to the target terminal device, the user does not need to remember complex login information, thus improving the user experience.
[0097] An embodiment of the present application further provides a data access device, which can be integrated in an electronic device.
[0098] Please refer to Figure 4 , Figure 4 , which is a schematic structural diagram of the data access device provided by the embodiment of the present application. The data access device 30 may include:
[0099] A determination module 31, configured to determine a target terminal device bound to the target server in response to a startup operation for the target server, where the target terminal device is used to receive login information sent by the target server;
[0100] A generation module 32, configured to generate target login information for logging in to the target server in real time according to a preset login information generation rule;
[0101] A sending module 33, configured to send the target login information to the target terminal device;
[0102] A verification module 34, configured to authenticate the input user login information according to the target login information in response to a login operation for the target server;
[0103] An authorization module 35, configured to allow access to the data in the target server when the target login information passes the authentication.
[0104] In some embodiments, the generation module 32 is configured to randomly generate target login information for logging in to the target server, where the character length of the target login information does not exceed the preset character length according to the preset character length, and the target login information includes a login account and a login password.
[0105] In some embodiments, the generation module 32 is configured to select one from the multiple preset fixed login information as the target login information for logging in to the target server in a sequential or disordered selection manner, where the target login information includes a login account and a login password.
[0106] In some embodiments, the device further includes a comparison module configured to check whether cached login information exists in the target server, where the cached login information is the login information used when the target server logged in successfully last time; if the cached login information exists, compare the target login information with the cached login information of the target server; if the target login information is inconsistent with the cached login information, generate an error message and pop up a prompt window, and at the same time cancel the step of authenticating the input user login information according to the target login information; if the cached login information does not exist, or the target login information is consistent with the cached login information, execute the step of authenticating the input user login information according to the target login information.
[0107] In some embodiments, the device further includes a first deletion module configured to, in response to a reconnect operation for the target server, delete the cached login information; check again whether cached login information exists in the target server, and if the cached login information does not exist, execute the step of authenticating the input user login information according to the target login information.
[0108] In some embodiments, the device further includes a second deletion module configured to, when it is detected that the duration since the error message popped up exceeds a preset threshold, delete the cached login information; check again whether cached login information exists in the target server, and if the cached login information does not exist, execute the step of authenticating the input user login information according to the target login information.
[0109] In some embodiments, the device further includes a third deletion module configured to check whether cached login information exists in the target server, where the cached login information is the login information used when the target server logged in successfully last time; if the cached login information exists, compare the target login information with the cached login information of the target server; if the target login information is inconsistent with the cached login information, generate an error message; intercept the error message, and delete the cached login information; check again whether cached login information exists in the target server, and if the cached login information does not exist, execute the step of authenticating the input user login information according to the target login information.
[0110] Specifically in implementation, each of the above modules can be implemented as an independent entity, or can be combined arbitrarily to be implemented as the same or several entities.
[0111] As described above, the data access device 30 provided in the embodiments of the present application includes a determination module 31, configured to determine a target terminal device bound to the target server in response to a startup operation for the target server, where the target terminal device is used to receive login information sent by the target server; a generation module 32, configured to generate target login information for logging in to the target server in real time according to a preset login information generation rule; a sending module 33, configured to send the target login information to the target terminal device; a verification module 34, configured to authenticate the input user login information according to the target login information in response to a login operation for the target server; and an authorization module 35, configured to allow access to data in the target server when the target login information passes the authentication. The data access device 30 provided in the embodiments of the present application generates, each time the target server is accessed, target login information for logging in to the target server according to a preset login information generation rule, and sends the target login information to the target terminal device bound to the target server, enabling the user to log in and access the data of the target server using the real-time generated target login information, thereby reducing the data security risk brought by fixed login information, and by sending the target login information to the target terminal device, eliminating the need for the user to remember complex login information, and further enhancing the user experience.
[0112] The embodiments of the present application further provide a data access device, which may be integrated in an electronic device.
[0113] In specific implementation, each of the above modules may be implemented as an independent entity, or may be combined arbitrarily to be implemented as the same or several entities.
[0114] Please refer to Figure 5 , Figure 5 which is another structural schematic diagram of the data access device provided in the embodiments of the present application. The data access device 30 includes a memory 120, one or more processors 180, and one or more application programs, where the one or more application programs are stored in the memory 120 and configured to be executed by the processor 180; the processor 180 may include a determination module 31, a generation module 32, a sending module 33, a verification module 34, and an authorization module 35. For example, the structures and connection relationships of the above components may be as follows:
[0115] The memory 120 can be used to store application programs and data. The application programs stored in the memory 120 contain executable code. The application programs can form various functional modules. The processor 180 executes various functional applications and data processing by running the application programs stored in the memory 120. In addition, the memory 120 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 with access to the memory 120.
[0116] The processor 180 is the control center of the device, connecting various parts of the entire terminal using various interfaces and lines. By running or executing the application programs stored in the memory 120 and calling the data stored in the memory 120, it executes various functions of the device and processes data, thereby providing overall monitoring of the device. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc.
[0117] Specifically in this embodiment, the processor 180 will, according to the following instructions, load the executable code corresponding to the processes of one or more application programs into the memory 120, and the processor 180 will run the application programs stored in the memory 120 to implement various functions:
[0118] A determination instruction, used to determine a target terminal device bound to the target server in response to a startup operation for the target server, where the target terminal device is used to receive login information sent by the target server;
[0119] A generation instruction, used to generate target login information for logging in to the target server in real time according to a preset login information generation rule;
[0120] A sending instruction, used to send the target login information to the target terminal device;
[0121] A verification instruction, used to authenticate the input user login information according to the target login information in response to a login operation for the target server;
[0122] An authorization instruction, used to allow access to the data in the target server when the target login information passes the authentication.
[0123] In some embodiments, the generation instruction is used to randomly generate target login information for logging in to the target server, where the length of the characters in the target login information does not exceed a preset character length. The target login information includes a login account and a login password.
[0124] In some embodiments, the generation instruction is used to select one of a plurality of preset fixed login information as the target login information for logging in to the target server in a sequential or random selection manner. The target login information includes a login account and a login password.
[0125] In some embodiments, the program further includes a comparison instruction for checking whether cached login information exists in the target server. The cached login information is the login information used when the target server logged in successfully last time. If the cached login information exists, the target login information is compared with the cached login information in the target server. If the target login information is inconsistent with the cached login information, an error message is generated and a pop-up prompt is given, and at the same time, the step of authenticating the input user login information according to the target login information is cancelled. If the cached login information does not exist, or the target login information is consistent with the cached login information, the step of authenticating the input user login information according to the target login information is executed.
[0126] In some embodiments, the program further includes a first deletion instruction for deleting the cached login information in response to a reconnect operation on the target server, and then checking again whether cached login information exists in the target server. If the cached login information does not exist, the step of authenticating the input user login information according to the target login information is executed.
[0127] In some embodiments, the program further includes a second deletion instruction for deleting the cached login information when it is detected that the duration since the error message pop-up prompt exceeds a preset threshold, and then checking again whether cached login information exists in the target server. If the cached login information does not exist, the step of authenticating the input user login information according to the target login information is executed.
[0128] In some embodiments, the program further includes a third deletion instruction for checking whether there is cached login information in the target server, where the cached login information is the login information used when the target server logged in successfully last time; if the cached login information exists, compare the target login information with the cached login information of the target server; if the target login information is inconsistent with the cached login information, generate an error message; intercept the error message and delete the cached login information; check again whether there is cached login information in the target server, and if the cached login information does not exist, perform the step of authenticating the input user login information according to the target login information.
[0129] An embodiment of the present application further provides an electronic device. Please refer to Figure 6 , Figure 6 which shows a schematic structural diagram of the electronic device provided by the embodiment of the present application. The electronic device can be used to implement the data access method provided in the above embodiment. The electronic device 1200 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a server, etc.
[0130] As Figure 6 shown, the electronic device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190 and other components. Those skilled in the art can understand that Figure 6 the structure of the electronic device 1200 shown in
[0131] does not constitute a limitation on the electronic device 1200, and it may include more or fewer components than shown in the figure, or combine some components, or arrange different components. Among them:
[0132] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data access method in the above embodiments. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120, and can automatically select a vibration reminder mode for data access according to the current scenario where the electronic device is located, which can not only ensure that the meeting and other scenarios are not disturbed, but also ensure that the user can perceive incoming calls, improving the intelligence of the electronic device. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 120 may further include a memory remotely provided relative to the processor 180, and these remote memories can be connected to the electronic device 1200 through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and their combinations.
[0133] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input electronic devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touchpad, can collect touch operations of a user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch-sensitive surface 131), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive commands sent by the processor 180 and execute them. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch-sensitive surface 131. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input electronic devices 132. Specifically, the other input electronic devices 132 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, etc.
[0134] The display unit 140 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device 1200. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 can cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 6 , the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to perform input and output functions, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to implement input and output functions.
[0135] The electronic device 1200 may further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 141 and / or the backlight when the electronic device 1200 is moved to the ear. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. As for other sensors that the electronic device 1200 can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be elaborated here.
[0136] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the electronic device 1200. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, and the speaker 161 converts it into a sound signal for output. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and then converted into audio data. After the audio data is output to the processor 180 for processing, it is sent through the RF circuit 110 to, for example, another terminal, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earphone jack to provide communication between the peripheral earphone and the electronic device 1200.
[0137] The electronic device 1200 can help users send and receive emails, browse the web, and access streaming media through a transmission module 170 (such as a Wi-Fi module), providing users with wireless broadband Internet access. Although Figure 6 the transmission module 170 is shown, it can be understood that it does not belong to the essential components of the electronic device 1200 and can be omitted entirely within the scope of not changing the essence of the invention as needed.
[0138] The processor 180 is the control center of the electronic device 1200, connecting various parts of the entire mobile phone through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 120, and by calling the data stored in the memory 120, it executes various functions of the electronic device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 180 either.
[0139] The electronic device 1200 also includes a power supply 190 that powers each component. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, thereby implementing functions such as managing discharge and power consumption management through the power management system. The power supply 190 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0140] Although not shown, the electronic device 1200 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the display unit 140 of the electronic device 1200 is a touch screen display, and the electronic device 1200 also includes a memory 120, and one or more programs, where one or more programs are stored in the memory 120 and are configured to be executed by one or more processors 180. The one or more programs include instructions for performing the following operations:
[0141] A determination instruction, for determining a target terminal device bound to the target server in response to a startup operation for the target server, where the target terminal device is used to receive login information sent by the target server;
[0142] A generation instruction, for generating target login information for logging in to the target server in real time according to a preset login information generation rule;
[0143] A sending instruction for sending the target login information to the target terminal device;
[0144] A verification instruction for authenticating the input user login information according to the target login information in response to a login operation for the target server;
[0145] An authorization instruction for allowing access to the data in the target server when the target login information passes the authentication.
[0146] In some embodiments, the generation instruction is used to randomly generate target login information for logging in to the target server with a character length not exceeding the preset character length according to the preset character length, where the target login information includes a login account and a login password.
[0147] In some embodiments, the generation instruction is used to select one from the multiple preset fixed login information as the target login information for logging in to the target server in a sequential or disordered selection manner, where the target login information includes a login account and a login password.
[0148] In some embodiments, the program further includes a comparison instruction for checking whether there is cached login information in the target server, where the cached login information is the login information used when the target server logged in successfully last time; if the cached login information exists, the target login information is compared with the cached login information in the target server; if the target login information is inconsistent with the cached login information, an error message is generated and a pop-up window is prompted, and at the same time, the step of authenticating the input user login information according to the target login information is cancelled; if the cached login information does not exist, or the target login information is consistent with the cached login information, the step of authenticating the input user login information according to the target login information is executed.
[0149] In some embodiments, the program further includes a first deletion instruction for deleting the cached login information in response to a reconnection operation for the target server; rechecking whether there is cached login information in the target server, and if the cached login information does not exist, executing the step of authenticating the input user login information according to the target login information.
[0150] In some embodiments, the program further includes a second deletion instruction for deleting the cached login information when it is detected that the duration since the pop-up prompt of the error message exceeds a preset threshold; re-checking whether there is cached login information in the target server, and if there is no cached login information, performing the step of authenticating the input user login information according to the target login information.
[0151] In some embodiments, the program further includes a third deletion instruction for checking whether there is cached login information in the target server, where the cached login information is the login information used when the target server logged in successfully last time; if there is cached login information, comparing the target login information with the cached login information in the target server; if the target login information is inconsistent with the cached login information, generating an error message; intercepting the error message and deleting the cached login information; re-checking whether there is cached login information in the target server, and if there is no cached login information, performing the step of authenticating the input user login information according to the target login information.
[0152] An embodiment of the present application also provides an electronic device. The electronic device can be devices such as mobile phones and computers.
[0153] As can be seen from the above, an embodiment of the present application provides an electronic device 1200, and the electronic device 1200 performs the following steps:
[0154] In response to a startup operation for a target server, determining a target terminal device bound to the target server, where the target terminal device is used to receive login information sent by the target server;
[0155] According to a preset login information generation rule, generating in real time a target login information for logging in to the target server;
[0156] Sending the target login information to the target terminal device;
[0157] In response to a login operation for the target server, authenticating the input user login information according to the target login information;
[0158] When the target login information passes the authentication, allowing access to the data in the target server.
[0159] An embodiment of the present application also provides a storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer performs the following steps:
[0160] In response to a startup operation for a target server, determine a target terminal device bound to the target server, where the target terminal device is used to receive login information sent by the target server;
[0161] According to a preset login information generation rule, generate in real time target login information for logging in to the target server;
[0162] Send the target login information to the target terminal device;
[0163] In response to a login operation for the target server, authenticate the input user login information according to the target login information;
[0164] When the target login information passes the authentication, allow access to the data in the target server.
[0165] It should be noted that for the data access method described in this application, those of ordinary skill in the art can understand that all or part of the process of implementing the data access method described in the embodiments of this application can be completed by controlling related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, such as stored in the memory of an electronic device and executed by at least one processor in the electronic device. During the execution process, it can include the process of the embodiments of the data access method. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
[0166] For the data access device described in the embodiments of this application, its various functional modules can be integrated in a processing chip, or each module can exist physically alone, or two or more modules can be integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. When the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk or an optical disc, etc.
[0167] The above has introduced in detail the data access method, device, medium and equipment provided by the embodiments of this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those skilled in the art, according to the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A data access method, characterized in that, Including: In response to a startup operation for a target server, determine a target terminal device bound to the target server, where the target terminal device is used to receive login information sent by the target server; Generate target login information for logging in to the target server in real time according to a preset login information generation rule; Send the target login information to the target terminal device; In response to a login operation for the target server, authenticate the input user login information according to the target login information; When the target login information passes the authentication, allow access to the data in the target server.
2. The data access method according to claim 1, wherein The generating target login information for logging in to the target server in real time according to a preset login information generation rule includes: Randomly generate target login information for logging in to the target server with a character length not exceeding the preset character length according to the preset character length, where the target login information includes a login account and a login password.
3. The data access method according to claim 1, wherein The generating target login information for logging in to the target server in real time according to a preset login information generation rule includes: Select one from the multiple preset fixed login information as the target login information for logging in to the target server in an ordered or disordered selection manner, where the target login information includes a login account and a login password.
4. The data access method according to claim 1, wherein Before authenticating the input user login information according to the target login information, the method further includes: Check whether there is cached login information in the target server, where the cached login information is the login information used when the target server logged in successfully last time; If there is the cached login information, compare the target login information with the cached login information of the target server; If the target login information is inconsistent with the cached login information, generate an error message and pop up a prompt, and at the same time cancel the step of authenticating the input user login information according to the target login information; If there is no cached login information, or the target login information is consistent with the cached login information, execute the step of authenticating the input user login information according to the target login information.
5. The data access method according to claim 4, wherein After generating the error message and popping up the prompt, the method further includes: In response to a reconnection operation for the target server, delete the cached login information; Check again whether there is cached login information in the target server. If there is no cached login information, execute the step of authenticating the input user login information according to the target login information.
6. The data access method according to claim 4, wherein After generating the error message and popping up the prompt, the method further includes: When it is detected that the duration since the error message popped up exceeds a preset threshold, delete the cached login information; Check again whether there is cached login information in the target server. If there is no cached login information, execute the step of authenticating the input user login information according to the target login information.
7. The data access method according to claim 1, wherein Before authenticating the input user login information according to the target login information, the method further includes: Checking whether cached login information exists in the target server, where the cached login information is the login information used when the target server logged in successfully last time; If the cached login information exists, comparing the target login information with the cached login information of the target server; If the target login information is inconsistent with the cached login information, generating an error message; Intercepting the error message and deleting the cached login information; Checking again whether cached login information exists in the target server. If the cached login information does not exist, performing the step of authenticating the input user login information according to the target login information.
8. A data access device, characterized in that, The data access device includes: A determination module, configured to determine a target terminal device bound to the target server in response to a startup operation for the target server, where the target terminal device is used to receive login information sent by the target server; A generation module, configured to generate in real time target login information for logging in to the target server according to a preset login information generation rule; A sending module, configured to send the target login information to the target terminal device; An authentication module, configured to authenticate the input user login information according to the target login information in response to a login operation for the target server; An authorization module, configured to allow access to data in the target server when the target login information passes authentication.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the data access method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, Comprising a processor and a memory, the memory stores multiple instructions, and the processor loads the instructions to execute the data access method according to any one of claims 1 to 7.
Citation Information
Cited By
Websocket communication management method, platform and system based on RADIUS authentication
CN121690868A