CN107679203B - Redis internal database calling method and system - Google Patents

Redis internal database calling method and system Download PDF

Info

Publication number
CN107679203B
CN107679203B CN201710948081.1A CN201710948081A CN107679203B CN 107679203 B CN107679203 B CN 107679203B CN 201710948081 A CN201710948081 A CN 201710948081A CN 107679203 B CN107679203 B CN 107679203B
Authority
CN
China
Prior art keywords
database
subscript
target
identifier
redis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710948081.1A
Other languages
Chinese (zh)
Other versions
CN107679203A (en
Inventor
黄伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201710948081.1A priority Critical patent/CN107679203B/en
Publication of CN107679203A publication Critical patent/CN107679203A/en
Application granted granted Critical
Publication of CN107679203B publication Critical patent/CN107679203B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24573Query processing with adaptation to user needs using data annotations, e.g. user-defined metadata

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method and a system for calling a Redis internal database, wherein the method comprises the following steps: acquiring an identifier sent by a database calling terminal to obtain a target identifier; acquiring a target database subscript; initiating a search operation on a pre-established Redis internal database set by using the subscript of the target database, and searching a database corresponding to the subscript of the target database from the Redis internal database set to obtain the target database when the subscript of the target database is the database subscript corresponding to the target identifier recorded in a preset mapping relation; allowing the database calling terminal to call the target database; the preset mapping relation is a mapping relation between a pre-created identifier and a database subscript, and the identifier in the preset mapping relation is an identifier set according to user requirements. According to the method and the device, the called database subscript is obtained, so that the accuracy of calling the database by the database calling terminal is improved, and further, the operation of a user is facilitated.

Description

Redis internal database calling method and system
Technical Field
The invention relates to the technical field of databases, in particular to a database calling method and a database calling system.
Background
Redis is a widely used high-performance Key-Value database, and well supplements a relational database. Redis, as a database system, provides storage services, inside which there is also the concept of "database". Redis's internal databases are identified by an integer subscript, specifying the number of internal databases by means of databases entries in the configuration file, which is 16 by default, as shown in FIG. 1.
Before the internal database is called, an internal database index command, such as a Select dbIndex command, is used to locate the internal database index to be called. In Redis, the internal database is distinguished only by subscripts, and clear identification is lacked, so that an operator can easily select the data wrongly, and misoperation is caused.
How to improve the accuracy rate of calling the Redis internal database by utilizing the subscript identifier of the Redis internal database is a problem to be solved urgently at present.
Disclosure of Invention
In view of this, the present invention provides a method and a system for calling a Redis internal database, which can improve the accuracy of the Redis internal database for a database calling terminal. The specific scheme is as follows:
a Redis internal database calling method comprises the following steps:
acquiring an identifier sent by a database calling terminal to obtain a target identifier;
acquiring a target database subscript;
initiating a search operation on a pre-created Redis internal database set by using the target database subscript, and searching a database corresponding to the target database subscript from the Redis internal database set to obtain a target database when the target database subscript is the database subscript corresponding to the target identifier recorded in a preset mapping relation;
allowing the database calling terminal to call the target database;
the preset mapping relation is a mapping relation between a pre-created identifier and a database subscript, and the identifier in the preset mapping relation is an identifier set according to user requirements.
Optionally, the process of obtaining the subscript of the target database includes:
creating a database index lookup command containing the target identifier;
and searching a command by using the database subscript, and determining the database subscript corresponding to the target identifier based on the preset mapping relation to obtain the target database subscript.
Optionally, the process of obtaining the subscript of the target database includes:
and acquiring the database subscript sent by the database calling terminal to obtain the target database subscript.
Optionally, the initiating a search operation on a pre-created Redis internal database set by using the target database subscript includes:
judging whether the target identifier corresponds to the subscript of the target database or not by using the preset mapping relation, and if so, creating a database searching command comprising the target identifier and the subscript of the target database;
and initiating a searching operation on the internal database set of the Redis by utilizing the database searching command.
Optionally, the method for calling the Redis internal database further includes:
and storing the preset mapping relation by using a configuration file.
Optionally, the method for calling the Redis internal database further includes:
acquiring an identifier modification command;
and modifying the corresponding identifier stored in the configuration file by using the identifier modification command.
The invention also correspondingly discloses a Redis internal database calling system, which comprises:
the identifier acquisition module is used for acquiring an identifier sent by the database calling terminal to obtain a target identifier;
the database subscript acquiring module is used for acquiring a target database subscript;
a database searching module, configured to initiate a searching operation on a pre-created Redis internal database set by using the target database subscript, and when the target database subscript is a database subscript corresponding to the target identifier recorded in a preset mapping relationship, search for a database corresponding to the target database subscript from the Redis internal database set to obtain a target database;
the database calling module is used for allowing the database calling terminal to call the target database;
the preset mapping relation is a mapping relation between a pre-created identifier and a database subscript, and the identifier in the preset mapping relation is an identifier set according to user requirements.
Optionally, the database subscript obtaining module includes:
a first command creating unit for creating a database index lookup command containing the target identifier;
and the database subscript determining unit is used for searching a command by using the database subscript, and determining the database subscript corresponding to the target identifier based on the preset mapping relation to obtain the target database subscript.
Optionally, the database subscript acquiring module is specifically configured to acquire the database subscript sent by the database calling terminal, so as to obtain the target database subscript.
Optionally, the database searching module includes:
the judging unit is used for judging whether the target identifier corresponds to the subscript of the target database or not by utilizing the preset mapping relation;
a second command creating unit configured to create a database lookup command including the target identifier and the target database index when the target identifier corresponds to the target database index;
the searching unit is used for initiating searching operation on the internal database set of the Redis by utilizing the database searching command;
and the determining unit is used for searching the database corresponding to the subscript of the target database from the internal database set of the Redis to obtain the target database.
Optionally, the system for calling the Redis internal database further includes:
and the mapping relation storage module is used for storing the preset mapping relation by using the configuration file.
Optionally, the system for calling the Redis internal database further includes:
a modification command acquisition module for acquiring an identifier modification command;
and the identifier modification module is used for modifying the corresponding identifier stored in the configuration file by using the identifier modification command.
Therefore, the target identifier is obtained by obtaining the identifier sent by the database calling terminal; then, obtaining a subscript of a target database; initiating a search operation on a pre-established Redis internal database set by using the subscript of the target database, and searching a database corresponding to the subscript of the target database from the Redis internal database set to obtain the target database when the subscript of the target database is the database subscript corresponding to the target identifier recorded in a preset mapping relation; and finally, the database calling terminal calls the target database. According to the method and the device, the target database is accurately called by obtaining the database subscript corresponding to the called database, so that the accuracy of calling the database by the database calling terminal is improved, and further, the operation of a user is facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of Redis internal database subscripts;
FIG. 2 is a flow chart of a Redis internal database calling method disclosed in the present invention;
FIG. 3 is a flowchart of a specific Redis internal database invocation method disclosed in the present invention;
FIG. 4 is a flowchart of another specific Redis internal database invocation method disclosed in the present invention;
FIG. 5 is a schematic diagram of a specific Redis internal data subscript disclosed herein;
fig. 6 is a schematic structural diagram of a specific internal Redis database calling system disclosed in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a method for calling a Redis internal database, which is shown in figure 2 and comprises the following steps:
step S11: and acquiring the identifier sent by the database calling terminal to obtain the target identifier.
The target identifier is usually an identifier of a pre-created internal database of the currently called Redis, and certainly does not exclude that the user inputs an identifier inconsistent with the identifier of the pre-created internal database of the currently called Redis due to a personal error operation, and at this time, the database calling terminal receives a prompt command containing the meaning of re-inputting the identifier.
Step S12: and acquiring a target database subscript.
The acquisition of the subscripts of the target database comprises a direct acquisition mode and an indirect acquisition mode.
Step S13: and initiating a search operation on a pre-created Redis internal database set by using the subscript of the target database, and searching the database corresponding to the subscript of the target database from the Redis internal database set to obtain the target database when the subscript of the target database is the database subscript corresponding to the target identifier recorded in the preset mapping relation.
The preset mapping relationship is a mapping relationship between a pre-created identifier and a database subscript, and specifically, the identifier establishing the mapping relationship and the database corresponding to the database subscript are the same database. The identifier in the preset mapping relationship is an identifier that is set according to a user requirement, for example, in this embodiment, the identifier in the preset mapping relationship is an identifier that is set according to a user requirement, and includes but is not limited to an identifier of a database content attribute, and the identifier can be clearly distinguished by a user. Such as Channel Info, UserInfo, Channel Online User, etc.
Step S14: and allowing the database calling terminal to call the target database.
As can be seen, in the embodiment, the target identifier is obtained by obtaining the identifier sent by the database calling terminal; then, obtaining a subscript of a target database; initiating a search operation on a pre-established Redis internal database set by using the subscript of the target database, and searching a database corresponding to the subscript of the target database from the Redis internal database set to obtain the target database when the subscript of the target database is the database subscript corresponding to the target identifier recorded in a preset mapping relation; and finally, the database calling terminal calls the target database. According to the method and the device, the target database is accurately called by obtaining the database subscript corresponding to the called database, so that the accuracy of calling the database by the database calling terminal is improved, and further, the operation of a user is facilitated.
The embodiment of the invention also discloses a specific method for calling the Redis internal database, which is shown in figure 3 and comprises the following steps:
step S21: and acquiring the identifier sent by the database calling terminal to obtain the target identifier.
Step S22: and acquiring the subscript of the target database by using the target identifier.
Further, the step S22 may specifically include the following steps S211 to S222:
step S221: a database index lookup command is created that contains the target identifier.
It is understood that the naming of the database index lookup command is named by the user according to needs or personal habits, and different naming modes do not affect the function of the database index lookup command. For example, the database subscript lookup command may be named selecbyname.
Step S222: and searching a command by utilizing the database subscript, and determining the database subscript corresponding to the target identifier based on the preset mapping relation to obtain the target database subscript.
Step S23: and initiating a search operation on a pre-created Redis internal database set by using the subscript of the target database, and searching a database corresponding to the subscript of the target database from the Redis internal database set to obtain the target database.
Step S24: and allowing the database calling terminal to call the target database.
Therefore, in the embodiment, the subscript of the target database is obtained through the identifier based on the preset mapping relation, so that the database calling terminal accurately calls the target database, the accuracy of calling the database by the database calling terminal is improved, and the operation of a user is facilitated.
The embodiment of the invention also discloses another specific method for calling the Redis internal database, which is shown in FIG. 4 and comprises the following steps:
step S31: and acquiring the identifier sent by the database calling terminal to obtain the target identifier.
Step S32: and acquiring the database subscript sent by the database calling terminal to obtain the target database subscript.
Step S33: and initiating a search operation on a pre-created Redis internal database set by using the subscript of the target database, and searching the database corresponding to the subscript of the target database from the Redis internal database set to obtain the target database when the subscript of the target database is the database subscript corresponding to the target identifier recorded in the preset mapping relation.
Further, the step S33 may specifically include the following steps S331 to S333:
step S331: and judging whether the target identifier corresponds to the subscript of the target database or not by utilizing a preset mapping relation, and if so, creating a database searching command comprising the target identifier and the subscript of the target database.
And judging whether the database corresponding to the target identifier and the database corresponding to the subscript of the target database are the same database or not. It can be understood that if the database corresponding to the target identifier is not the same as the database corresponding to the subscript of the target database, the target database cannot be called accurately, and then the obtained target identifier and the subscript of the target database need to be carefully checked to find out an error, so as to find out a correct target database.
Step S332: and initiating a searching operation on the internal database set of the Redis by utilizing a database searching command.
Step S333: and searching a database corresponding to the subscript of the target database from the internal database set of the Redis to obtain the target database.
Step 34: and allowing the database calling terminal to call the target database.
Therefore, in the embodiment, the target identifier and the target database subscript are obtained through the database calling terminal, and whether the target identifier and the target database subscript meet the preset mapping relationship or not is judged, so that the target database is accurately called, the accuracy rate of calling the database by the database calling terminal is improved, and the operation of a user is facilitated.
In order to enhance the durability of the calling method of the Redis internal database disclosed by the invention and better meet the requirements of users, the above embodiment can further add the following steps: and storing the preset mapping relation by using the configuration file. Therefore, the user can use the preset mapping relation at any time according to the requirement to call the target database.
In order to further enhance the flexibility of the calling method for the Redis internal database disclosed by the invention and better meet the requirements of users, the above embodiment may further add the following steps: acquiring an identifier modification command; modifying the corresponding identifier stored in the configuration file using an identifier modification command. For example, when the database information corresponding to the identifier is changed and renamed, only the identifier needs to be changed without changing the database subscript of the database corresponding to the current identifier, so that the operation is simplified, and the flexibility of the method is enhanced.
The invention also discloses a specific implementation process of the Redis internal database calling method, which is applied to a live broadcast system and comprises the following steps: 3 internal databases are pre-established in Redis, and subscripts of the used databases are 0-2 and are respectively used for storing channel/sub-channel information, user information and a channel online user list.
Before the subscript of the database is called, a configuration file is added in Redis data in advance for storing a preset mapping relation, and the configuration file is named as InnerDbNameHash. Wherein, the configuration file is in a hash data structure form, and the specific content is as follows:
key=0,value=Channel Info
key=1,value=UserInfo
key=2,value=Channel Online User
it should be noted that: channel Info, UserInfo, Channel Online User are identifiers; after the Redis is started, the reading and the modification of the mapping relation in the running process are supported through real-time reading and writing-InnerDbNameHash.
When a database index is called, for example: database call terminal usage command: selectbyname UserInfo, wherein UserInfo is a target identifier. After receiving the command, the Redis goes to InnerDbNameHash to search for a subscript corresponding to the UserInfo to be 1, then the operation is converted into select 1 command processing, and if the corresponding name cannot be searched, the operation returns to-1. And when the database calling terminal receives the target database subscript 1, determining that the target database is the 2 nd internal database in Redis according to the received target database subscript 1, and calling the 2 nd internal database in Redis.
When the identifier of the internal database in Redis needs to be modified, the user can use the command dbrename to modify. The specific process is as follows: using dbrename UserInfo UserInfoNew, the Redis modifies the InnerDbNameHash data structure after receiving the command, and the specific position modifies the identifier in the InnerDbNameHash data structure.
It should be noted that: if the cluster is a Redis cluster, the dbrename command can be only carried out on the master computer, and if the cluster is a slave computer, failure is directly returned. Moreover, the above modifications do not intrude on the master-slave synchronization mechanism of the Redis cluster. By utilizing the existing Redis synchronization framework, the Redis slave can acquire the latest InnerDbNameHash data from the host, so that the slave can also support selectbyname without additionally maintaining a mapping relation. To maintain data consistency, the dbrename command can only be modified on the host.
Of course, the Redis management software interface can also display internal database information more friendly by adding a database identifier after the database index, as shown in FIG. 5.
Correspondingly, the embodiment of the present invention further discloses a system for calling the internal database of the Redis, as shown in FIG. 6, the system includes:
and the identifier acquisition module 11 is configured to acquire an identifier sent by the database calling terminal to obtain the target identifier.
The target identifier is usually an identifier of a pre-created internal database of the currently called Redis, and certainly does not exclude that the user inputs an identifier inconsistent with the identifier of the pre-created internal database of the currently called Redis due to a personal error operation, and at this time, the database calling terminal receives a prompt command containing the meaning of re-inputting the identifier.
And a database index obtaining module 12, configured to obtain the target database index.
The database subscript acquiring module 12 includes:
a first command creating unit 121, configured to create a database index lookup command containing the target identifier.
It is understood that the naming of the database index lookup command is named by the user according to needs or personal habits, and different naming modes do not affect the function of the database index lookup command. For example, the database subscript lookup command may be named selecbyname.
And a database subscript determining unit 122, configured to find a command using the database subscript, and determine, based on the preset mapping relationship, a database subscript corresponding to the target identifier, so as to obtain the target database subscript.
And a database searching module 13, configured to initiate a search operation on a pre-created internal database set of the Redis by using the target database subscript, and when the target database subscript is a database subscript corresponding to the target identifier and recorded in a preset mapping relationship, search a database corresponding to the target database subscript from the internal database set of the Redis to obtain a target database.
The preset mapping relation is a mapping relation between a pre-created identifier and a database subscript, and the identifier in the preset mapping relation is an identifier set according to user requirements. Specifically, the identifier for establishing the mapping relationship and the database corresponding to the database index are the same database.
In this embodiment, the database subscript obtaining module 12 is specifically configured to obtain the database subscript sent by the database calling terminal, so as to obtain the target database subscript. Accordingly, the database lookup module 13 includes:
the determining unit 131 is configured to determine whether the target identifier corresponds to the target database index by using the preset mapping relationship.
A second command creating unit 132, configured to create a database lookup command including the target identifier and the target database index when the target identifier corresponds to the target database index.
And judging whether the database corresponding to the target identifier and the database corresponding to the subscript of the target database are the same database or not. It can be understood that if the database corresponding to the target identifier is not the same as the database corresponding to the subscript of the target database, the target database cannot be called accurately, and then the obtained target identifier and the subscript of the database need to be carefully checked to find out an error, so as to find out a correct target database.
A searching unit 133, configured to initiate a searching operation on the internal database set of the Redis by using the database searching command;
and the determining unit 134 is configured to centrally find out a database corresponding to the index of the target database from an internal database of the Redis, so as to obtain the target database.
And the database calling module 14 is used for allowing the database calling terminal to call the target database.
As can be seen, in the embodiment, the target identifier is obtained by obtaining the identifier sent by the database calling terminal; then, obtaining a subscript of a target database; initiating a search operation on a pre-established Redis internal database set by using the subscript of the target database, and searching a database corresponding to the subscript of the target database from the Redis internal database set to obtain the target database when the subscript of the target database is the database subscript corresponding to the target identifier recorded in a preset mapping relation; and finally, the database calling terminal calls the target database. According to the method and the device, the target database is accurately called by obtaining the database subscript corresponding to the called database, so that the accuracy of calling the database by the database calling terminal is improved, and further, the operation of a user is facilitated.
In order to enhance the durability of the application of the Redis internal database calling system disclosed by the embodiment of the invention and better meet the requirements of users, a mapping relation storage module 15 can be added and used for storing the preset mapping relation by using a configuration file. Therefore, the user can use the preset mapping relation at any time according to the requirement to call the target database.
In order to further enhance the flexibility of the calling system of the Redis internal database disclosed by the embodiment of the invention and better meet the requirements of users, a modification command acquisition module 16 for acquiring an identifier modification command can be added; an identifier modification module 17, configured to modify, by using an identifier modification command, a corresponding identifier stored in the configuration file. For example, when the database information corresponding to the identifier is changed and renamed, only the identifier needs to be changed without changing the database subscript of the database corresponding to the current identifier, so that the operation is simplified, and the flexibility of the method is enhanced.
For more specific working processes of each module and unit in the Redis internal database calling system, reference may be made to corresponding contents in the foregoing embodiments, and details are not described here again.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and the system for calling the Redis internal database provided by the invention are described in detail, a specific example is applied in the method to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. A Redis internal database calling method is characterized by comprising the following steps:
acquiring an identifier sent by a database calling terminal to obtain a target identifier;
acquiring a target database subscript;
initiating a search operation on a pre-created Redis internal database set by using the target database subscript, and searching a database corresponding to the target database subscript from the Redis internal database set to obtain a target database when the target database subscript is the database subscript corresponding to the target identifier recorded in a preset mapping relation;
allowing the database calling terminal to call the target database;
the preset mapping relation is a mapping relation between a pre-created identifier and a database subscript, and the identifier in the preset mapping relation is an identifier set according to user requirements.
2. The Redis internal database invocation method according to claim 1, wherein said obtaining a target database subscript comprises:
creating a database index lookup command containing the target identifier;
and searching a command by using the database subscript, and determining the database subscript corresponding to the target identifier based on the preset mapping relation to obtain the target database subscript.
3. The Redis internal database invocation method according to claim 1, wherein said obtaining a target database subscript comprises:
and acquiring the database subscript sent by the database calling terminal to obtain the target database subscript.
4. The Redis internal database invocation method according to claim 3, wherein said initiating a lookup operation on a pre-created Redis internal database set using said target database index comprises:
judging whether the target identifier corresponds to the subscript of the target database or not by using the preset mapping relation, and if so, creating a database searching command comprising the target identifier and the subscript of the target database;
and initiating a searching operation on the internal database set of the Redis by utilizing the database searching command.
5. The Redis internal database invocation method according to any of claims 1-4, further comprising:
and storing the preset mapping relation by using a configuration file.
6. The Redis internal database invocation method according to claim 5, further comprising:
acquiring an identifier modification command;
and modifying the corresponding identifier stored in the configuration file by using the identifier modification command.
7. A Redis internal database invocation system, comprising:
the identifier acquisition module is used for acquiring an identifier sent by the database calling terminal to obtain a target identifier;
the database subscript acquiring module is used for acquiring a target database subscript;
a database searching module, configured to initiate a searching operation on a pre-created Redis internal database set by using the target database subscript, and when the target database subscript is a database subscript corresponding to the target identifier recorded in a preset mapping relationship, search for a database corresponding to the target database subscript from the Redis internal database set to obtain a target database;
the database calling module is used for allowing the database calling terminal to call the target database;
the preset mapping relation is a mapping relation between a pre-created identifier and a database subscript, and the identifier in the preset mapping relation is an identifier set according to user requirements.
8. The Redis internal database invocation system according to claim 7, wherein said database subscript acquisition module comprises:
a first command creating unit for creating a database index lookup command containing the target identifier;
and the database subscript determining unit is used for searching a command by using the database subscript, and determining the database subscript corresponding to the target identifier based on the preset mapping relation to obtain the target database subscript.
9. The Redis internal database invocation system according to claim 7, wherein,
the database subscript acquiring module is specifically configured to acquire the database subscript sent by the database calling terminal to obtain the target database subscript.
10. The Redis internal database invocation system according to claim 9, wherein said database lookup module comprises:
the judging unit is used for judging whether the target identifier corresponds to the subscript of the target database or not by utilizing the preset mapping relation;
a second command creating unit configured to create a database lookup command including the target identifier and the target database index when the target identifier corresponds to the target database index;
the searching unit is used for initiating searching operation on the internal database set of the Redis by utilizing the database searching command;
and the determining unit is used for searching the database corresponding to the subscript of the target database from the internal database set of the Redis to obtain the target database.
11. The Redis internal database invocation system according to any of claims 7-10, further comprising:
and the mapping relation storage module is used for storing the preset mapping relation by using the configuration file.
12. The Redis internal database invocation system according to claim 11, further comprising:
a modification command acquisition module for acquiring an identifier modification command;
and the identifier modification module is used for modifying the corresponding identifier stored in the configuration file by using the identifier modification command.
CN201710948081.1A 2017-10-12 2017-10-12 Redis internal database calling method and system Active CN107679203B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710948081.1A CN107679203B (en) 2017-10-12 2017-10-12 Redis internal database calling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710948081.1A CN107679203B (en) 2017-10-12 2017-10-12 Redis internal database calling method and system

Publications (2)

Publication Number Publication Date
CN107679203A CN107679203A (en) 2018-02-09
CN107679203B true CN107679203B (en) 2020-11-13

Family

ID=61140578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710948081.1A Active CN107679203B (en) 2017-10-12 2017-10-12 Redis internal database calling method and system

Country Status (1)

Country Link
CN (1) CN107679203B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162529B (en) * 2019-05-27 2021-02-12 广州方硅信息技术有限公司 Data processing method, service server and data processing system
CN111045766B (en) * 2019-11-25 2022-07-01 杭州迪普科技股份有限公司 Method and device for outputting prompt information based on command line interface
CN113590622A (en) * 2021-07-28 2021-11-02 中国人民银行清算总中心 Distributed data access method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046812A (en) * 2006-06-12 2007-10-03 华为技术有限公司 Method of data base table recording structure and detection and its device
CN104361004A (en) * 2014-10-11 2015-02-18 北京奇虎科技有限公司 Browser favorite data processing method and browser
CN105260475A (en) * 2015-10-30 2016-01-20 努比亚技术有限公司 Data searching method, data saving method and related equipment
CN105468764A (en) * 2015-12-02 2016-04-06 广州华多网络科技有限公司 Data processing method and apparatus and cluster service system
CN105868225A (en) * 2015-11-18 2016-08-17 乐视体育文化产业发展(北京)有限公司 Data query method, client, server and system
CN106294565A (en) * 2016-07-27 2017-01-04 中国农业银行股份有限公司 A kind of data bank access method and system
CN106453512A (en) * 2016-09-05 2017-02-22 努比亚技术有限公司 Redis cluster information monitoring device and method
CN106503214A (en) * 2016-11-03 2017-03-15 北京中安智达科技有限公司 A kind of complex rule matching process based on Redis memory databases
CN107025243A (en) * 2016-02-02 2017-08-08 北京神州泰岳软件股份有限公司 A kind of querying method of resource data, inquiring client terminal and inquiry system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9639618B2 (en) * 2006-05-25 2017-05-02 International Business Machines Corporation System, method and program product for key word searching where a key word is a homonym

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046812A (en) * 2006-06-12 2007-10-03 华为技术有限公司 Method of data base table recording structure and detection and its device
CN104361004A (en) * 2014-10-11 2015-02-18 北京奇虎科技有限公司 Browser favorite data processing method and browser
CN105260475A (en) * 2015-10-30 2016-01-20 努比亚技术有限公司 Data searching method, data saving method and related equipment
CN105868225A (en) * 2015-11-18 2016-08-17 乐视体育文化产业发展(北京)有限公司 Data query method, client, server and system
CN105468764A (en) * 2015-12-02 2016-04-06 广州华多网络科技有限公司 Data processing method and apparatus and cluster service system
CN107025243A (en) * 2016-02-02 2017-08-08 北京神州泰岳软件股份有限公司 A kind of querying method of resource data, inquiring client terminal and inquiry system
CN106294565A (en) * 2016-07-27 2017-01-04 中国农业银行股份有限公司 A kind of data bank access method and system
CN106453512A (en) * 2016-09-05 2017-02-22 努比亚技术有限公司 Redis cluster information monitoring device and method
CN106503214A (en) * 2016-11-03 2017-03-15 北京中安智达科技有限公司 A kind of complex rule matching process based on Redis memory databases

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
分布式内存数据库的设计与实现;别小凡;《中国优秀硕士学位论文全文数据库 信息科技辑》;20150315(第03期);第I138-1159页 *

Also Published As

Publication number Publication date
CN107679203A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
CN109542529B (en) Function name-based point burying method and device, computer equipment and storage medium
US10140118B2 (en) Application data synchronization method and apparatus
AU2012343085B2 (en) Method, device and storage medium for adding friends
CN106959963B (en) Data query method, device and system
CN107679203B (en) Redis internal database calling method and system
US9858342B2 (en) Method and system for searching for applications respective of a connectivity mode of a user device
CN105279278A (en) File searching method and device
CN107423070B (en) Page generation method and device
CN112035420B (en) Data sharing method, sharing device and system
CN105224609A (en) Index query method and device
WO2019161620A1 (en) Application dependency update method, terminal and device, and storage medium
CN108228770A (en) A kind of method and device of application file source inquiry
WO2017166619A1 (en) Method and apparatus for determining emergency communication numbers, and electronic device
CN112905441A (en) Test case generation method, test method, device and equipment
US20140365445A1 (en) Server with file managing function and file managing method
US12089143B2 (en) Network search method and apparatus, device and storage medium
CN114756333A (en) Mirror image processing method and device, electronic equipment and readable medium
CN110688201A (en) Log management method and related equipment
CN117056383B (en) Searching method and electronic equipment
CN109388558A (en) A kind of method, apparatus, equipment and storage medium managing electronic equipment
CN103377052A (en) Method and system for automatically downloading adaptive application programs on basis of file synchronization service
CN104572661A (en) Terminal equipment and information processing method
CN113360061B (en) Language switching method and device
CN109325057B (en) Middleware management method, device, computer equipment and storage medium
CN108322380B (en) Method and device for calling data and method and device for pushing information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20180209

Assignee: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Contract record no.: X2021980000151

Denomination of invention: A method and system for calling redis internal database

Granted publication date: 20201113

License type: Common License

Record date: 20210107