WO2019169771A1 - Electronic device, access instruction information acquisition method and storage medium - Google Patents

Electronic device, access instruction information acquisition method and storage medium Download PDF

Info

Publication number
WO2019169771A1
WO2019169771A1 PCT/CN2018/089872 CN2018089872W WO2019169771A1 WO 2019169771 A1 WO2019169771 A1 WO 2019169771A1 CN 2018089872 W CN2018089872 W CN 2018089872W WO 2019169771 A1 WO2019169771 A1 WO 2019169771A1
Authority
WO
WIPO (PCT)
Prior art keywords
redis
access instruction
instruction information
information
client
Prior art date
Application number
PCT/CN2018/089872
Other languages
French (fr)
Chinese (zh)
Inventor
汪小波
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019169771A1 publication Critical patent/WO2019169771A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Definitions

  • the present application relates to the field of computers, and in particular, to an electronic device, an access instruction information acquiring method, and a storage medium.
  • Redis is a high-performance in-memory database. Open platforms usually use Redis to store and generate some frequently accessed data, such as storage client (CLIENT) login authentication information, and storage access instruction information (ACESS_TOKEN) or generate access command information. Wait. Since the client's login authentication information and the amount of read and write calls to the access command information may reach hundreds of millions of dollars in a certain period of time, even high-performance Redis may be at risk of downtime. In the event of a downtime in Redis, there is a risk of a single point of failure, which will result in inefficient access by the client to the entire open platform, seriously affecting the user's use.
  • CLIENT storage client
  • ACESS_TOKEN storage access instruction information
  • the present application provides an electronic device, an access instruction information acquisition method, and a storage medium, which can improve the efficiency of the client accessing the open platform, and can improve the problem of a single point of failure of the database of the open platform.
  • the present application provides an access instruction information acquisition method, where the access instruction information acquisition method includes the following steps:
  • the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis is determined according to the matching result. Or obtaining the access instruction information corresponding to the client identifier information by the redis; S3, if the abnormal identifier information of the redis is not found, obtaining the access instruction information corresponding to the client identifier information from the primary redis;
  • the present application further provides an electronic device including a memory and a processor connected to the memory, the processor for executing an access instruction information acquiring program stored on the memory
  • the access instruction information acquisition program is executed by the processor, the following steps are implemented:
  • the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis is determined according to the matching result. Or the redis obtains the access instruction information corresponding to the client identifier information;
  • A4. Send the obtained access instruction information to the client.
  • the present application further provides a computer readable storage medium storing an access instruction information acquiring program, the access instruction information acquiring program being executable by at least one processor, Having the at least one processor perform the following steps:
  • the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis or the secondary is determined according to the matching result. Redis obtains access instruction information corresponding to the client identifier information;
  • the access instruction information corresponding to the client identifier information is obtained from the primary redis;
  • the obtained access instruction information is sent to the client.
  • the electronic device, the access instruction information acquiring method, and the storage medium proposed by the present application first query the predetermined abnormal information after receiving the access request with the client identification information sent by the client. Whether the abnormal identifier information of the redis is stored in the storage table. If the abnormal identifier information of the redis is found, the abnormal identifier information and the first identifier information of the primary redis and the second identifier of the redis are prepared respectively.
  • the access instruction information corresponding to the client identifier information obtained from the standby redis or determining to obtain the access instruction information corresponding to the client identifier information from the primary redis;
  • the access instruction information corresponding to the client identifier information is obtained from the primary redis; and the obtained access command information is sent to the client. It can improve the efficiency of client access to the open platform, and can improve the single point of failure of the open platform database.
  • FIG. 1 is a schematic diagram of an optional hardware architecture of an electronic device proposed by the present application.
  • FIG. 2 is a schematic diagram of a program module of an access instruction information acquiring program in an embodiment of an electronic device of the present application
  • FIG. 3 is a flow chart showing an implementation of a preferred embodiment of the method for acquiring access command information in the present application.
  • the electronic device 10 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through the communication bus 14. It should be noted that FIG. 1 only shows the electronic device 10 having the components 11-14, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 11 includes at least one type of computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (for example, SD or DX memory, etc.), a random access memory (RAM), and a static memory.
  • the memory 11 may be an internal storage unit of the electronic device 10, such as a hard disk or memory of the electronic device 10.
  • the memory 11 may also be an outsourced storage device of the electronic device 10, such as a plug-in hard disk equipped on the electronic device 10, a smart memory card (SMC), and a secure digital (Secure Digital, SD) ) cards, flash cards, etc.
  • the memory 11 can also include both an internal storage unit of the electronic device 10 and an outsourced storage device thereof.
  • the memory 11 is generally used to store an operating system installed on the electronic device 10 and various types of application software, such as an access instruction information acquisition program and the like. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the electronic device 10.
  • the processor 12 is configured to run program code or processing data stored in the memory 11, such as a running access instruction information acquisition program or the like.
  • the network interface 13 may include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 10 and other electronic devices.
  • Communication bus 14 is used to implement a communication connection between components 11-13.
  • FIG. 1 shows only the electronic device 10 having the components 11-14 and the access instruction information acquisition program, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the electronic device 10 may further include a user interface (not shown in FIG. 1), and the user interface may include a display, an input unit such as a keyboard, wherein the user interface may further include a standard wired interface, a wireless interface, and the like.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED touch device, or the like. Further, the display may also be referred to as a display screen or display unit for displaying information processed in the electronic device 10 and a user interface for displaying visualizations.
  • the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis is determined according to the matching result. Or the redis obtains the access instruction information corresponding to the client identifier information;
  • the abnormality identifier information matches the first identifier information, determining to obtain the access instruction information corresponding to the client identifier information from the standby redis;
  • the access instruction information corresponding to the client identifier information is obtained from the primary redis;
  • the first Redis and the second Redis are created in advance, the first Redis created in advance is set as the primary redis, and the second Redis created in advance is the standby redis, and is monitored.
  • the data is written to the primary redis, the data is synchronously written to the standby redis.
  • the predetermined abnormality information storage table is a Threadlocal table whose initial storage state is empty, and when the access instruction acquisition program stored in the memory 11 is executed by the processor 12, the following monitoring steps are also implemented: And monitoring the primary redis and the standby redis according to a preset monitoring period; if the primary redis abnormality is detected in the first monitoring period, generating an abnormal identifier that matches the first identification information of the primary redis And storing the abnormality identification information in the abnormality information storage list; or, if the standby redis abnormality is detected in the first monitoring period, generating an abnormality identifier that matches the second identification information of the standby redis Information stores the abnormality identification information to the abnormality information storage list.
  • the monitoring step is repeatedly performed in the second monitoring period, where the second monitoring period is a monitoring period after the first monitoring period.
  • the matching of the abnormality identification information with the first identification information includes that the partial content is consistent, and all the content is consistent.
  • the client is a client, such as a web browser of the World Wide Web, an email client for receiving emails, and client software for instant messaging.
  • client software for instant messaging.
  • the client and the server communicate with each other, the login information of the client needs to be verified and generated after verification.
  • a specific communication connection can be established between the client and the server, and the login information of the client is usually matched with the identification information of the client in a predetermined database such as redis in the present application.
  • the client identification information includes a login name and a login password
  • the access instruction information is an access token
  • the access token is generally used to describe a process or a thread security context
  • the access instruction information usually includes The identifier and access privilege of the user account associated with the process or thread.
  • the obtaining the access instruction information corresponding to the client identifier information from the standby redis includes:
  • an error prompt message is sent to the client.
  • the predetermined access instruction information obtaining rule may be, for example,
  • the standby red has the access instruction information corresponding to the login name, obtaining the first validity period and the current operation time of the access instruction information;
  • the first validity period is greater than the current operation time, and the difference between the first validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid;
  • the search for the first validity period and the current operation time is less than or equal to the preset time threshold, determining that the access instruction information is invalid;
  • the access instruction information is valid, the access instruction information is obtained, and if the access instruction information is invalid, the request for generating the access instruction information corresponding to the client identification information is sent to the standby redis, and the client generated by the standby redis is obtained.
  • the access instruction information corresponding to the identification information is obtained, and if the access instruction information is invalid, the request for generating the access instruction information corresponding to the client identification information is sent to the standby redis, and the client generated by the standby redis is obtained.
  • the step of obtaining the access instruction information corresponding to the client identifier information from the primary redis includes:
  • an error prompt message is sent to the client.
  • the predetermined access instruction information obtaining rule may be, for example,
  • the main red If the main redis has the access instruction information corresponding to the login name, obtaining the second validity period and the current operation time of the access instruction information;
  • the second validity period is greater than the current operation time, and the difference between the second validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid, and if the second validity period is greater than the current operation time, And determining that the second validity period and the current operation time are less than or equal to a preset time threshold, determining that the access instruction information is invalid;
  • the access instruction information is acquired, and if it is determined that the access instruction information is invalid, the request for generating the access instruction information corresponding to the login name is sent to the main redis, and the main redis is generated.
  • the remaining validity period of the access instruction information existing in the primary redis and the standby redis is caused.
  • the first remaining validity period corresponding to the access instruction information in the primary redis may be 10 hours.
  • the second remaining validity period corresponding to the access instruction information in the redis may be 12 hours. The second remaining validity period is longer, then the second remaining validity period of the access instruction information in the redis is taken as the standard, and the second remaining validity period is synchronized to the main redis, and the first remaining validity period in the main redis is updated to be the The second remaining validity period.
  • the access instruction information usually has an expiration date, such as 24 hours. After the expiration date, the access instruction information data in the redis is automatically deleted, and there is a buffer period and a new access instruction information is generated, for example, during the validity period. The previous 15 minutes is the buffer period, which corresponds to the time threshold in this embodiment.
  • the electronic device proposed by the present application firstly queries whether a predetermined identifier information of the redis is stored in the predetermined abnormal information storage table after receiving the access request with the client identification information sent by the client. And if the abnormality identification information of the redis is found, the abnormality identification information is matched with the first identification information of the primary redis and the second identification information of the redis, and the determination result is determined according to the matching result.
  • the master redis obtains the access instruction information corresponding to the client identifier information; and finally sends the obtained access command information to the client. It can improve the efficiency of client access to the open platform, and can improve the single point of failure of the open platform database.
  • the access instruction information acquisition program of the present application may be described by using a program module having the same function according to different functions implemented by the respective parts.
  • FIG. 2 is a schematic diagram of a program module for accessing an instruction information acquisition program in an embodiment of the electronic device of the present application.
  • the access instruction information acquisition program may be divided into a query module 201, a determination module 202, an acquisition module 203, and a transmission module 204 according to different functions implemented by the respective parts.
  • the program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the access instruction information acquisition program in the electronic device 10.
  • the functions or operational steps implemented by the modules 201-204 are similar to the above, and are not described in detail herein, by way of example, for example:
  • the query module 201 is configured to query, after the access request with the client identifier information sent by the client, whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
  • the determining module 202 is configured to: if the abnormal identifier information of the redis is found, match the abnormal identifier information with the first identifier information of the primary redis and the second identifier of the redis, and determine according to the matching result. Obtaining access instruction information corresponding to the client identification information from the primary redis or the standby redis;
  • the obtaining module 203 is configured to obtain the access instruction information corresponding to the client identifier information from the main redis if the abnormal identifier information of the redis is not found;
  • the sending module 204 is configured to send the obtained access instruction information to the client. .
  • the present application further provides a method for obtaining an access instruction information.
  • the method for obtaining the access instruction information includes the following steps:
  • Step S301 after receiving the access request with the client identification information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
  • Step S302 If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the obtained redis or secondary redis is determined according to the matching result.
  • the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the predetermined primary redis and the second identifier information of the redis;
  • the abnormality identification information matches the first identification information, determining to obtain the access instruction information corresponding to the client identification information from the standby redis;
  • Step S303 if the abnormal identifier information of the redis is not found, the access instruction information corresponding to the client identifier information is obtained from the primary redis;
  • Step S304 the obtained access instruction information is sent to the client.
  • the first Redis and the second Redis are created in advance, the first Redis created in advance is set as the primary redis, and the second Redis created in advance is the standby redis, and is monitored.
  • the data is written to the primary redis, the data is synchronously written to the standby redis.
  • the predetermined abnormality information storage table is a Threadlocal table whose initial storage state is empty, and when the access instruction acquisition program stored in the memory 11 is executed by the processor 12, the following monitoring steps are also implemented: And monitoring the primary redis and the standby redis according to a preset monitoring period; if the primary redis abnormality is detected in the first monitoring period, generating an abnormal identifier that matches the first identification information of the primary redis And storing the abnormality identification information in the abnormality information storage list; or, if the standby redis abnormality is detected in the first monitoring period, generating an abnormality identifier that matches the second identification information of the standby redis Information stores the abnormality identification information to the abnormality information storage list.
  • the monitoring step is repeatedly performed in the second monitoring period, where the second monitoring period is a monitoring period after the first monitoring period.
  • the matching of the abnormality identification information with the first identification information includes that the partial content is consistent, and all the content is consistent.
  • the client is a client, such as a web browser of the World Wide Web, an email client for receiving emails, and client software for instant messaging.
  • client software for instant messaging.
  • the client and the server communicate with each other, the login information of the client needs to be verified and generated after verification.
  • a specific communication connection can be established between the client and the server, and the login information of the client is usually matched with the identification information of the client in a predetermined database such as redis in the present application.
  • the client identification information includes a login name and a login password
  • the access instruction information is an access token
  • the access token is generally used to describe a process or a thread security context
  • the access instruction information usually includes The identifier and access privilege of the user account associated with the process or thread.
  • the obtaining the access instruction information corresponding to the client identifier information from the standby redis includes:
  • an error prompt message is sent to the client.
  • the predetermined access instruction information obtaining rule may be, for example,
  • the standby red has the access instruction information corresponding to the login name, obtaining the first validity period and the current operation time of the access instruction information;
  • the first validity period is greater than the current operation time, and the difference between the first validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid;
  • the search for the first validity period and the current operation time is less than or equal to the preset time threshold, determining that the access instruction information is invalid;
  • the access instruction information is valid, the access instruction information is obtained, and if the access instruction information is invalid, the request for generating the access instruction information corresponding to the client identification information is sent to the standby redis, and the client generated by the standby redis is obtained.
  • the access instruction information corresponding to the identification information is obtained, and if the access instruction information is invalid, the request for generating the access instruction information corresponding to the client identification information is sent to the standby redis, and the client generated by the standby redis is obtained.
  • the step of obtaining the access instruction information corresponding to the client identifier information from the primary redis includes:
  • an error prompt message is sent to the client.
  • the predetermined access instruction information obtaining rule may be, for example,
  • the main red If the main redis has the access instruction information corresponding to the login name, obtaining the second validity period and the current operation time of the access instruction information;
  • the second validity period is greater than the current operation time, and the difference between the second validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid, and if the second validity period is greater than the current operation time, And determining that the second validity period and the current operation time are less than or equal to a preset time threshold, determining that the access instruction information is invalid;
  • the access instruction information is acquired, and if it is determined that the access instruction information is invalid, the request for generating the access instruction information corresponding to the login name is sent to the main redis, and the main redis is generated.
  • the access instruction information existing in the primary redis and the standby redis may be different.
  • the remaining validity period may be inconsistent.
  • the first remaining validity period corresponding to the access instruction information in the primary redis may be 10 hours
  • the second remaining validity period corresponding to the access instruction information in the standby redis may be 12 hours. If the second remaining validity period corresponding to the instruction information is longer, the second remaining validity period of the access instruction information in the redis is taken as the standard, and the second remaining validity period is synchronized to the main redis, and the first remaining in the main redis is updated.
  • the validity period is the second remaining validity period.
  • the access instruction information usually has an expiration date, such as 24 hours. After the expiration date, the access instruction information data in the redis is automatically deleted, and there is a buffer period and a new access instruction information is generated, for example, during the validity period. The previous 15 minutes is the buffer period, which corresponds to the time threshold in this embodiment.
  • the method for obtaining the access instruction information proposed by the present application firstly queries whether a redis is stored in the predetermined abnormal information storage table after receiving the access request with the client identification information sent by the client. If the abnormality identification information of the redis is found, the abnormality identification information is matched with the first identification information of the primary redis and the second identification information of the redis, respectively, according to the matching result.
  • the information is obtained from the main redis to obtain the access instruction information corresponding to the client identification information; and finally, the obtained access instruction information is sent to the client. It can improve the efficiency of client access to the open platform, and can improve the single point of failure of the open platform database.
  • the present application further provides a computer readable storage medium having stored thereon an access instruction information acquiring program, and when the access instruction information acquiring program is executed by the processor, the following operations are implemented:
  • the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis;
  • the abnormality identification information matches the first identification information, determining that the access instruction information corresponding to the client identification information is obtained from the standby redis;
  • the access instruction information corresponding to the client identifier information is obtained from the primary redis;
  • the obtained access instruction information is sent to the client.
  • the specific embodiment of the computer readable storage medium of the present application is substantially the same as the foregoing embodiments of the electronic device and the access instruction information obtaining method, and is not described herein.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Abstract

