CN111125095A - Data prefix adding method and device, electronic equipment and medium - Google Patents

Data prefix adding method and device, electronic equipment and medium Download PDF

Info

Publication number
CN111125095A
CN111125095A CN201911170882.5A CN201911170882A CN111125095A CN 111125095 A CN111125095 A CN 111125095A CN 201911170882 A CN201911170882 A CN 201911170882A CN 111125095 A CN111125095 A CN 111125095A
Authority
CN
China
Prior art keywords
key value
prefix information
target key
configuration file
target
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.)
Granted
Application number
CN201911170882.5A
Other languages
Chinese (zh)
Other versions
CN111125095B (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.)
Beijing Wenyuanjia Technology Co Ltd
Original Assignee
Beijing Wenyuanjia 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 Beijing Wenyuanjia Technology Co Ltd filed Critical Beijing Wenyuanjia Technology Co Ltd
Priority to CN201911170882.5A priority Critical patent/CN111125095B/en
Publication of CN111125095A publication Critical patent/CN111125095A/en
Application granted granted Critical
Publication of CN111125095B publication Critical patent/CN111125095B/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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • Educational Technology (AREA)
  • Educational Administration (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Human Resources & Organizations (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method and a device for adding data prefixes, electronic equipment and a medium. In the application, after key value parameters used for representing prefix information and corresponding to each key value in the Redis system are obtained, a target key value which does not contain prefix information in each key value can be selected based on the key value parameters corresponding to each key value, and corresponding prefix information is added to the target key value based on a configuration file corresponding to the target key value. By applying the technical scheme of the application, when the fact that the Redis system contains the key value without the prefix information is detected, the prefix information stored in the configuration file of the Redis system can be added to the corresponding key value. And further, the problem of low efficiency of searching for the target key value when a large number of key values are faced in the related technology can be solved.

Description

Data prefix adding method and device, electronic equipment and medium
Technical Field
The present application relates to data processing technologies, and in particular, to a method and an apparatus for adding a data prefix, an electronic device, and a medium
Background
Due to the rise of the communications era and society, more and more people will choose to learn new knowledge using online education of networks.
Among them, in online education over networks, a server-side solution based on a distributed caching technology is basically essential in order to cope with a solution for a large number of concurrent accesses. For example, developers typically choose to utilize the Redis system to process data for better service to users. Redis is an open-source, high-performance key-value store (key-value store) system, among other things. All key values of Redis are stored in the memory, and the single-computer read-write performance is very high. The Key value Key of Redis includes not only a string (strings) type, but also data types such as hash (hashes), list (lists), sets (sets), and ordered sets (sorted sets).
However, in the process of using Redis by developers, a huge amount of key values are often generated and each serves a corresponding business. Due to the fact that the number of the key assignments is large, the problem that query efficiency is low easily occurs when developers query the key assignments in the later period is also caused.
Disclosure of Invention
The embodiment of the application provides a method and a device for adding a data prefix, electronic equipment and a medium.
According to an aspect of the embodiments of the present application, a method for adding a data prefix is provided, which includes:
obtaining a key value parameter corresponding to at least one key value in a Redis system, wherein the key value parameter is used for representing prefix information corresponding to the key value;
selecting a target key value based on a key value parameter corresponding to the at least one key value, wherein the target key value is a key value which does not contain prefix information in the at least one key value;
and adding corresponding prefix information for the target key value based on the configuration file corresponding to the target key value.
Optionally, in another embodiment based on the foregoing method of the present application, the adding prefix information to the target key value based on the configuration file corresponding to the target key value includes:
acquiring a configuration file corresponding to the target key value;
detecting whether the configuration file contains first prefix information of the target key value;
and if so, adding the first prefix information into a corresponding target key value.
Optionally, in another embodiment based on the foregoing method of the present application, after the detecting whether the configuration file includes prefix information of the target key value, the method further includes:
and when detecting that the configuration file does not contain prefix information of the target key value, generating a restart instruction, wherein the restart instruction is used for prompting a user to add the prefix information corresponding to the target key value in the configuration file.
Optionally, in another embodiment based on the foregoing method of the present application, the method further includes:
acquiring a service identifier corresponding to the target key value, wherein the service identifier is used for representing a service served by the target key value;
and detecting whether the configuration file contains second prefix information of the target key value or not based on the service identifier.
Optionally, in another embodiment based on the method described above, the method includes:
detecting the number of the business identifications corresponding to the target key values;
when detecting that the number of the service identifications exceeds a preset number, detecting whether the configuration file contains second prefix information of the target key value;
and if so, detecting the quantity of the second prefix information.
Optionally, in another embodiment based on the foregoing method of the present application, the method further includes:
when detecting that the number of second prefix information is lower than the preset number, generating the preset number of second prefix information based on the service identification, wherein each second prefix information corresponds to each service identification;
and adding the preset number of second prefix information into the corresponding target key value.
Optionally, in another embodiment based on the foregoing method of the present application, the method further includes:
and when a query instruction aiming at the target key value is received, acquiring the target key value based on prefix information corresponding to the target key value.
According to another aspect of the embodiments of the present application, an apparatus for data prefix addition is provided, which includes:
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a key value parameter corresponding to at least one key value in a Redis system, and the key value parameter is used for representing prefix information corresponding to the key value;
a selecting module configured to select a target key value based on a key value parameter corresponding to the at least one key value, where the target key value is a key value that does not include prefix information in the at least one key value;
and the adding module is used for adding corresponding prefix information for the target key value based on the configuration file corresponding to the target key value.
According to another aspect of the embodiments of the present application, there is provided an electronic device including:
a memory for storing executable instructions; and
a display for displaying with the memory to execute the executable instructions to perform the operations of any of the above-described methods of data prefix addition.
According to a further aspect of the embodiments of the present application, there is provided a computer-readable storage medium for storing computer-readable instructions, which when executed, perform the operations of any one of the above-mentioned data prefix adding methods.
In the application, after key value parameters used for representing prefix information and corresponding to each key value in the Redis system are obtained, a target key value which does not contain prefix information in each key value can be selected based on the key value parameters corresponding to each key value, and corresponding prefix information is added to the target key value based on a configuration file corresponding to the target key value. By applying the technical scheme of the application, when the fact that the Redis system contains the key value without the prefix information is detected, the prefix information stored in the configuration file of the Redis system can be added to the corresponding key value. And further, the problem of low efficiency of searching for the target key value when a large number of key values are faced in the related technology can be solved.
The technical solution of the present application is further described in detail by the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application.
The present application may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a system architecture for data prefix addition according to the present application;
fig. 2 is a schematic diagram of a data prefix adding method proposed in the present application;
FIG. 3 is a schematic structural diagram of a device for data prefix addition according to the present application;
fig. 4 is a schematic view of an electronic device according to the present application.
Detailed Description
At least one exemplary embodiment of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise.
Also, it should be understood that the dimensions of at least one of the elements shown in the figures are not drawn to scale for ease of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In addition, technical solutions between at least one embodiment of the present application may be combined with each other, but must be based on the realization of the capability of a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not be within the protection scope of the present application.
It should be noted that all the directional indications (such as up, down, left, right, front, and rear … …) in the embodiments of the present application are only used to explain the relative position relationship, motion situation, and the like between at least one component in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indication is changed accordingly.
A method for data prefix addition according to an exemplary embodiment of the present application is described below in conjunction with fig. 1-2. It should be noted that the following application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
The application also provides a method, a device, a target terminal and a medium for adding the data prefix.
Fig. 1 schematically shows a flowchart of a method for data prefix addition according to an embodiment of the present application. As shown in fig. 1, the method includes:
s101, obtaining a key value parameter corresponding to at least one key value in the Redis system, wherein the key value parameter is used for representing prefix information corresponding to the key value.
It should be noted that, in the present application, a device for acquiring a key value parameter corresponding to at least one key value in a Redis system is not specifically limited, and may be, for example, an intelligent device or a server. The intelligent device may be a PC (Personal Computer), a smart phone, a tablet Computer, an e-book reader, and an MP3(Moving Picture Experts Group audio layer III) data prefix adder. MP4(Moving Picture expert group Audio Layer IV), a device for adding data prefix, a portable terminal device such as a portable computer with a display function, and the like.
Furthermore, Redis is an open-source non-relational database which is written by ANSI, supports network, is based on memory, supports persistent log type and Key-Value storage (Key-Value), and can acquire a corresponding Value (Value) stored in the Redis database through a Key name or a primary Key (Key). In the traditional relational databases such as Oracle, MySQL, SQLServer and the like, complex data structures are classified into a binary relation, namely a two-dimensional table form, data operation is established in one or more relational tables, and data processing is realized through operations such as classification, combination, connection, selection and the like among the tables.
In the internet online education scenario, some data that is frequently displayed and/or is not frequently changed needs to be stored in a cache (or storage service) with a faster access speed, and the Redis is often used to store the data due to its advantages in terms of obtaining resources, facilitating performance optimization, and other key factors. For example, when the user can obtain the video for teaching based on the user name (Identity, ID) of both parties participating in the teaching in the video data for teaching, the course information and the user information can be cached in Redis. For viewing by the user.
In the application, key value parameters corresponding to at least one individual key value in the Redis system can be obtained, wherein the key value parameters are used for representing whether the corresponding key value has prefix information. It can be understood that there are a large number of Key values Key in the Redis system. There may be a key value containing prefix information, and there may also be a key value not containing prefix information. In the application, the key value parameter corresponding to each key value in the Redis system can be traversed first, so that the corresponding key value is selected subsequently according to the key value parameter.
And S102, selecting a target key value based on a key value parameter corresponding to at least one key value, wherein the target key value is the key value which does not contain prefix information in the at least one key value.
The method and the device aim to solve the problem that efficiency of searching for the target key values is low when a large number of key values are faced in the related technology. According to the method and the device, the target key value which does not contain prefix information in at least one key value can be obtained based on the key value parameter corresponding to the at least one key value.
It should be noted that the method for selecting the target key value is not specifically limited in the present application, and for example, the method may be to screen out the key values including the prefix information from at least one key value, so as to obtain the target key value. Or selecting a key value without prefix information from at least one key value to further obtain the target key value.
And S103, adding corresponding prefix information to the target key value based on the configuration file corresponding to the target key value.
Further, in the present application, in order to add corresponding prefix information to each target key value, a plurality of prefix information may be extracted from a pre-generated configuration file. And correspondingly adding each prefix information into the target key value. So as to ensure that each target key value is distributed with corresponding prefix information.
In the application, after key value parameters used for representing prefix information and corresponding to each key value in the Redis system are obtained, a target key value which does not contain prefix information in each key value can be selected based on the key value parameters corresponding to each key value, and corresponding prefix information is added to the target key value based on a configuration file corresponding to the target key value. By applying the technical scheme of the application, when the fact that the Redis system contains the key value without the prefix information is detected, the prefix information stored in the configuration file of the Redis system can be added to the corresponding key value. And further, the problem of low efficiency of searching for the target key value when a large number of key values are faced in the related technology can be solved.
Optionally, in a possible implementation manner of the present application, in S103 (based on a configuration file corresponding to the target key value, prefix information is added to the target key value), the generation may be performed in the following manner:
acquiring a configuration file corresponding to a target key value;
detecting whether a configuration file contains first prefix information of a target key value;
and if so, adding the first prefix information into the corresponding target key value.
Further, in the present application, in order to add corresponding prefix information to each target key value, a plurality of prefix information may be extracted from a pre-generated configuration file. And correspondingly adding each prefix information into the target key value to ensure that each target key value is distributed with the corresponding prefix information.
Further, the method and the device for determining the first prefix information of the target key value can firstly obtain a configuration file corresponding to the target key value, and find out whether the first prefix information of the target key value is included in the configuration file. It can be understood that when the first prefix information including the target key value in the configuration file is detected, the first prefix information may be added to the corresponding target key value.
Further optionally, when it is detected that the configuration file does not contain prefix information of the target key value, a restart instruction is generated, where the restart instruction is used to prompt a user to add prefix information corresponding to the target key value in the configuration file.
When it is detected that the configuration file does not contain the first prefix information of the target key value, in order to ensure that each target key value is configured with the prefix information, a restart instruction for prompting a user to add the prefix information corresponding to the target key value in the configuration file may be generated. It can be understood that the restart instruction can be displayed for the user in a preset mode after being generated. For example, the reminding is broadcasted by voice, and reminding icons are displayed.
In a possible embodiment of the present application, after the application S102 (selecting a target key value based on a key value parameter corresponding to at least one key value), the application further provides a method for adding a data prefix, as shown in fig. 2, the method includes:
s201, obtaining a key value parameter corresponding to at least one key value in the Redis system.
S202, selecting a target key value based on the key value parameter corresponding to at least one key value.
S203, acquiring a service identifier corresponding to the target key value, wherein the service identifier is used for representing the service served by the target key value.
Further, after the target key value not containing the prefix information is obtained, a certain key value may exist in a plurality of service services simultaneously. That is, when the user queries the key value, the user may miss the key value due to the unknown service. For example, when the target key value X corresponds to the service a, the service B, and the service C at the same time, and the user does not know the service where the key value X is located, if the user deletes the service a and the service B where the key value X is located after the determination is completed, the service C may not be operated.
Therefore, in order to avoid the problem that the business efficiency is affected because the target key value simultaneously corresponds to a plurality of services, the business identifier corresponding to the target key value can be obtained first in the application. As can be understood, the service identifier is a service served for characterizing the target key. For example there may be storage services, analysis services, processing services, etc.
In addition, the number of the service identifiers is not specifically limited in the present application, and may be, for example, 1 or more.
In addition, the method for obtaining the service identifier is not specifically limited in the same manner, for example, the service identifier may be set in a key value parameter of the target key value, and the service identifier may also be obtained by a user by querying information stored in the server.
S204, based on the service identifier, detecting whether the configuration file contains second prefix information of the target key value.
Optionally, in the process of detecting whether the configuration file includes the second prefix information of the target key value based on the service identifier in the present application, the following steps may be performed:
detecting the number of the business identifications corresponding to the target key values;
when the number of the service identifications is detected to exceed the preset number, whether the configuration file contains second prefix information of the target key value is detected;
and if so, detecting the quantity of the second prefix information.
Further, after the service identifier corresponding to the target key value is obtained, the number of the service identifiers can be further detected. And when determining that the number of the service identifiers exceeds the preset number, detecting whether the configuration file contains the second prefix information with the number.
It should be noted that the preset number is not specifically limited in the present application, and for example, the number may be 2, or 5.
It can be understood that the reason for further acquiring the number of the second prefix information is to avoid the problem that the service efficiency is affected because the target key value corresponds to multiple services at the same time. In other words, when it is detected that the target key value corresponds to multiple services at the same time, multiple pieces of prefix information need to be added to the target key value in the following, so that the user can know all services of the key value service. This also avoids that when the user uses redis, different services use keys without prefixes, causing at least one service to be mixed together, which is inconvenient for managing and governing the key values.
S205, when it is detected that the number of the second prefix information is lower than the preset number, generating a preset number of second prefix information based on the service identifier, where each second prefix information corresponds to each service identifier.
Further, in the present application, when it is detected that the number of the second prefix information is lower than the preset number, the preset number of second prefix information may be generated for the target key value. It should be noted that, each second prefix information corresponds to each service identifier.
Further, the method for generating the second prefix information is not specifically limited in the present application, and for example, a plurality of corresponding second prefix information may be generated according to the service type corresponding to each service identifier and the random code technology. Alternatively, a plurality of corresponding second prefix information and the like may be generated according to the service name and the random code technique corresponding to each service identifier. It should be noted that the variation of the manner of generating the preset number of second prefix information does not affect the protection scope of the present application.
And S206, adding a preset number of second prefix information into the corresponding target key value.
Further, after a preset number of second prefix information is generated based on the service identifier, the multiple second prefix information may be respectively and correspondingly added to the affiliated target key values. Therefore, when a user inquires or manages the target key value subsequently, the user can know the service information of the key value service according to the plurality of second prefix information contained in the target key value.
And S207, when a query instruction aiming at the target key value is received, acquiring the target key value based on prefix information corresponding to the target key value.
Further, after a preset amount of second prefix information is added to the corresponding target key value, when a query instruction for the target key value is received, the corresponding target key value can be obtained according to the prefix information of the target key value. The method helps the developer to improve efficiency when the developer inquires or manages the target key value subsequently.
In the application, after key value parameters corresponding to at least one key value and used for representing prefix information in the Redis system are obtained, a target key value which does not contain the prefix information in the at least one key value can be selected based on the key value parameters corresponding to the at least one key value, and corresponding prefix information is added to the target key value based on a configuration file corresponding to the target key value. By applying the technical scheme of the application, when the fact that the Redis system contains the key value without the prefix information is detected, the prefix information stored in the configuration file of the Redis system can be added to the corresponding key value. And further, the problem of low efficiency of searching for the target key value when a large number of key values are faced in the related technology can be solved.
In another embodiment of the present application, as shown in fig. 4, the present application further provides a data prefix adding device. The device comprises an acquisition module 301, a selection module 302 and an addition module 303, wherein:
an obtaining module 301, configured to obtain a key value parameter corresponding to at least one key value in a Redis system, where the key value parameter is used to represent prefix information corresponding to the key value;
a selecting module 302, configured to select a target key value based on a key value parameter corresponding to the at least one key value, where the target key value is a key value that does not include prefix information in the at least one key value;
an adding module 303, configured to add corresponding prefix information to the target key value based on the configuration file corresponding to the target key value.
In the application, after key value parameters used for representing prefix information and corresponding to each key value in the Redis system are obtained, a target key value which does not contain prefix information in each key value can be selected based on the key value parameters corresponding to each key value, and corresponding prefix information is added to the target key value based on a configuration file corresponding to the target key value. By applying the technical scheme of the application, when the fact that the Redis system contains the key value without the prefix information is detected, the prefix information stored in the configuration file of the Redis system can be added to the corresponding key value. And further, the problem of low efficiency of searching for the target key value when a large number of key values are faced in the related technology can be solved.
In another embodiment of the present application, the adding module 303 includes:
an adding module 303, configured to obtain a configuration file corresponding to the target key value;
an adding module 303, configured to detect whether the configuration file contains first prefix information of the target key value;
an adding module 303, configured to add the first prefix information to the corresponding target key value as contained.
In another embodiment of the present application, the method further includes a generating module 304, wherein:
a generating module 304, configured to generate a restart instruction when detecting that the configuration file does not include prefix information of the target key value, where the restart instruction is used to prompt a user to add prefix information corresponding to the target key value in the configuration file.
In another embodiment of the present application, the selecting module 302 further includes:
a selecting module 302, configured to obtain a service identifier corresponding to the target key value, where the service identifier is used to characterize a service served by the target key value;
a selecting module 302, configured to detect whether the configuration file includes the second prefix information of the target key value based on the service identifier.
In another embodiment of the present application, the selecting module 302 further includes:
a selecting module 302 configured to detect the number of the service identifiers corresponding to the target key value;
a selecting module 302, configured to detect whether the configuration file includes second prefix information of the target key value when it is detected that the number of the service identifiers exceeds a preset number;
a selecting module 302 configured to detect the amount of the second prefix information if included.
In another embodiment of the present application, the selecting module 302 further includes:
a selecting module 302, configured to, when it is detected that the number of second prefix information is lower than the preset number, generate the preset number of second prefix information based on the service identifiers, where each second prefix information corresponds to each service identifier;
a selecting module 302 configured to add the preset number of second prefix information to the corresponding target key value.
In another embodiment of the present application, the selecting module 302 further includes:
a selecting module 302, configured to, when receiving a query instruction for the target key value, obtain the target key value based on prefix information corresponding to the target key value.
Fig. 4 is a block diagram illustrating a logical structure of an electronic device in accordance with an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, electronic device 400 may include one or more of the following components: a processor 401 and a memory 402.
Processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 402 is configured to store at least one instruction for execution by the processor 401 to implement the interactive special effect calibration method provided by the method embodiments of the present application.
In some embodiments, the electronic device 400 may further optionally include: a peripheral interface 403 and at least one peripheral. The processor 401, memory 402 and peripheral interface 403 may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 404, touch screen display 405, camera 406, audio circuitry 407, positioning components 408, and power supply 409.
The peripheral interface 403 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 401 and the memory 402. In some embodiments, processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402 and the peripheral interface 403 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 404 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 404 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 404 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 404 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 405 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to capture touch signals on or over the surface of the display screen 405. The touch signal may be input to the processor 401 as a control signal for processing. At this point, the display screen 405 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 405 may be one, providing the front panel of the electronic device 400; in other embodiments, the display screen 405 may be at least two, respectively disposed on different surfaces of the electronic device 400 or in a folded design; in still other embodiments, the display screen 405 may be a flexible display screen disposed on a curved surface or a folded surface of the electronic device 400. Even further, the display screen 405 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display screen 405 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 406 is used to capture images or video. Optionally, camera assembly 406 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 406 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 407 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 401 for processing, or inputting the electric signals to the radio frequency circuit 404 for realizing voice communication. For stereo capture or noise reduction purposes, the microphones may be multiple and disposed at different locations of the electronic device 400. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 407 may also include a headphone jack.
The positioning component 408 is used to locate the current geographic Location of the electronic device 400 for navigation or LBS (Location Based Service). The positioning component 408 may be a positioning component based on the GPS (global positioning System) of the united states, the beidou System of china, the graves System of russia, or the galileo System of the european union.
The power supply 409 is used to supply power to the various components in the electronic device 400. The power source 409 may be alternating current, direct current, disposable or rechargeable. When power source 409 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 400 also includes one or more sensors 410. The one or more sensors 410 include, but are not limited to: acceleration sensor 411, gyro sensor 412, pressure sensor 413, fingerprint sensor 414, optical sensor 415, and proximity sensor 416.
The acceleration sensor 411 may detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the electronic apparatus 400. For example, the acceleration sensor 411 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 401 may control the touch display screen 405 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 412 may detect a body direction and a rotation angle of the electronic device 400, and the gyro sensor 412 may cooperate with the acceleration sensor 411 to acquire a 3D motion of the user on the electronic device 400. From the data collected by the gyro sensor 412, the processor 401 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensors 413 may be disposed on a side bezel of the electronic device 400 and/or on a lower layer of the touch display screen 405. When the pressure sensor 413 is arranged on the side frame of the electronic device 400, a holding signal of the user to the electronic device 400 can be detected, and the processor 401 performs left-right hand identification or shortcut operation according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed at the lower layer of the touch display screen 405, the processor 401 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 405. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 414 is used for collecting a fingerprint of the user, and the processor 401 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 401 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, and the like. The fingerprint sensor 414 may be disposed on the front, back, or side of the electronic device 400. When a physical button or vendor Logo is provided on the electronic device 400, the fingerprint sensor 414 may be integrated with the physical button or vendor Logo.
The optical sensor 415 is used to collect the ambient light intensity. In one embodiment, the processor 401 may control the display brightness of the touch display screen 405 based on the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 405 is turned down. In another embodiment, the processor 401 may also dynamically adjust the shooting parameters of the camera assembly 406 according to the ambient light intensity collected by the optical sensor 415.
Proximity sensor 416, also known as a distance sensor, is typically disposed on the front panel of electronic device 400. The proximity sensor 416 is used to capture the distance between the user and the front of the electronic device 400. In one embodiment, the processor 401 controls the touch display screen 405 to switch from the bright screen state to the dark screen state when the proximity sensor 416 detects that the distance between the user and the front surface of the electronic device 400 gradually decreases; when the proximity sensor 416 detects that the distance between the user and the front of the electronic device 400 is gradually increased, the processor 401 controls the touch display screen 405 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 4 does not constitute a limitation of the electronic device 400, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, such as the memory 404, comprising instructions executable by the processor 420 of the electronic device 400 to perform the above-described method of data prefix addition, the method comprising: obtaining a key value parameter corresponding to at least one key value in a Redis system, wherein the key value parameter is used for representing prefix information corresponding to the key value; selecting a target key value based on a key value parameter corresponding to the at least one key value, wherein the target key value is a key value which does not contain prefix information in the at least one key value; and adding corresponding prefix information for the target key value based on the configuration file corresponding to the target key value. Optionally, the instructions may also be executable by the processor 420 of the electronic device 400 to perform other steps involved in the exemplary embodiments described above. Optionally, the instructions may also be executable by the processor 420 of the electronic device 400 to perform other steps involved in the exemplary embodiments described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided an application/computer program product comprising one or more instructions executable by the processor 420 of the electronic device 400 to perform the above-described method of data prefix addition, the method comprising: obtaining a key value parameter corresponding to at least one key value in a Redis system, wherein the key value parameter is used for representing prefix information corresponding to the key value; selecting a target key value based on a key value parameter corresponding to the at least one key value, wherein the target key value is a key value which does not contain prefix information in the at least one key value; and adding corresponding prefix information for the target key value based on the configuration file corresponding to the target key value. Optionally, the instructions may also be executable by the processor 420 of the electronic device 400 to perform other steps involved in the exemplary embodiments described above. Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for data prefix addition, comprising:
obtaining a key value parameter corresponding to at least one key value in a Redis system, wherein the key value parameter is used for representing prefix information corresponding to the key value;
selecting a target key value based on a key value parameter corresponding to the at least one key value, wherein the target key value is a key value which does not contain prefix information in the at least one key value;
and adding corresponding prefix information for the target key value based on the configuration file corresponding to the target key value.
2. The method of claim 1, wherein the adding prefix information to the target key value based on the configuration file corresponding to the target key value comprises:
acquiring a configuration file corresponding to the target key value;
detecting whether the configuration file contains first prefix information of the target key value;
and if so, adding the first prefix information into a corresponding target key value.
3. The method of claim 2, further comprising:
and when detecting that the configuration file does not contain prefix information of the target key value, generating a restart instruction, wherein the restart instruction is used for prompting a user to add the prefix information corresponding to the target key value in the configuration file.
4. The method of claim 2, further comprising:
acquiring a service identifier corresponding to the target key value, wherein the service identifier is used for representing a service served by the target key value;
and detecting whether the configuration file contains second prefix information of the target key value or not based on the service identifier.
5. The method of claim 4, wherein the detecting whether the configuration file contains the second prefix information of the target key value based on the service identifier comprises:
detecting the number of the business identifications corresponding to the target key values;
when detecting that the number of the service identifications exceeds a preset number, detecting whether the configuration file contains second prefix information of the target key value;
and if so, detecting the quantity of the second prefix information.
6. The method of claim 5, further comprising:
when detecting that the number of second prefix information is lower than the preset number, generating the preset number of second prefix information based on the service identification, wherein each second prefix information corresponds to each service identification;
and adding the preset number of second prefix information into the corresponding target key value.
7. The method of claims 1-6, further comprising:
and when a query instruction aiming at the target key value is received, acquiring the target key value based on prefix information corresponding to the target key value.
8. An apparatus for data prefix addition, comprising:
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a key value parameter corresponding to at least one key value in a Redis system, and the key value parameter is used for representing prefix information corresponding to the key value;
a selecting module configured to select a target key value based on a key value parameter corresponding to the at least one key value, where the target key value is a key value that does not include prefix information in the at least one key value;
and the adding module is used for adding corresponding prefix information for the target key value based on the configuration file corresponding to the target key value.
9. An electronic device, comprising:
a memory for storing executable instructions; and the number of the first and second groups,
a processor for display with the memory to execute the executable instructions to perform the operations of the method of data prefix addition as in any of claims 1-7.
10. A computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of the method of data prefix addition of any of claims 1-7.
CN201911170882.5A 2019-11-26 2019-11-26 Method, device, electronic equipment and medium for adding data prefix Active CN111125095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911170882.5A CN111125095B (en) 2019-11-26 2019-11-26 Method, device, electronic equipment and medium for adding data prefix

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911170882.5A CN111125095B (en) 2019-11-26 2019-11-26 Method, device, electronic equipment and medium for adding data prefix

Publications (2)

Publication Number Publication Date
CN111125095A true CN111125095A (en) 2020-05-08
CN111125095B CN111125095B (en) 2023-11-10

Family

ID=70496679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911170882.5A Active CN111125095B (en) 2019-11-26 2019-11-26 Method, device, electronic equipment and medium for adding data prefix

Country Status (1)

Country Link
CN (1) CN111125095B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114860782A (en) * 2022-07-04 2022-08-05 北京世纪好未来教育科技有限公司 Data query method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199957A (en) * 2014-09-17 2014-12-10 合一网络技术(北京)有限公司 Redis universal agent implementation method
US20170212680A1 (en) * 2016-01-22 2017-07-27 Suraj Prabhakar WAGHULDE Adaptive prefix tree based order partitioned data storage system
CN107357794A (en) * 2016-05-10 2017-11-17 北京京东尚科信息技术有限公司 Optimize the method and apparatus of the data store organisation of key value database
CN107688611A (en) * 2017-08-03 2018-02-13 杭州铭师堂教育科技发展有限公司 A kind of Redis key assignments management system and method based on saltstack
US20190087431A1 (en) * 2017-09-21 2019-03-21 Alibaba Group Holding Limited Systems, methods, and apparatuses for simplifying filesystem operations utilizing a key-value storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199957A (en) * 2014-09-17 2014-12-10 合一网络技术(北京)有限公司 Redis universal agent implementation method
US20170212680A1 (en) * 2016-01-22 2017-07-27 Suraj Prabhakar WAGHULDE Adaptive prefix tree based order partitioned data storage system
CN107357794A (en) * 2016-05-10 2017-11-17 北京京东尚科信息技术有限公司 Optimize the method and apparatus of the data store organisation of key value database
CN107688611A (en) * 2017-08-03 2018-02-13 杭州铭师堂教育科技发展有限公司 A kind of Redis key assignments management system and method based on saltstack
US20190087431A1 (en) * 2017-09-21 2019-03-21 Alibaba Group Holding Limited Systems, methods, and apparatuses for simplifying filesystem operations utilizing a key-value storage system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114860782A (en) * 2022-07-04 2022-08-05 北京世纪好未来教育科技有限公司 Data query method, device, equipment and medium

Also Published As

Publication number Publication date
CN111125095B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
CN107885533B (en) Method and device for managing component codes
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN111104402A (en) Method, device, electronic equipment and medium for searching data
CN112052354A (en) Video recommendation method, video display method and device and computer equipment
CN111192072A (en) User grouping method and device and storage medium
CN110597801B (en) Database system and establishing method and device thereof
CN110471614B (en) Method for storing data, method and device for detecting terminal
CN111064657B (en) Method, device and system for grouping concerned accounts
CN111008083B (en) Page communication method and device, electronic equipment and storage medium
CN111563201A (en) Content pushing method, device, server and storage medium
CN108495183B (en) Method and device for displaying album information
CN112925922A (en) Method, device, electronic equipment and medium for obtaining address
CN111125095B (en) Method, device, electronic equipment and medium for adding data prefix
CN112989198B (en) Push content determination method, device, equipment and computer-readable storage medium
CN110717110B (en) Multimedia resource filtering method and device, electronic equipment and storage medium
CN109618018B (en) User head portrait display method, device, terminal, server and storage medium
CN113836426A (en) Information pushing method and device and electronic equipment
CN113051485A (en) Group searching method, device, terminal and storage medium
CN111010732A (en) Network registration method, device, electronic equipment and medium
CN110968549A (en) File storage method and device, electronic equipment and medium
CN111191254A (en) Access verification method and device, computer equipment and storage medium
CN112135256A (en) Method, device and equipment for determining movement track and readable storage medium
CN111049970B (en) Method and device for operating equipment, electronic equipment and medium
CN110544108B (en) Social user classification method and device, electronic equipment and medium

Legal Events

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