An electronic device (10), an access instruction information acquisition method and a storage medium, wherein the method comprises: querying whether abnormal identification information of Redis is stored in a predetermined abnormal information storage list after receiving an access request that carries client identification information and that is sent from a client (S301); if abnormal identification information of Redis is found, then matching the abnormal identification information with first identification information of a main Redis and second identification information of a standby Redis respectively, and according to the matching result, determining access instruction information corresponding to the client identification information acquired from the main Redis or standby Redis (S302); if abnormal identification information of Redis is not found, then acquiring access instruction information corresponding to the client identification information acquired from the main Redis (S303); transmitting the acquired access instruction information to the client (S304). According to the described method, it is possible to increase the efficiency with which a client accesses an open platform, and the problem of a single point of failure of a database of an open platform may be ameliorated.

Description

电子装置、访问指令信息获取方法及存储介质Electronic device, access instruction information acquisition method, and storage medium
本申请要求于2018年03月06日提交中国专利局、申请号为201810183149.6、发明名称为“电子装置、访问指令信息获取方法及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。The present application claims priority to Chinese Patent Application No. 201101183149.6, entitled "Electronic Device, Access Instruction Information Acquisition Method, and Storage Medium", which is filed on March 06, 2018, the entire contents of which are incorporated by reference. In the application.
技术领域Technical field
本申请涉及计算机领域,尤其涉及一种电子装置、访问指令信息获取方法及存储介质。The present application relates to the field of computers, and in particular, to an electronic device, an access instruction information acquiring method, and a storage medium.
背景技术Background technique
Redis是一个高性能的内存数据库,开放平台通常利用Redis来存储及生成一些访问比较频繁的数据,比如存储客户端(CLIENT)的登录验证信息,以及存储访问指令信息(ACESS_TOKEN)或者生成访问指令信息等。由于客户端的登录验证信息以及访问指令信息的读写调用量在一定的时间段内可能达到上亿级别,因此,即使是高性能的Redis也可能会出现宕机的风险。而Redis一旦出现宕机,则存在单点故障的风险,将导致客户端访问整个开放平台的效率低下,严重影响用户的使用效果。Redis is a high-performance in-memory database. Open platforms usually use Redis to store and generate some frequently accessed data, such as storage client (CLIENT) login authentication information, and storage access instruction information (ACESS_TOKEN) or generate access command information. Wait. Since the client's login authentication information and the amount of read and write calls to the access command information may reach hundreds of millions of dollars in a certain period of time, even high-performance Redis may be at risk of downtime. In the event of a downtime in Redis, there is a risk of a single point of failure, which will result in inefficient access by the client to the entire open platform, seriously affecting the user's use.
发明内容Summary of the invention
有鉴于此,本申请提出一种电子装置、访问指令信息获取方法及存储介质,能够提高客户端访问开放平台的效率,且能够改善开放平台的数据库单点故障的问题。In view of this, the present application provides an electronic device, an access instruction information acquisition method, and a storage medium, which can improve the efficiency of the client accessing the open platform, and can improve the problem of a single point of failure of the database of the open platform.
首先,为实现上述目的,本申请提出一种访问指令信息获取方法,所述访问指令信息获取方法包括如下步骤:First, in order to achieve the above object, the present application provides an access instruction information acquisition method, where the access instruction information acquisition method includes the following steps:
S1、接收到客户端发送的带有客户端标识信息的访问请求后,查询预先 确定的异常信息存储表中是否存储有redis的异常标识信息;S1. After receiving the access request with the client identifier information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
S2、若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从主redis或备redis获取客户端标识信息对应的访问指令信息;S3、若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;S2. If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis is determined according to the matching result. Or obtaining the access instruction information corresponding to the client identifier information by the redis; S3, if the abnormal identifier information of the redis is not found, obtaining the access instruction information corresponding to the client identifier information from the primary redis;
S4、将获取的访问指令信息发送至该客户端。S4. Send the obtained access instruction information to the client.
此外,为实现上述目的,本申请还提供一种电子装置,所述电子装置包括存储器、及与所述存储器连接的处理器,所述处理器用于执行所述存储器上存储的访问指令信息获取程序,所述访问指令信息获取程序被所述处理器执行时实现如下步骤:In addition, in order to achieve the above object, the present application further provides an electronic device including a memory and a processor connected to the memory, the processor for executing an access instruction information acquiring program stored on the memory When the access instruction information acquisition program is executed by the processor, the following steps are implemented:
A1、接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;A1. After receiving the access request with the client identifier information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
A2、若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从主redis或备redis获取客户端标识信息对应的访问指令信息;A2. If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis is determined according to the matching result. Or the redis obtains the access instruction information corresponding to the client identifier information;
A3、若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;A3. If the abnormal identifier information of the redis is not found, obtain the access instruction information corresponding to the client identifier information from the primary redis;
A4、将获取的访问指令信息发送至该客户端。A4. Send the obtained access instruction information to the client.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有访问指令信息获取程序,所述访问指令信息获取程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:In addition, in order to achieve the above object, the present application further provides a computer readable storage medium storing an access instruction information acquiring program, the access instruction information acquiring program being executable by at least one processor, Having the at least one processor perform the following steps:
接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;After receiving the access request with the client identifier information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配 结果确定从主redis或备redis获取客户端标识信息对应的访问指令信息;If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis or the secondary is determined according to the matching result. Redis obtains access instruction information corresponding to the client identifier information;
若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;If the abnormal identifier information of the redis is not found, the access instruction information corresponding to the client identifier information is obtained from the primary redis;
将获取的访问指令信息发送至该客户端。The obtained access instruction information is sent to the client.
相较于现有技术,本申请所提出的电子装置、访问指令信息获取方法及存储介质,首先通过在接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;其次若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从所述备redis中获取所述客户端标识信息对应的访问指令信息,或者确定从所述主redis中获取所述客户端标识信息对应的访问指令信息;若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;最后将获取的访问指令信息发送至该客户端。能够提高客户端访问开放平台的效率,且能够改善开放平台的数据库单点故障的问题。Compared with the prior art, the electronic device, the access instruction information acquiring method, and the storage medium proposed by the present application first query the predetermined abnormal information after receiving the access request with the client identification information sent by the client. Whether the abnormal identifier information of the redis is stored in the storage table. If the abnormal identifier information of the redis is found, the abnormal identifier information and the first identifier information of the primary redis and the second identifier of the redis are prepared respectively. Performing matching, and determining, according to the matching result, the access instruction information corresponding to the client identifier information obtained from the standby redis, or determining to obtain the access instruction information corresponding to the client identifier information from the primary redis; The access instruction information corresponding to the client identifier information is obtained from the primary redis; and the obtained access command information is sent to the client. It can improve the efficiency of client access to the open platform, and can improve the single point of failure of the open platform database.
附图说明DRAWINGS
图1是本申请提出的电子装置一可选的硬件架构的示意图;1 is a schematic diagram of an optional hardware architecture of an electronic device proposed by the present application;
图2是本申请电子装置一实施例中访问指令信息获取程序的程序模块示意图;2 is a schematic diagram of a program module of an access instruction information acquiring program in an embodiment of an electronic device of the present application;
图3是本申请访问指令信息获取方法较佳实施例的实施流程图。3 is a flow chart showing an implementation of a preferred embodiment of the method for acquiring access command information in the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施 例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions of "first", "second" and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. . Thus, features defining "first" or "second" may include at least one of the features, either explicitly or implicitly. In addition, the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. Nor is it within the scope of protection required by this application.
参阅图1所示,是本申请提出的电子装置一可选的硬件架构示意图。本实施例中,电子装置10可包括,但不仅限于,可通过通信总线14相互通信连接存储器11、处理器12、网络接口13。需要指出的是,图1仅示出了具有组件11-14的电子装置10,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Referring to FIG. 1 , it is an optional hardware architecture diagram of the electronic device proposed by the present application. In this embodiment, the electronic device 10 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through the communication bus 14. It should be noted that FIG. 1 only shows the electronic device 10 having the components 11-14, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
其中,存储器11至少包括一种类型的计算机可读存储介质,计算机可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器11可以是电子装置10的内部存储单元,例如电子装置10的硬盘或内存。在另一些实施例中,存储器11也可以是电子装置10的外包存储设备,例如电子装置10上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器11还可以既包括电子装置10的内部存储单元也包括其外包存储设备。本实施例中,存储器11通常用于存储安装于电子装置10的操作系统和各类应用软件,例如访问指令 信息获取程序等。此外,存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 11 includes at least one type of computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (for example, SD or DX memory, etc.), a random access memory (RAM), and a static memory. Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 10, such as a hard disk or memory of the electronic device 10. In other embodiments, the memory 11 may also be an outsourced storage device of the electronic device 10, such as a plug-in hard disk equipped on the electronic device 10, a smart memory card (SMC), and a secure digital (Secure Digital, SD) ) cards, flash cards, etc. Of course, the memory 11 can also include both an internal storage unit of the electronic device 10 and an outsourced storage device thereof. In this embodiment, the memory 11 is generally used to store an operating system installed on the electronic device 10 and various types of application software, such as an access instruction information acquisition program and the like. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。处理器12通常用于控制电子装置10的总体操作。本实施例中,处理器12用于运行存储器11中存储的程序代码或者处理数据,例如运行的访问指令信息获取程序等。 Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 12 is typically used to control the overall operation of the electronic device 10. In this embodiment, the processor 12 is configured to run program code or processing data stored in the memory 11, such as a running access instruction information acquisition program or the like.
网络接口13可包括无线网络接口或有线网络接口,网络接口13通常用于在电子装置10与其他电子设备之间建立通信连接。The network interface 13 may include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 10 and other electronic devices.
通信总线14用于实现组件11-13之间的通信连接。 Communication bus 14 is used to implement a communication connection between components 11-13.
图1仅示出了具有组件11-14以及访问指令信息获取程序的电子装置10,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。1 shows only the electronic device 10 having the components 11-14 and the access instruction information acquisition program, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
可选地,电子装置10还可以包括用户接口(图1中未示出),用户接口可以包括显示器、输入单元比如键盘,其中,用户接口还可以包括标准的有线接口、无线接口等。Optionally, the electronic device 10 may further include a user interface (not shown in FIG. 1), and the user interface may include a display, an input unit such as a keyboard, wherein the user interface may further include a standard wired interface, a wireless interface, and the like.
可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED触摸器等。进一步地,显示器也可称为显示屏或显示单元,用于显示在电子装置10中处理信息以及用于显示可视化的用户界面。Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED touch device, or the like. Further, the display may also be referred to as a display screen or display unit for displaying information processed in the electronic device 10 and a user interface for displaying visualizations.
在一实施例中,存储器11中存储的访问指令信息获取程序被处理器12执行时,实现如下操作:In an embodiment, when the access instruction information acquisition program stored in the memory 11 is executed by the processor 12, the following operations are implemented:
A、接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;A. After receiving the access request with the client identifier information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
B、若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从主redis或备redis获取客户端标识信息对应的访问指令信息;B. If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis is determined according to the matching result. Or the redis obtains the access instruction information corresponding to the client identifier information;
具体地,在本实施例中,若所述异常标识信息与所述第一标识信息相匹配,则确定从所述备redis中获取所述客户端标识信息对应的访问指令信息;Specifically, in this embodiment, if the abnormality identifier information matches the first identifier information, determining to obtain the access instruction information corresponding to the client identifier information from the standby redis;
或者,若所述异常标识信息与所述第二标识信息相匹配,则确定从所述主redis中获取所述客户端标识信息对应的访问指令信息;Or, if the abnormality identifier information matches the second identifier information, determining to obtain the access instruction information corresponding to the client identifier information from the primary redis;
C、若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;C. If the abnormal identifier information of the redis is not found, the access instruction information corresponding to the client identifier information is obtained from the primary redis;
D、将获取的访问指令信息发送至该客户端。D. Send the obtained access instruction information to the client.
需要说明的是,在本申请的各个实施例中,预先创建第一Redis和第二Redis,设置预先创建的第一Redis为主redis,预先创建的第二Redis为备redis,并在监测到有数据写入所述主redis时,将该数据同步写入所述备redis。It should be noted that, in various embodiments of the present application, the first Redis and the second Redis are created in advance, the first Redis created in advance is set as the primary redis, and the second Redis created in advance is the standby redis, and is monitored. When data is written to the primary redis, the data is synchronously written to the standby redis.
在本实施例中,所述预先确定的异常信息存储表为预先建立的初始存储状态为空的Threadlocal表,存储器11中存储的访问指令获取程序被处理器12执行时,还实现如下监测步骤:根据预设的监测周期,监测所述主redis及所述备redis;若在第一监测周期内监测到所述主redis异常,则生成与所述主redis的第一标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表;或者,若在第一监测周期内监测到所述备redis异常,则生成与所述备redis的第二标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表。In this embodiment, the predetermined abnormality information storage table is a Threadlocal table whose initial storage state is empty, and when the access instruction acquisition program stored in the memory 11 is executed by the processor 12, the following monitoring steps are also implemented: And monitoring the primary redis and the standby redis according to a preset monitoring period; if the primary redis abnormality is detected in the first monitoring period, generating an abnormal identifier that matches the first identification information of the primary redis And storing the abnormality identification information in the abnormality information storage list; or, if the standby redis abnormality is detected in the first monitoring period, generating an abnormality identifier that matches the second identification information of the standby redis Information stores the abnormality identification information to the abnormality information storage list.
进一步地,若在第一监测周期内没有监测到所述主redis异常,则在第二监测周期内重复执行上述监测步骤,所述第二监测周期为所述第一监测周期之后的监测周期。Further, if the main redis abnormality is not detected in the first monitoring period, the monitoring step is repeatedly performed in the second monitoring period, where the second monitoring period is a monitoring period after the first monitoring period.
在本实施例中,所述异常标识信息与所述第一标识信息相匹配包括部分内容对应一致,也包括全部内容对应一致。In this embodiment, the matching of the abnormality identification information with the first identification information includes that the partial content is consistent, and all the content is consistent.
在一实施例中,所述客户端为client,如万维网的网页浏览器,收寄电子邮件时的电子邮件客户端,以及即时通讯的客户端软件等。对于这一类的应用程序,需要网络中有相应的服务器以及服务程序来提供相应的服务,而在 客户端与服务器端进行通信连接之前,需要对客户端的登录信息进行验证,并通过验证之后生成给客户端对应的访问指令信息之后,才能在客户端和服务器端建立特定的通信连接,而通常将客户端的登录信息与预先确定的数据库如本申请中的redis,中的客户端的标识信息进行匹配之后,根据匹配结果在所述预先确定的数据库中查询或者生成对应的访问指令信息,这样客户端和服务器端,才能建立特定的通信连接,来保证应用程序的正常运行。在本实施例中,例如,客户端标识信息包括登录名及登录密码,访问指令信息为访问令牌,所述访问令牌通常用来描述一个进程或者是线程的安全上下文,访问指令信息通常包含与该进程或者线程相关的用户帐户的标识符identity和访问特权,若客户端需要登陆服务端,则需要输入登录名及与输入的登录名对应的登录密码,并在预先确定的数据库中,本实施例为主redis及备redis中,查找该登录名对应的登录密码是否与输入的相匹配,若相匹配,则该客户端的登录通过验证,在通过验证之后系统会生成一个与登录信息对应的访问指令信息,也即访问令牌,该访问令牌也会存储在预先确定的数据库,如redis。In an embodiment, the client is a client, such as a web browser of the World Wide Web, an email client for receiving emails, and client software for instant messaging. For this type of application, there is a corresponding server and service program in the network to provide the corresponding service. Before the client and the server communicate with each other, the login information of the client needs to be verified and generated after verification. After the access instruction information corresponding to the client is used, a specific communication connection can be established between the client and the server, and the login information of the client is usually matched with the identification information of the client in a predetermined database such as redis in the present application. Then, according to the matching result, the corresponding access instruction information is queried or generated in the predetermined database, so that the client and the server can establish a specific communication connection to ensure the normal operation of the application. In this embodiment, for example, the client identification information includes a login name and a login password, and the access instruction information is an access token, and the access token is generally used to describe a process or a thread security context, and the access instruction information usually includes The identifier and access privilege of the user account associated with the process or thread. If the client needs to log in to the server, the login name and the login password corresponding to the entered login name are required, and in a predetermined database, In the embodiment, the redis and the standby redis find that the login password corresponding to the login name matches the input. If the matching is matched, the login of the client is verified, and after the verification, the system generates a login corresponding to the login information. The access instruction information, that is, the access token, is also stored in a predetermined database, such as redis.
所述从所述备redis中获取所述客户端标识信息对应的访问指令信息包括:The obtaining the access instruction information corresponding to the client identifier information from the standby redis includes:
基于所述登录名及所述登录密码遍历所述备redis,若在所述备redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the standby redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the standby redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
或者,若在所述备redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the standby redis, an error prompt message is sent to the client.
在本实施例中,所述预先确定的访问指令信息获取规则可以是,例如,In this embodiment, the predetermined access instruction information obtaining rule may be, for example,
查询所述备redis中是否有所述登录名对应的访问指令信息;Querying, in the standby redis, whether the access instruction information corresponding to the login name is included;
若所述备redis中有所述登录名对应的访问指令信息,则获取该访问指令信息的第一有效期及当前操作时间;And if the standby redis has the access instruction information corresponding to the login name, obtaining the first validity period and the current operation time of the access instruction information;
若所述第一有效期大于当前操作时间,且所述第一有效期与当前操作时间的差值大于预设的时间阈值,则确定该访问指令信息有效;If the first validity period is greater than the current operation time, and the difference between the first validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid;
若所述第一有效期大于当前操作时间,且所述第一有效期与当前操作时间的查找小于或等于预设的时间阈值,则确定该访问指令信息无效;If the first validity period is greater than the current operation time, and the search for the first validity period and the current operation time is less than or equal to the preset time threshold, determining that the access instruction information is invalid;
若访问指令信息有效,则获取该访问指令信息,若访问指令信息无效,则向所述备redis发送生成该客户端标识信息对应的访问指令信息的请求,获取所述备redis生成的该客户端标识信息对应的访问指令信息。If the access instruction information is valid, the access instruction information is obtained, and if the access instruction information is invalid, the request for generating the access instruction information corresponding to the client identification information is sent to the standby redis, and the client generated by the standby redis is obtained. The access instruction information corresponding to the identification information.
所述从所述主redis中获取所述客户端标识信息对应的访问指令信息的步骤包括:The step of obtaining the access instruction information corresponding to the client identifier information from the primary redis includes:
基于所述登录名及所述登录密码遍历所述主redis,若在所述主redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the primary redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the primary redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
或者,若在所述主redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the primary redis, an error prompt message is sent to the client.
在本实施例中,所述预先确定的访问指令信息获取规则可以是,例如,In this embodiment, the predetermined access instruction information obtaining rule may be, for example,
查询所述主redis中是否有所述登录名对应的访问指令信息;Querying, in the main redis, whether there is access instruction information corresponding to the login name;
若所述主redis中有所述登录名对应的访问指令信息,则获取该访问指令信息的第二有效期及当前操作时间;If the main redis has the access instruction information corresponding to the login name, obtaining the second validity period and the current operation time of the access instruction information;
若所述第二有效期大于当前操作时间,且所述第二有效期与当前操作时间的差值大于预设的时间阈值,则确定该访问指令信息有效,若所述第二有效期大于当前操作时间,且所述第二有效期与当前操作时间的查找小于或等于预设的时间阈值,则确定该访问指令信息无效;If the second validity period is greater than the current operation time, and the difference between the second validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid, and if the second validity period is greater than the current operation time, And determining that the second validity period and the current operation time are less than or equal to a preset time threshold, determining that the access instruction information is invalid;
若确定该访问指令信息有效,则获取该访问指令信息,若确定该访问指令信息无效,则向所述主redis发送生成所述登录名对应的访问指令信息的请求,获取所述主redis生成的所述登录名对应的访问指令信息;If it is determined that the access instruction information is valid, the access instruction information is acquired, and if it is determined that the access instruction information is invalid, the request for generating the access instruction information corresponding to the login name is sent to the main redis, and the main redis is generated. Access command information corresponding to the login name;
向所述主redis发送生成所述登录名对应的访问指令信息的请求,获取所 述主redis生成的该客户端标识信息对应的访问指令信息。Sending a request for generating access command information corresponding to the login name to the primary redis, and acquiring access command information corresponding to the client identifier information generated by the primary redis.
在一实施例中,由于主redis、备redis通常会在不同的时间出现宕机,且宕机之后恢复正常所需的时间不同,导致主redis和备redis中的存在的访问指令信息的剩余有效期可能会不一致,例如主redis中访问指令信息对应的第一剩余有效期可能是10小时,备redis中的访问指令信息对应的第二剩余有效期可能是12小时,此时备redis中的访问指令信息对应的第二剩余有效期更长,那就以备redis中的访问指令信息的第二剩余有效期为准,并将该第二剩余有效期同步到主redis中,更新主redis中的第一剩余有效期为该第二剩余有效期。In an embodiment, since the main redis and the standby redis usually have a downtime at different times, and the time required for the normal recovery to be normal after the downtime is different, the remaining validity period of the access instruction information existing in the primary redis and the standby redis is caused. The first remaining validity period corresponding to the access instruction information in the primary redis may be 10 hours. The second remaining validity period corresponding to the access instruction information in the redis may be 12 hours. The second remaining validity period is longer, then the second remaining validity period of the access instruction information in the redis is taken as the standard, and the second remaining validity period is synchronized to the main redis, and the first remaining validity period in the main redis is updated to be the The second remaining validity period.
需要说明的是,访问指令信息通常具有一个有效期,比如24小时,有效期到之后,redis中的访问指令信息数据会自动删除,同时会有一个缓冲期并生成新的访问指令信息,比如在有效期到之前15分钟为缓冲期,该缓冲期对应本实施例中的时间阈值。It should be noted that the access instruction information usually has an expiration date, such as 24 hours. After the expiration date, the access instruction information data in the redis is automatically deleted, and there is a buffer period and a new access instruction information is generated, for example, during the validity period. The previous 15 minutes is the buffer period, which corresponds to the time threshold in this embodiment.
由上述事实施例可知,本申请提出的电子装置首先通过在接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;其次若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从所述备redis中获取所述客户端标识信息对应的访问指令信息,或者确定从所述主redis中获取所述客户端标识信息对应的访问指令信息;若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;最后将获取的访问指令信息发送至该客户端。能够提高客户端访问开放平台的效率,且能够改善开放平台的数据库单点故障的问题。It can be seen from the above embodiments that the electronic device proposed by the present application firstly queries whether a predetermined identifier information of the redis is stored in the predetermined abnormal information storage table after receiving the access request with the client identification information sent by the client. And if the abnormality identification information of the redis is found, the abnormality identification information is matched with the first identification information of the primary redis and the second identification information of the redis, and the determination result is determined according to the matching result. Obtaining the access instruction information corresponding to the client identifier information in the redis or obtaining the access instruction information corresponding to the client identifier information from the primary redis; if the abnormal identifier information of the redis is not found, the slave The master redis obtains the access instruction information corresponding to the client identifier information; and finally sends the obtained access command information to the client. It can improve the efficiency of client access to the open platform, and can improve the single point of failure of the open platform database.
进一步需要说明的是,本申请的访问指令信息获取程序依据其各部分所实现的功能不同,可用具有相同功能的程序模块进行描述。请参阅图2所示,是本申请电子装置一实施例中访问指令信息获取程序的程序模块示意图。本 实施例中,访问指令信息获取程序依据其各部分所实现的功能的不同,可以被分割成查询模块201、确定模块202、获取模块203、以及发送模块204。由上面的描述可知,本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述访问指令信息获取程序在电子装置10中的执行过程。所述模块201-204所实现的功能或操作步骤均与上文类似,此处不再详述,示例性地,例如其中:It should be further noted that the access instruction information acquisition program of the present application may be described by using a program module having the same function according to different functions implemented by the respective parts. Please refer to FIG. 2, which is a schematic diagram of a program module for accessing an instruction information acquisition program in an embodiment of the electronic device of the present application. In this embodiment, the access instruction information acquisition program may be divided into a query module 201, a determination module 202, an acquisition module 203, and a transmission module 204 according to different functions implemented by the respective parts. As can be seen from the above description, the program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the access instruction information acquisition program in the electronic device 10. The functions or operational steps implemented by the modules 201-204 are similar to the above, and are not described in detail herein, by way of example, for example:
查询模块201用于在接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;The query module 201 is configured to query, after the access request with the client identifier information sent by the client, whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
确定模块202用于若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从主redis或备redis获取客户端标识信息对应的访问指令信息;The determining module 202 is configured to: if the abnormal identifier information of the redis is found, match the abnormal identifier information with the first identifier information of the primary redis and the second identifier of the redis, and determine according to the matching result. Obtaining access instruction information corresponding to the client identification information from the primary redis or the standby redis;
获取模块203用于若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;The obtaining module 203 is configured to obtain the access instruction information corresponding to the client identifier information from the main redis if the abnormal identifier information of the redis is not found;
发送模块204用于将获取的访问指令信息发送至该客户端。。The sending module 204 is configured to send the obtained access instruction information to the client. .
此外,本申请还提出一种访问指令信息获取方法,请参阅图3所示,所述访问指令信息获取方法包括如下步骤:In addition, the present application further provides a method for obtaining an access instruction information. Referring to FIG. 3, the method for obtaining the access instruction information includes the following steps:
步骤S301,接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;Step S301, after receiving the access request with the client identification information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
步骤S302,若查询到有redis的异常标识信息,则分别将异常标识信息与主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从主redis或备redis获取所述客户端标识信息对应的访问指令信息;Step S302: If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the obtained redis or secondary redis is determined according to the matching result. The access instruction information corresponding to the client identifier information;
具体地,在本实施例中,若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配;Specifically, in this embodiment, if the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the predetermined primary redis and the second identifier information of the redis;
若所述异常标识信息与所述第一标识信息相匹配,则确定从所述备redis 中获取所述客户端标识信息对应的访问指令信息;If the abnormality identification information matches the first identification information, determining to obtain the access instruction information corresponding to the client identification information from the standby redis;
或者,若所述异常标识信息与所述第二标识信息相匹配,则确定从所述主redis中获取所述客户端标识信息对应的访问指令信息;Or, if the abnormality identifier information matches the second identifier information, determining to obtain the access instruction information corresponding to the client identifier information from the primary redis;
步骤S303,若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;Step S303, if the abnormal identifier information of the redis is not found, the access instruction information corresponding to the client identifier information is obtained from the primary redis;
步骤S304,将获取的访问指令信息发送至该客户端。Step S304, the obtained access instruction information is sent to the client.
需要说明的是,在本申请的各个实施例中,预先创建第一Redis和第二Redis,设置预先创建的第一Redis为主redis,预先创建的第二Redis为备redis,并在监测到有数据写入所述主redis时,将该数据同步写入所述备redis。It should be noted that, in various embodiments of the present application, the first Redis and the second Redis are created in advance, the first Redis created in advance is set as the primary redis, and the second Redis created in advance is the standby redis, and is monitored. When data is written to the primary redis, the data is synchronously written to the standby redis.
在本实施例中,所述预先确定的异常信息存储表为预先建立的初始存储状态为空的Threadlocal表,存储器11中存储的访问指令获取程序被处理器12执行时,还实现如下监测步骤:根据预设的监测周期,监测所述主redis及所述备redis;若在第一监测周期内监测到所述主redis异常,则生成与所述主redis的第一标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表;或者,若在第一监测周期内监测到所述备redis异常,则生成与所述备redis的第二标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表。In this embodiment, the predetermined abnormality information storage table is a Threadlocal table whose initial storage state is empty, and when the access instruction acquisition program stored in the memory 11 is executed by the processor 12, the following monitoring steps are also implemented: And monitoring the primary redis and the standby redis according to a preset monitoring period; if the primary redis abnormality is detected in the first monitoring period, generating an abnormal identifier that matches the first identification information of the primary redis And storing the abnormality identification information in the abnormality information storage list; or, if the standby redis abnormality is detected in the first monitoring period, generating an abnormality identifier that matches the second identification information of the standby redis Information stores the abnormality identification information to the abnormality information storage list.
进一步地,若在第一监测周期内没有监测到所述主redis异常,则在第二监测周期内重复执行上述监测步骤,所述第二监测周期为所述第一监测周期之后的监测周期。Further, if the main redis abnormality is not detected in the first monitoring period, the monitoring step is repeatedly performed in the second monitoring period, where the second monitoring period is a monitoring period after the first monitoring period.
在本实施例中,所述异常标识信息与所述第一标识信息相匹配包括部分内容对应一致,也包括全部内容对应一致。In this embodiment, the matching of the abnormality identification information with the first identification information includes that the partial content is consistent, and all the content is consistent.
在一实施例中,所述客户端为client,如万维网的网页浏览器,收寄电子邮件时的电子邮件客户端,以及即时通讯的客户端软件等。对于这一类的应用程序,需要网络中有相应的服务器以及服务程序来提供相应的服务,而在客户端与服务器端进行通信连接之前,需要对客户端的登录信息进行验证, 并通过验证之后生成给客户端对应的访问指令信息之后,才能在客户端和服务器端建立特定的通信连接,而通常将客户端的登录信息与预先确定的数据库如本申请中的redis,中的客户端的标识信息进行匹配之后,根据匹配结果在所述预先确定的数据库中查询或者生成对应的访问指令信息,这样客户端和服务器端,才能建立特定的通信连接,来保证应用程序的正常运行。在本实施例中,例如,客户端标识信息包括登录名及登录密码,访问指令信息为访问令牌,所述访问令牌通常用来描述一个进程或者是线程的安全上下文,访问指令信息通常包含与该进程或者线程相关的用户帐户的标识符identity和访问特权,若客户端需要登陆服务端,则需要输入登录名及与输入的登录名对应的登录密码,并在预先确定的数据库中,本实施例为主redis及备redis中,查找该登录名对应的登录密码是否与输入的相匹配,若相匹配,则该客户端的登录通过验证,在通过验证之后系统会生成一个与登录信息对应的访问指令信息,也即访问令牌,该访问令牌也会存储在预先确定的数据库,如redis。In an embodiment, the client is a client, such as a web browser of the World Wide Web, an email client for receiving emails, and client software for instant messaging. For this type of application, there is a corresponding server and service program in the network to provide the corresponding service. Before the client and the server communicate with each other, the login information of the client needs to be verified and generated after verification. After the access instruction information corresponding to the client is used, a specific communication connection can be established between the client and the server, and the login information of the client is usually matched with the identification information of the client in a predetermined database such as redis in the present application. Then, according to the matching result, the corresponding access instruction information is queried or generated in the predetermined database, so that the client and the server can establish a specific communication connection to ensure the normal operation of the application. In this embodiment, for example, the client identification information includes a login name and a login password, and the access instruction information is an access token, and the access token is generally used to describe a process or a thread security context, and the access instruction information usually includes The identifier and access privilege of the user account associated with the process or thread. If the client needs to log in to the server, the login name and the login password corresponding to the entered login name are required, and in a predetermined database, In the embodiment, the redis and the standby redis find that the login password corresponding to the login name matches the input. If the matching is matched, the login of the client is verified, and after the verification, the system generates a login corresponding to the login information. The access instruction information, that is, the access token, is also stored in a predetermined database, such as redis.
所述从所述备redis中获取所述客户端标识信息对应的访问指令信息包括:The obtaining the access instruction information corresponding to the client identifier information from the standby redis includes:
基于所述登录名及所述登录密码遍历所述备redis,若在所述备redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the standby redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the standby redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
或者,若在所述备redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the standby redis, an error prompt message is sent to the client.
在本实施例中,所述预先确定的访问指令信息获取规则可以是,例如,In this embodiment, the predetermined access instruction information obtaining rule may be, for example,
查询所述备redis中是否有所述登录名对应的访问指令信息;Querying, in the standby redis, whether the access instruction information corresponding to the login name is included;
若所述备redis中有所述登录名对应的访问指令信息,则获取该访问指令信息的第一有效期及当前操作时间;And if the standby redis has the access instruction information corresponding to the login name, obtaining the first validity period and the current operation time of the access instruction information;
若所述第一有效期大于当前操作时间,且所述第一有效期与当前操作时 间的差值大于预设的时间阈值,则确定该访问指令信息有效;If the first validity period is greater than the current operation time, and the difference between the first validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid;
若所述第一有效期大于当前操作时间,且所述第一有效期与当前操作时间的查找小于或等于预设的时间阈值,则确定该访问指令信息无效;If the first validity period is greater than the current operation time, and the search for the first validity period and the current operation time is less than or equal to the preset time threshold, determining that the access instruction information is invalid;
若访问指令信息有效,则获取该访问指令信息,若访问指令信息无效,则向所述备redis发送生成该客户端标识信息对应的访问指令信息的请求,获取所述备redis生成的该客户端标识信息对应的访问指令信息。If the access instruction information is valid, the access instruction information is obtained, and if the access instruction information is invalid, the request for generating the access instruction information corresponding to the client identification information is sent to the standby redis, and the client generated by the standby redis is obtained. The access instruction information corresponding to the identification information.
所述从所述主redis中获取所述客户端标识信息对应的访问指令信息的步骤包括:The step of obtaining the access instruction information corresponding to the client identifier information from the primary redis includes:
基于所述登录名及所述登录密码遍历所述主redis,若在所述主redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the primary redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the primary redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
或者,若在所述主redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the primary redis, an error prompt message is sent to the client.
在本实施例中,所述预先确定的访问指令信息获取规则可以是,例如,In this embodiment, the predetermined access instruction information obtaining rule may be, for example,
查询所述主redis中是否有所述登录名对应的访问指令信息;Querying, in the main redis, whether there is access instruction information corresponding to the login name;
若所述主redis中有所述登录名对应的访问指令信息,则获取该访问指令信息的第二有效期及当前操作时间;If the main redis has the access instruction information corresponding to the login name, obtaining the second validity period and the current operation time of the access instruction information;
若所述第二有效期大于当前操作时间,且所述第二有效期与当前操作时间的差值大于预设的时间阈值,则确定该访问指令信息有效,若所述第二有效期大于当前操作时间,且所述第二有效期与当前操作时间的查找小于或等于预设的时间阈值,则确定该访问指令信息无效;If the second validity period is greater than the current operation time, and the difference between the second validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid, and if the second validity period is greater than the current operation time, And determining that the second validity period and the current operation time are less than or equal to a preset time threshold, determining that the access instruction information is invalid;
若确定该访问指令信息有效,则获取该访问指令信息,若确定该访问指令信息无效,则向所述主redis发送生成所述登录名对应的访问指令信息的请求,获取所述主redis生成的所述登录名对应的访问指令信息;If it is determined that the access instruction information is valid, the access instruction information is acquired, and if it is determined that the access instruction information is invalid, the request for generating the access instruction information corresponding to the login name is sent to the main redis, and the main redis is generated. Access command information corresponding to the login name;
向所述主redis发送生成所述登录名对应的访问指令信息的请求,获取所述主redis生成的该客户端标识信息对应的访问指令信息。Sending, by the primary redis, a request for generating access command information corresponding to the login name, and acquiring access command information corresponding to the client identifier information generated by the primary redis.
在一实施例中,由于主redis、备redis通常会在不同的时间出现宕机,且出现宕机之后恢复正常运行所需的时间可能不同,导致主redis和备redis中的存在的访问指令信息的剩余有效期可能会不一致,例如主redis中访问指令信息对应的第一剩余有效期可能是10小时,备redis中的访问指令信息对应的第二剩余有效期可能是12小时,此时备redis中的访问指令信息对应的第二剩余有效期更长,那就以备redis中的访问指令信息的第二剩余有效期为准,并将该第二剩余有效期同步到主redis中,更新主redis中的第一剩余有效期为该第二剩余有效期。In an embodiment, since the main redis and the standby redis usually have a downtime at different times, and the time required to resume normal operation after the downtime may be different, the access instruction information existing in the primary redis and the standby redis may be different. The remaining validity period may be inconsistent. For example, the first remaining validity period corresponding to the access instruction information in the primary redis may be 10 hours, and the second remaining validity period corresponding to the access instruction information in the standby redis may be 12 hours. If the second remaining validity period corresponding to the instruction information is longer, the second remaining validity period of the access instruction information in the redis is taken as the standard, and the second remaining validity period is synchronized to the main redis, and the first remaining in the main redis is updated. The validity period is the second remaining validity period.
需要说明的是,访问指令信息通常具有一个有效期,比如24小时,有效期到之后,redis中的访问指令信息数据会自动删除,同时会有一个缓冲期并生成新的访问指令信息,比如在有效期到之前15分钟为缓冲期,该缓冲期对应本实施例中的时间阈值。It should be noted that the access instruction information usually has an expiration date, such as 24 hours. After the expiration date, the access instruction information data in the redis is automatically deleted, and there is a buffer period and a new access instruction information is generated, for example, during the validity period. The previous 15 minutes is the buffer period, which corresponds to the time threshold in this embodiment.
由上述事实施例可知,本申请提出的访问指令信息获取方法,首先通过在接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;其次若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从所述备redis中获取所述客户端标识信息对应的访问指令信息,或者确定从所述主redis中获取所述客户端标识信息对应的访问指令信息;若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;最后将获取的访问指令信息发送至该客户端。能够提高客户端访问开放平台的效率,且能够改善开放平台的数据库单点故障的问题。The method for obtaining the access instruction information proposed by the present application firstly queries whether a redis is stored in the predetermined abnormal information storage table after receiving the access request with the client identification information sent by the client. If the abnormality identification information of the redis is found, the abnormality identification information is matched with the first identification information of the primary redis and the second identification information of the redis, respectively, according to the matching result. Determining the access instruction information corresponding to the client identifier information from the standby redis, or determining to obtain the access instruction information corresponding to the client identifier information from the primary redis; if the query does not find the abnormal identifier of the redis The information is obtained from the main redis to obtain the access instruction information corresponding to the client identification information; and finally, the obtained access instruction information is sent to the client. It can improve the efficiency of client access to the open platform, and can improve the single point of failure of the open platform database.
此外,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有访问指令信息获取程序,所述访问指令信息获取程序被处理器执行时实现如下操作:In addition, the present application further provides a computer readable storage medium having stored thereon an access instruction information acquiring program, and when the access instruction information acquiring program is executed by the processor, the following operations are implemented:
接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定 的异常信息存储表中是否存储有redis的异常标识信息;After receiving the access request with the client identifier information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配;If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis;
若所述异常标识信息与所述第一标识信息相匹配,则确定从所述备redis中获取所述客户端标识信息对应的访问指令信息;If the abnormality identification information matches the first identification information, determining that the access instruction information corresponding to the client identification information is obtained from the standby redis;
或者,若所述异常标识信息与所述第二标识信息相匹配,则确定从所述主redis中获取所述客户端标识信息对应的访问指令信息;Or, if the abnormality identifier information matches the second identifier information, determining to obtain the access instruction information corresponding to the client identifier information from the primary redis;
若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;If the abnormal identifier information of the redis is not found, the access instruction information corresponding to the client identifier information is obtained from the primary redis;
将获取的访问指令信息发送至该客户端。The obtained access instruction information is sent to the client.
本申请计算机可读存储介质具体实施方式与上述电子装置以及访问指令信息获取方法各实施例基本相同,在此不作累述。The specific embodiment of the computer readable storage medium of the present application is substantially the same as the foregoing embodiments of the electronic device and the access instruction information obtaining method, and is not described herein.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种访问指令信息获取方法,其特征在于,所述访问指令信息获取方法包括如下步骤:An access instruction information obtaining method, wherein the access instruction information obtaining method comprises the following steps:
    S1、接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;S1. After receiving the access request with the client identifier information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
    S2、若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从主redis或备redis获取客户端标识信息对应的访问指令信息;S2. If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis is determined according to the matching result. Or the redis obtains the access instruction information corresponding to the client identifier information;
    S3、若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;S3. If the abnormal identifier information of the redis is not found, obtain the access instruction information corresponding to the client identifier information from the primary redis;
    S4、将获取的访问指令信息发送至该客户端。S4. Send the obtained access instruction information to the client.
  2. 如权利要求1所述的访问指令信息获取方法,其特征在于,所述访问指令信息获取程序被所述处理器执行时还实现监测步骤,所述监测步骤包括:The access instruction information acquisition method according to claim 1, wherein the access instruction information acquisition program is further implemented by the processor to implement a monitoring step, the monitoring step comprising:
    根据预设的监测周期,监测所述主redis及所述备redis;Monitoring the primary redis and the standby redis according to a preset monitoring period;
    若在第一监测周期内监测到所述主redis异常,则生成与所述主redis的第一标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表;If the main redis exception is detected in the first monitoring period, generating abnormal identifier information that matches the first identifier information of the primary redis, and storing the abnormal identifier information in the abnormal information storage list;
    或者,若在第一监测周期内监测到所述备redis异常,则生成与所述备redis的第二标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表。Alternatively, if the standby redis exception is detected in the first monitoring period, abnormal identifier information matching the second identifier information of the standby redis is generated, and the abnormal identifier information is stored in the abnormal information storage list.
  3. 如权利要求2所述的访问指令信息获取方法,其特征在于,若在第一监测周期内没有监测到所述主redis异常,则在第二监测周期内重复执行所述监测步骤,所述第二监测周期为所述第一监测周期之后的监测周期。The access instruction information obtaining method according to claim 2, wherein if the main redis abnormality is not detected in the first monitoring period, the monitoring step is repeatedly performed in the second monitoring period, the The second monitoring period is the monitoring period after the first monitoring period.
  4. 如权利要求1所述的访问指令信息获取方法,其特征在于,所述客户端标识信息包括登录名及登录密码,所述从所述备redis中获取所述客户端标 识信息对应的访问指令信息的步骤包括:The access instruction information obtaining method according to claim 1, wherein the client identification information includes a login name and a login password, and the access instruction information corresponding to the client identification information is obtained from the standby redis The steps include:
    基于所述登录名及所述登录密码遍历所述备redis,若在所述备redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the standby redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the standby redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
    或者,若在所述备redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the standby redis, an error prompt message is sent to the client.
  5. 如权利要求2所述的访问指令信息获取方法,其特征在于,所述客户端标识信息包括登录名及登录密码,所述从所述备redis中获取所述客户端标识信息对应的访问指令信息的步骤包括:The access instruction information obtaining method according to claim 2, wherein the client identification information includes a login name and a login password, and the access instruction information corresponding to the client identification information is obtained from the standby redis The steps include:
    基于所述登录名及所述登录密码遍历所述备redis,若在所述备redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the standby redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the standby redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
    或者,若在所述备redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the standby redis, an error prompt message is sent to the client.
  6. 如权利要求3所述的访问指令信息获取方法,其特征在于,所述客户端标识信息包括登录名及登录密码,所述从所述备redis中获取所述客户端标识信息对应的访问指令信息的步骤包括:The access instruction information obtaining method according to claim 3, wherein the client identification information includes a login name and a login password, and the access instruction information corresponding to the client identification information is obtained from the standby redis The steps include:
    基于所述登录名及所述登录密码遍历所述备redis,若在所述备redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the standby redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the standby redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
    或者,若在所述备redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the standby redis, an error prompt message is sent to the client.
  7. 如权利要求4所述的访问指令信息获取方法,其特征在于,所述从所述主redis中获取所述客户端标识信息对应的访问指令信息的步骤包括:The access instruction information obtaining method according to claim 4, wherein the step of acquiring the access instruction information corresponding to the client identification information from the main redis comprises:
    基于所述登录名及所述登录密码遍历所述主redis,若在所述主redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指 令信息获取规则获取所述登录名对应的访问指令信息;And traversing the primary redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the primary redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
    或者,若在所述主redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the primary redis, an error prompt message is sent to the client.
  8. 如权利要求4所述的访问指令信息获取方法,其特征在于,所述预先确定的访问指令信息获取规则包括:The access instruction information acquisition method according to claim 4, wherein the predetermined access instruction information acquisition rule comprises:
    查询所述备redis中是否有所述登录名对应的访问指令信息;Querying, in the standby redis, whether the access instruction information corresponding to the login name is included;
    若所述备redis中有所述登录名对应的访问指令信息,则获取该访问指令信息的第一有效期及当前操作时间;And if the standby redis has the access instruction information corresponding to the login name, obtaining the first validity period and the current operation time of the access instruction information;
    若所述第一有效期大于当前操作时间,且所述第一有效期与当前操作时间的差值大于预设的时间阈值,则确定该访问指令信息有效,若所述第一有效期大于当前操作时间,且所述第一有效期与当前操作时间的查找小于或等于预设的时间阈值,则确定该访问指令信息无效;If the first validity period is greater than the current operation time, and the difference between the first validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid, if the first validity period is greater than the current operation time, And determining that the first validity period and the current operation time are less than or equal to a preset time threshold, determining that the access instruction information is invalid;
    若确定该访问指令信息有效,则获取该访问指令信息,若确定该访问指令信息无效,则向所述备redis发送生成所述登录名对应的访问指令信息的请求,获取所述备redis生成的所述登录名对应的访问指令信息;If it is determined that the access instruction information is valid, the access instruction information is acquired, and if it is determined that the access instruction information is invalid, the request for generating the access instruction information corresponding to the login name is sent to the standby redis, and the generated redis generated is obtained. Access command information corresponding to the login name;
    向所述备redis发送生成所述登录名对应的访问指令信息的请求,获取所述备redis生成的该客户端标识信息对应的访问指令信息。Sending, by the standby redis, a request for generating access command information corresponding to the login name, and acquiring access command information corresponding to the client identifier information generated by the standby redis.
  9. 如权利要求5所述的访问指令信息获取方法,其特征在于,所述预先确定的访问指令信息获取规则包括:The access instruction information acquisition method according to claim 5, wherein the predetermined access instruction information acquisition rule comprises:
    查询所述主redis中是否有所述登录名对应的访问指令信息;Querying, in the main redis, whether there is access instruction information corresponding to the login name;
    若所述主redis中有所述登录名对应的访问指令信息,则获取该访问指令信息的第二有效期及当前操作时间;If the main redis has the access instruction information corresponding to the login name, obtaining the second validity period and the current operation time of the access instruction information;
    若所述第二有效期大于当前操作时间,且所述第二有效期与当前操作时间的差值大于预设的时间阈值,则确定该访问指令信息有效,若所述第二有效期大于当前操作时间,且所述第二有效期与当前操作时间的查找小于或等于预设的时间阈值,则确定该访问指令信息无效;If the second validity period is greater than the current operation time, and the difference between the second validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid, and if the second validity period is greater than the current operation time, And determining that the second validity period and the current operation time are less than or equal to a preset time threshold, determining that the access instruction information is invalid;
    若确定该访问指令信息有效,则获取该访问指令信息,若确定该访问指令信息无效,则向所述主redis发送生成所述登录名对应的访问指令信息的请求,获取所述主redis生成的所述登录名对应的访问指令信息;If it is determined that the access instruction information is valid, the access instruction information is acquired, and if it is determined that the access instruction information is invalid, the request for generating the access instruction information corresponding to the login name is sent to the main redis, and the main redis is generated. Access command information corresponding to the login name;
    向所述主redis发送生成所述登录名对应的访问指令信息的请求,获取所述主redis生成的该客户端标识信息对应的访问指令信息。Sending, by the primary redis, a request for generating access command information corresponding to the login name, and acquiring access command information corresponding to the client identifier information generated by the primary redis.
  10. 一种电子装置,其特征在于,所述电子装置包括存储器、及与所述存储器连接的处理器,所述处理器用于执行所述存储器上存储的访问指令信息获取程序,所述访问指令信息获取程序被所述处理器执行时实现如下步骤:An electronic device, comprising: a memory, and a processor connected to the memory, wherein the processor is configured to execute an access instruction information acquiring program stored on the memory, where the access instruction information is acquired The program implements the following steps when executed by the processor:
    A1、接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;A1. After receiving the access request with the client identifier information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
    A2、若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从主redis或备redis获取客户端标识信息对应的访问指令信息;A2. If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis is determined according to the matching result. Or the redis obtains the access instruction information corresponding to the client identifier information;
    A3、若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;A3. If the abnormal identifier information of the redis is not found, obtain the access instruction information corresponding to the client identifier information from the primary redis;
    A4、将获取的访问指令信息发送至该客户端。A4. Send the obtained access instruction information to the client.
  11. 如权利要求10所述的电子装置,其特征在于,所述访问指令信息获取程序被所述处理器执行时还实现监测步骤,所述监测步骤包括:The electronic device according to claim 10, wherein the access instruction information acquisition program is further executed by the processor to implement a monitoring step, the monitoring step comprising:
    根据预设的监测周期,监测所述主redis及所述备redis;Monitoring the primary redis and the standby redis according to a preset monitoring period;
    若在第一监测周期内监测到所述主redis异常,则生成与所述主redis的第一标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表;If the main redis exception is detected in the first monitoring period, generating abnormal identifier information that matches the first identifier information of the primary redis, and storing the abnormal identifier information in the abnormal information storage list;
    或者,若在第一监测周期内监测到所述备redis异常,则生成与所述备redis的第二标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表。Alternatively, if the standby redis exception is detected in the first monitoring period, abnormal identifier information matching the second identifier information of the standby redis is generated, and the abnormal identifier information is stored in the abnormal information storage list.
  12. 如权利要求11所述的电子装置,其特征在于,若在第一监测周期内 没有监测到所述主redis异常,则在第二监测周期内重复执行所述监测步骤,所述第二监测周期为所述第一监测周期之后的监测周期。The electronic device according to claim 11, wherein if the main redis abnormality is not detected during the first monitoring period, the monitoring step is repeatedly performed in the second monitoring period, the second monitoring period It is the monitoring period after the first monitoring period.
  13. 如权利要求10所述的电子装置,其特征在于,所述客户端标识信息包括登录名及登录密码,所述从所述备redis中获取所述客户端标识信息对应的访问指令信息的步骤包括:The electronic device according to claim 10, wherein the client identification information comprises a login name and a login password, and the step of obtaining the access instruction information corresponding to the client identification information from the standby redis includes :
    基于所述登录名及所述登录密码遍历所述备redis,若在所述备redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the standby redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the standby redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
    或者,若在所述备redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the standby redis, an error prompt message is sent to the client.
  14. 如权利要求11所述的电子装置,其特征在于,所述客户端标识信息包括登录名及登录密码,所述从所述备redis中获取所述客户端标识信息对应的访问指令信息的步骤包括:The electronic device according to claim 11, wherein the client identification information comprises a login name and a login password, and the step of obtaining the access instruction information corresponding to the client identification information from the standby redis comprises: :
    基于所述登录名及所述登录密码遍历所述备redis,若在所述备redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the standby redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the standby redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
    或者,若在所述备redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the standby redis, an error prompt message is sent to the client.
  15. 如权利要求12所述的电子装置,其特征在于,所述客户端标识信息包括登录名及登录密码,所述从所述备redis中获取所述客户端标识信息对应的访问指令信息的步骤包括:The electronic device according to claim 12, wherein the client identification information comprises a login name and a login password, and the step of obtaining the access instruction information corresponding to the client identification information from the standby redis includes :
    基于所述登录名及所述登录密码遍历所述备redis,若在所述备redis中查询到所述登录名与所述登录密码之间的映射关系,则根据预先确定的访问指令信息获取规则获取所述登录名对应的访问指令信息;And traversing the standby redis based on the login name and the login password, and if the mapping relationship between the login name and the login password is queried in the standby redis, obtaining a rule according to a predetermined access instruction information. Obtaining access instruction information corresponding to the login name;
    或者,若在所述备redis中查询不到所述登录名与所述登录密码之间的映射关系,则向该客户端发送错误提示信息。Alternatively, if the mapping relationship between the login name and the login password is not found in the standby redis, an error prompt message is sent to the client.
  16. 如权利要求13所述的电子装置,其特征在于,所述预先确定的访问指令信息获取规则包括:The electronic device according to claim 13, wherein the predetermined access instruction information acquisition rule comprises:
    查询所述备redis中是否有所述登录名对应的访问指令信息;Querying, in the standby redis, whether the access instruction information corresponding to the login name is included;
    若所述备redis中有所述登录名对应的访问指令信息,则获取该访问指令信息的第一有效期及当前操作时间;And if the standby redis has the access instruction information corresponding to the login name, obtaining the first validity period and the current operation time of the access instruction information;
    若所述第一有效期大于当前操作时间,且所述第一有效期与当前操作时间的差值大于预设的时间阈值,则确定该访问指令信息有效,若所述第一有效期大于当前操作时间,且所述第一有效期与当前操作时间的查找小于或等于预设的时间阈值,则确定该访问指令信息无效;If the first validity period is greater than the current operation time, and the difference between the first validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid, if the first validity period is greater than the current operation time, And determining that the first validity period and the current operation time are less than or equal to a preset time threshold, determining that the access instruction information is invalid;
    若确定该访问指令信息有效,则获取该访问指令信息,若确定该访问指令信息无效,则向所述备redis发送生成所述登录名对应的访问指令信息的请求,获取所述备redis生成的所述登录名对应的访问指令信息;If it is determined that the access instruction information is valid, the access instruction information is acquired, and if it is determined that the access instruction information is invalid, the request for generating the access instruction information corresponding to the login name is sent to the standby redis, and the generated redis generated is obtained. Access command information corresponding to the login name;
    向所述备redis发送生成所述登录名对应的访问指令信息的请求,获取所述备redis生成的该客户端标识信息对应的访问指令信息。Sending, by the standby redis, a request for generating access command information corresponding to the login name, and acquiring access command information corresponding to the client identifier information generated by the standby redis.
  17. 如权利要求14所述的电子装置,其特征在于,所述预先确定的访问指令信息获取规则包括:The electronic device according to claim 14, wherein the predetermined access instruction information acquisition rule comprises:
    查询所述主redis中是否有所述登录名对应的访问指令信息;Querying, in the main redis, whether there is access instruction information corresponding to the login name;
    若所述主redis中有所述登录名对应的访问指令信息,则获取该访问指令信息的第二有效期及当前操作时间;If the main redis has the access instruction information corresponding to the login name, obtaining the second validity period and the current operation time of the access instruction information;
    若所述第二有效期大于当前操作时间,且所述第二有效期与当前操作时间的差值大于预设的时间阈值,则确定该访问指令信息有效,若所述第二有效期大于当前操作时间,且所述第二有效期与当前操作时间的查找小于或等于预设的时间阈值,则确定该访问指令信息无效;If the second validity period is greater than the current operation time, and the difference between the second validity period and the current operation time is greater than a preset time threshold, determining that the access instruction information is valid, and if the second validity period is greater than the current operation time, And determining that the second validity period and the current operation time are less than or equal to a preset time threshold, determining that the access instruction information is invalid;
    若确定该访问指令信息有效,则获取该访问指令信息,若确定该访问指令信息无效,则向所述主redis发送生成所述登录名对应的访问指令信息的请求,获取所述主redis生成的所述登录名对应的访问指令信息;If it is determined that the access instruction information is valid, the access instruction information is acquired, and if it is determined that the access instruction information is invalid, the request for generating the access instruction information corresponding to the login name is sent to the main redis, and the main redis is generated. Access command information corresponding to the login name;
    向所述主redis发送生成所述登录名对应的访问指令信息的请求,获取所述主redis生成的该客户端标识信息对应的访问指令信息。Sending, by the primary redis, a request for generating access command information corresponding to the login name, and acquiring access command information corresponding to the client identifier information generated by the primary redis.
  18. 一种计算机可读存储介质,所述计算机可读存储介质存储有访问指令信息获取程序,所述访问指令信息获取程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:A computer readable storage medium storing an access instruction information acquisition program, the access instruction information acquisition program being executable by at least one processor to cause the at least one processor to perform the following steps:
    接收到客户端发送的带有客户端标识信息的访问请求后,查询预先确定的异常信息存储表中是否存储有redis的异常标识信息;After receiving the access request with the client identifier information sent by the client, querying whether the abnormal identifier information of the redis is stored in the predetermined abnormal information storage table;
    若查询到有redis的异常标识信息,则分别将所述异常标识信息与预先确定的主redis的第一标识信息及备redis的第二标识信息进行匹配,并根据匹配结果确定从主redis或备redis获取客户端标识信息对应的访问指令信息;If the abnormal identifier information of the redis is found, the abnormal identifier information is matched with the first identifier information of the primary redis and the second identifier of the redis, and the redis or the secondary is determined according to the matching result. Redis obtains access instruction information corresponding to the client identifier information;
    若查询不到有redis的异常标识信息,则从所述主redis获取所述客户端标识信息对应的访问指令信息;If the abnormal identifier information of the redis is not found, the access instruction information corresponding to the client identifier information is obtained from the primary redis;
    将获取的访问指令信息发送至该客户端。The obtained access instruction information is sent to the client.
  19. 如权利要求18所述的计算机可读存储介质,其特征在于,所述访问指令信息获取程序被所述处理器执行时还实现监测步骤,所述监测步骤包括:The computer readable storage medium of claim 18, wherein the access instruction information acquisition program is further implemented by the processor to implement a monitoring step, the monitoring step comprising:
    根据预设的监测周期,监测所述主redis及所述备redis;Monitoring the primary redis and the standby redis according to a preset monitoring period;
    若在第一监测周期内监测到所述主redis异常,则生成与所述主redis的第一标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表;If the main redis exception is detected in the first monitoring period, generating abnormal identifier information that matches the first identifier information of the primary redis, and storing the abnormal identifier information in the abnormal information storage list;
    或者,若在第一监测周期内监测到所述备redis异常,则生成与所述备redis的第二标识信息相匹配的异常标识信息,将该异常标识信息存储至所述异常信息存储列表。Alternatively, if the standby redis exception is detected in the first monitoring period, abnormal identifier information matching the second identifier information of the standby redis is generated, and the abnormal identifier information is stored in the abnormal information storage list.
  20. 如权利要求19所述的计算机可读存储介质,其特征在于,若在第一监测周期内没有监测到所述主redis异常,则在第二监测周期内重复执行所述监测步骤,所述第二监测周期为所述第一监测周期之后的监测周期。The computer readable storage medium of claim 19, wherein the monitoring step is repeatedly performed during a second monitoring period if the primary redis exception is not detected during the first monitoring period, The second monitoring period is the monitoring period after the first monitoring period.
PCT/CN2018/089872 2018-03-06 2018-06-05 Electronic device, access instruction information acquisition method and storage medium WO2019169771A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810183149.6A CN108491466B (en) 2018-03-06 2018-03-06 Electronic device, access instruction information acquisition method, and storage medium
CN201810183149.6 2018-03-06

Publications (1)

Publication Number Publication Date
WO2019169771A1 true WO2019169771A1 (en) 2019-09-12

Family

ID=63341543

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089872 WO2019169771A1 (en) 2018-03-06 2018-06-05 Electronic device, access instruction information acquisition method and storage medium

Country Status (2)

Country Link
CN (1) CN108491466B (en)
WO (1) WO2019169771A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825758B (en) * 2019-10-31 2022-11-15 中国银联股份有限公司 Transaction processing method and device
CN112925848B (en) * 2021-02-23 2024-02-06 马上消费金融股份有限公司 Data synchronization method, device, equipment and readable storage medium
CN114860782B (en) * 2022-07-04 2022-10-28 北京世纪好未来教育科技有限公司 Data query method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473272A (en) * 2013-08-20 2013-12-25 小米科技有限责任公司 Data processing method, device and system
CN104252500A (en) * 2013-06-29 2014-12-31 北京新媒传信科技有限公司 Method and device for carrying out fault repairing on database management platform
CN106897421A (en) * 2017-02-24 2017-06-27 杭州铭师堂教育科技发展有限公司 Memory database read and write abruption system and method based on sentry's pattern
CN107734017A (en) * 2017-09-30 2018-02-23 平安科技(深圳)有限公司 Data service method and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4049104B2 (en) * 2004-01-30 2008-02-20 日本電気株式会社 Content distribution system, server, client, and program
JP4549793B2 (en) * 2004-09-21 2010-09-22 株式会社日立製作所 Data processing method, database system, and storage device
CN104199957B (en) * 2014-09-17 2018-03-02 合一网络技术(北京)有限公司 A kind of implementation method of Redis general-purpose proxies
CN107025243B (en) * 2016-02-02 2020-04-24 北京神州泰岳软件股份有限公司 Resource data query method, query client and query system
CN105808638B (en) * 2016-02-23 2019-03-29 平安科技(深圳)有限公司 Data processing method and system
CN106330563B (en) * 2016-08-30 2019-09-17 北京神州绿盟信息安全科技股份有限公司 A kind of method and device of determining Intranet http communication stream service type

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252500A (en) * 2013-06-29 2014-12-31 北京新媒传信科技有限公司 Method and device for carrying out fault repairing on database management platform
CN103473272A (en) * 2013-08-20 2013-12-25 小米科技有限责任公司 Data processing method, device and system
CN106897421A (en) * 2017-02-24 2017-06-27 杭州铭师堂教育科技发展有限公司 Memory database read and write abruption system and method based on sentry's pattern
CN107734017A (en) * 2017-09-30 2018-02-23 平安科技(深圳)有限公司 Data service method and system

Also Published As

Publication number Publication date
CN108491466B (en) 2022-08-30
CN108491466A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
WO2019140828A1 (en) Electronic apparatus, method for querying logs in distributed system, and storage medium
WO2019179027A1 (en) Electronic device, firewall provisioning verification method, system and storage medium
WO2019148722A1 (en) Electronic device, data migrating and calling method and storage medium
CN108121559B (en) Configuration file pushing method, server and storage medium
WO2019179026A1 (en) Electronic device, method for automatically generating cluster access domain name, and storage medium
CN107920112B (en) Configuration file pushing method supporting gray mode, central server and storage medium
US9594619B2 (en) Robust hardware fault management system, method and framework for enterprise devices
WO2019148727A1 (en) Electronic device, redis-based exception warning method and storage medium
WO2020181810A1 (en) Data processing method and apparatus applied to multi-level caching in cluster
WO2019136812A1 (en) Electronic device, data calling log generation and query method, and storage medium
WO2019134339A1 (en) Desensitization method and procedure, application server and computer readable storage medium
US8768896B2 (en) Setting information database management
WO2019169771A1 (en) Electronic device, access instruction information acquisition method and storage medium
WO2019148728A1 (en) Electronic device, execution task assignment method for distributed system, and storage medium
CN112035472B (en) Data processing method, device, computer equipment and storage medium
WO2019148721A1 (en) Electronic device, risk early warning method for internet service system, and storage medium
WO2019169763A1 (en) Electronic apparatus, service system risk control method, and storage medium
WO2019140829A1 (en) Electronic device, method for releasing application update version, and storage medium
WO2022179120A1 (en) Gateway interception method and apparatus, electronic device and storage medium
CN109739857B (en) Data distributed writing method and device under high concurrency, terminal and storage medium
US8095980B2 (en) Detecting malicious behavior in data transmission of a de-duplication system
CN116010926A (en) Login authentication method, login authentication device, computer equipment and storage medium
WO2019001271A1 (en) Open platform device, method for obtaining policy number, and computer readable storage medium
WO2019071892A1 (en) Method for transmitting masking rules for sensitive information, application server, and computer readable storage medium
JP2013186765A (en) Batch processing system, progress confirmation device, progress confirmation method and program

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11/12/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18909128

Country of ref document: EP

Kind code of ref document: A1