CN110019179A - Update method and device, the electronic equipment, storage medium of index database - Google Patents
Update method and device, the electronic equipment, storage medium of index database Download PDFInfo
- Publication number
- CN110019179A CN110019179A CN201710638790.XA CN201710638790A CN110019179A CN 110019179 A CN110019179 A CN 110019179A CN 201710638790 A CN201710638790 A CN 201710638790A CN 110019179 A CN110019179 A CN 110019179A
- Authority
- CN
- China
- Prior art keywords
- user
- memory block
- target
- attribute values
- target attribute
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a kind of method and devices for updating index database, electronic equipment, storage medium.Wherein method includes: the user list received for being Target Attribute values by target user's attribute assignment, and the user list includes at least one user identifier;It creates at least one more new thread and is put into thread pool;Using the more new thread, first memory block is written into the corresponding relationship of the user identifier and the Target Attribute values and index is updated to the data in first memory block.
Description
Technical field
The invention relates to database technical field more particularly to a kind of method and devices for updating index database, electricity
Sub- equipment, storage medium.
Background technique
With the business development of the network platform (such as: for realizing the network platform of vehicles scheduling business), network is flat
The dimension of user volume and user data corresponding with each user on platform all constantly increases.Wherein, user data generally wraps
Several user properties (such as: name, age) are included, each user property can correspond to an attribute value.In business development
Cheng Zhong, user data can constantly change, and need to update database in time thus.In the related art, it updates a certain
The value of a dimension (user property) generally requires to carry out re-creating index to other a large amount of dimensions, increases the update of index database
It is time-consuming.
Summary of the invention
In view of this, the application provides a kind of method and device of update index database, electronic equipment, storage medium.
To achieve the above object, technical solution provided by the present application is as follows:
In one aspect, a kind of method for updating index database is provided, comprising:
The user list for by target user's attribute assignment being Target Attribute values is received, the user list includes at least
One user identifier;
It creates at least one more new thread and is put into thread pool;
Using the more new thread, the index is written into the corresponding relationship of the user identifier and the Target Attribute values
The first memory block in library simultaneously updates index to the data in first memory block.
In one aspect, a kind of device for updating index database is provided, comprising:
Receiving unit, for receiving the user list for by target user's attribute assignment being Target Attribute values, the use
Family list includes at least one user identifier;
Thread creation unit, for creating at least one more new thread and being put into thread pool;
First updating unit, for the more new thread described in, by pair of the user identifier and the Target Attribute values
It should be related to the first memory block being written in the index database and index is updated to the data in first memory block.
In one aspect, a kind of electronic equipment is provided, comprising:
Processor;
Memory for storage processor executable instruction;
The processor is configured to:
The user list for by target user's attribute assignment being Target Attribute values is received, the user list includes at least
One user identifier;
It creates at least one more new thread and is put into thread pool;
Using the more new thread, the index is written into the corresponding relationship of the user identifier and the Target Attribute values
The first memory block in library simultaneously updates index to the data in first memory block.
In one aspect, a kind of computer storage medium is provided, computer program is stored thereon with, the computer program
Following steps are realized when being executed by processor:
The user list for by target user's attribute assignment being Target Attribute values is received, the user list includes at least
One user identifier;
It creates at least one more new thread and is put into thread pool;
Using the more new thread, the index is written into the corresponding relationship of the user identifier and the Target Attribute values
The first memory block in library simultaneously updates index to the data in first memory block.
Through above technical scheme as can be seen that when needing to be updated target user's attribute in user data,
Can be by for by target user's attribute assignment being the user list of Target Attribute values, and more new thread is created, it is final to utilize
More new thread is updated the first memory block in the index database and makees index upgrade.It does not need in the above process to it
The user data that he does not need in the dimension updated is indexed update, greatly improves the efficiency of data update.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the method for update index database shown according to an exemplary embodiment;
Fig. 2 is the flow chart according to another method for updating index database shown in an exemplary embodiment;
Fig. 3 is the structure according to the electronic equipment shown in an exemplary embodiment;
Fig. 4 is a kind of module map of the device of update index database shown according to an exemplary embodiment;
Fig. 5 is the module map according to another device for updating index database shown in an exemplary embodiment.
Specific embodiment
For the user of the network platform, each user property of user can be defined as one " dimension " (dimension), often
The user data of a user can be made of the data of multiple " dimensions ", and each " dimension " can correspond to a kind of user property of user.
Herein by by network implementations to the platform of the scheduling of the vehicles (such as vehicle) for the technical program is introduced.It is handing over
For each user of logical tool dispatching platform, user property can include: gender, the age, city, consumption type, user tag,
The expense etc. that the frequency of maneuver traffic tool, maneuver traffic tool generate, each user property corresponds to an attribute value, e.g.,
Age: 28, city: Beijing.
In the network platform, it usually needs stamp a user tag to each user, user is assigned to different classes
Not.Based on user tag, can in order to be screened to certain types of user, and in order to realize more efficient data analysis with
And query function, it generally requires to construct index (index) to user data, to realize the analysis and inquiry of second grade.It is sent out in business
During exhibition, user data can constantly change, and need to update database in time thus.In the related art, it updates
The value of some dimension (user property) generally requires to carry out re-creating index to other a large amount of dimensions, increases index database
It updates time-consuming.It is proposed to this end that following technical solution of the invention, to improve data updating efficiency.
Fig. 1 is a kind of flow chart of the method for update index database shown according to an exemplary embodiment, and this method is held
Row main body can for all kinds of electronic equipments (such as the network equipment, server, server cluster, user equipment, terminal device or other
The calculating equipment of type).As shown in Figure 1, in one embodiment, this method can be by 101~step 103 of following step come real
It is existing, in which:
In a step 101, the user list for by target user's attribute assignment being Target Attribute values is received, wherein institute
Stating user list may include at least one user identifier.
In one embodiment, the index database can be ElasticSearch (referred to as ES in text) index database.Wherein,
ES is an expansible open source search engine.ES can construct rope using inverted index (Inverted index) mode
Draw.Wherein, ES index database may include multiple ES nodes, and each ES node can be responsible for the data of one index fragment of storage.
Although in the network platform there are many kinds of the user properties of each user, actually data variation frequency is relatively high
User property and few.In the present embodiment, target user's attribute can refer to the relatively high user property of change frequency,
Determine target user's attribute mode include it is very much, be exemplified below several: 1., by operation personnel rule of thumb judging which is used
The change frequency of family attribute is relatively high, is chosen to be target user's attribute.2., count using big data each user and belong to
Property variation frequency, and carry out ranking from high to low according to frequency, the user property of preceding n (n >=1) position may finally be taken, as
The relatively high target user's attribute of change frequency.In one embodiment, target user's attribute includes but is not limited to: Yong Hubiao
Label (as: the labels such as consumption type belonging to black list user, white list user or user).
In one embodiment, above-mentioned user list can be uploaded to point by user (i.e. the operational staff of data update action)
Cloth file system (Hadoop Distributed File System, HDFS), and be inserted into mysql by user one with
The corresponding Target Attribute values of target user's attribute.Wherein, user list can also be other than being uploaded by user according to specific rule
Then generate.
In a step 102, it creates at least one more new thread and is put into thread pool.It, can be with to improve index upgrade speed
Create multiple threads that can be executed parallel.Per thread from HDFS for successively reading user's column according to certain sequence
User identifier in table, and data update action is carried out one by one to each user identifier.
In step 103, using the more new thread, by the corresponding relationship of the user identifier and the Target Attribute values
The first memory block in the index database is written and index is updated to the data in first memory block.
In an optional embodiment, the step 103 can specifically include step 131 and step 132, in which:
Step 131: setting lattice being met to each user identifier generation in the user list using the more new thread
The message of formula, wherein the message includes the user identifier and the Target Attribute values.
For example, identifying for each of user list user (driver or passenger), more new thread can construct as follows
The message of format: { " passenger_id ": " 12345 ", " tags ": [" tag_id "] }.Wherein, " 12345 " are user list
In some user identifier, " tag_id " refers to Target Attribute values.
Step 132: Xiang Suoshu index database sends the message, with first memory block be written the user identifier and
The corresponding relationship of the Target Attribute values.
As it can be seen that when needing to be updated target user's attribute in user data, it can be by for target to be used
Family attribute assignment is the user list of Target Attribute values, and creates more new thread, final to be updated institute using more new thread
It states the first memory block in index database and makees index upgrade.It is not needed in the above process in the dimension for not needing to update to other
User data be indexed update, greatly improve data update efficiency.
101~step 103 of above-mentioned steps can daily in be performed a number of times.When user needs based on target user's attribute
(such as user tag) when inquiring, can inquire newest data from the first memory block in above-mentioned index database.
In an optional embodiment, after step 101, the method can also include step 11 and step 12,
In:
Step 11: obtaining current version ID corresponding with the Target Attribute values.
It changed may be asked to solve the corresponding user group's (i.e. user id list) of the same Target Attribute values
Topic, such as: some Target Attribute values is " blacklist ", which may often change.To solve this problem, we give
" blacklist " this Target Attribute values increase corresponding revision ID.Also, the revision ID can be continuously updated.
Step 12: according to current version ID, determining revision ID to be updated corresponding with the Target Attribute values.
For any one Target Attribute values x, when the Target Attribute values are increased newly (without older version before i.e.)
When, when indicating the Target Attribute values, it can be denoted as " x_1 ", wherein " 1 " in " x_1 " can represent the target category
The revision ID of property value x.(such as: uploading Target Attribute values again when the user group that Target Attribute values x is covered changes
For the user list of x), then revision ID to be updated corresponding with the Target Attribute values is " 2 ", and so on.That is, to
Update revision ID=current version ID+1.
Correspondingly, in the present embodiment, step 103 can be with specifically: using the more new thread, by the user identifier
Corresponding relationship between the Target Attribute values comprising the revision ID to be updated is written first memory block, and to described the
Data in one memory block update index.
After carrying out version management using revision ID, more new thread can construct the message of following format: "
passenger_id":"12345","tags":["tag_id_version"]}.Wherein, " tag_id_version " is contained
Revision ID and Target Attribute values.
By setting a revision ID for Target Attribute values, and some target user's attribute in the first memory block is carried out
After data update, it is the user of " x " if necessary to searched targets attribute value, then can takes out the objective attribute target attribute from mysql
The latest edition ID of value, and inquired using latest edition ID.For example, latest edition ID is 10, then what is inquired is target
Attribute value is all users of " x_10 ".
In one embodiment, in order to which whether verify data renewal process succeeds, after above-mentioned steps 103, the method
It can also include step 21~step 23, in which:
Step 21: generate query statement, the query statement for inquire in first memory block with comprising it is described to
Update the corresponding number of users of Target Attribute values of revision ID.
For example, the query statement generated can be DSL (domain specific languages, field language-specific)
Sentence.
Step 22: executing the query statement, the number of users is obtained with inquiry.
Step 23: if the number of users is equal to the number of users that the user list includes, determining that data are updated successfully;It is no
Then, determine that data update failure.
The first memory block can be inquired every certain time length, obtain the corresponding value of target user's attribute being inserted into
Are as follows: the number of users of " tag_id_version ".Wherein it is possible to obtain the number and/or continuous return value that continuous-query fails
Equal number.If the number of users for including in the number of users and user list that return is equal, finished it may be considered that establishing index
(i.e. data are updated successfully), setting up vertical Index Status is " success ".If the number of continuous-query failure reaches certain value, or continuous
The equal number of inquiry return value reach certain value and the number of users that returns is not equal to the number of users for including in user list,
Then think to establish index failure (i.e. data update failure).After determining that data update failure, user can be sent notification to, with
Data are updated again.
Fig. 2 is the flow chart according to another method for updating index database shown in an exemplary embodiment.This method
Executing subject can for all kinds of electronic equipments (such as the network equipment, server, server cluster, user equipment, terminal device or its
The calculating equipment of his type).
As shown in Fig. 2, this method can be realized by 201~step 202 of following step.Realizing step 201 and step
Before rapid 202, the index database further includes one second memory block, and the number of the user property of second memory block storage is greater than institute
State the number of the user property of the first memory block storage.In one embodiment, the second memory block can be used to store whole users
The data of attribute, and the first memory block is then used to store the higher one or more target user's attributes of renewal frequency.Wherein, institute
Stating the user property stored in the second memory block includes but is not limited to one or more of: user's gender, age of user, user
The area at place, user tag, the frequency for participating in vehicles scheduling events, the number for participating in vehicles scheduling events.
In step 201, it when the execution time of timed task arrives, obtains each user and belongs to about the target user
The newest attribute value of property.
Wherein, the fixed time interval of the timed task can be one day, then executing the time can be for a time point (such as
23:00:00) or some period.
Because certain user may be by more in the assignment (i.e. attribute value) of target user's attribute (such as: user tag)
Newly, still, it often only being updated in the first memory block, the second memory block may still remain original data, this
When, newest attribute value of all users on this dimension of user tag can be collected into from HDFS.Receiving correlation
After data, the mechanism of inverted index similar can be established, a hive table is written into the data being collected into, wherein a column are to use
Family id, another column are user tags, then, the hive table and the user data of other dimensions are merged, finally led together
Enter in the second memory block into index database.Wherein, " newest attribute value " can be defined as: in the execution time of timed task
When arrival, attribute value that target user's attribute is endowed in the execution time recent renewal time point.
In step 202, the newest attribute value using each user got about target user's attribute, to institute
It states the user data in the second memory block and is indexed update.
After step 202, DSL sentence can be constructed, every currently being indexed ES of a Duan Shichang (such as 5 minutes) inquiry
Number of files, when the equal times for the result that inquiry returns reach certain value, it is believed that write-in terminates, and according to inquiry user
The ratio of number and user's number of actual needs write-in, judges whether that data are written successfully, and report user.
As it can be seen that by being updated the data of the higher target user's attribute of renewal frequency within a short period of time to the first storage
Area, and the newest attribute by the timed task of a longer fixed time interval by each user about target user's attribute
Value is updated to the second memory block, so that the dimension often changed in user characteristics and independent point of dimension infrequently changed
It Gou Jian not index and store, both be able to satisfy the requirement of data updating efficiency, and the dimension for often changing in user characteristics,
As long as renewal process also carries out rebuilding index to the field of a small amount of several variations again.Can will own by timed task
Effective user tag is updated into the second memory block, also, the higher user tag of renewal frequency is carried out real-time update and is arrived
First memory block.Most user tag is inquired, it is only necessary to be inquired from the second memory block, guarantee data
It may also be ensured that efficiency data query is unaffected while timely updating.
Fig. 3 is the structure according to the electronic equipment shown in an exemplary embodiment.As shown in figure 3, in one embodiment, one
Kind electronic equipment, it may include processor, internal bus, network interface, memory (including memory and nonvolatile memory),
Certainly it is also possible that hardware required for other business.Processor reads corresponding computer journey from nonvolatile memory
Then sequence is run into memory.
In one embodiment, the processor is configured to:
The user list for by target user's attribute assignment being Target Attribute values is received, the user list includes at least
One user identifier;
It creates at least one more new thread and is put into thread pool;
Using the more new thread, the index is written into the corresponding relationship of the user identifier and the Target Attribute values
The first memory block in library simultaneously updates index to the data in first memory block.
Certainly, other than software realization mode, the application is not precluded other implementations, for example, logical device or
Mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each logic unit,
It can be hardware or logical device.
As shown in figure 4, a kind of device of update index database formed in software logic level is also provided, in an embodiment
In, a kind of device 300 updating index database can include:
Receiving unit 301, it is described for receiving the user list for by target user's attribute assignment being Target Attribute values
User list includes at least one user identifier;
Thread creation unit 302, for creating at least one more new thread and being put into thread pool;
First updating unit 303, for using the more new thread, by the user identifier and the Target Attribute values
Corresponding relationship is written the first memory block in the index database and updates index to the data in first memory block.
As shown in figure 5, on the basis of fig. 4, a kind of device 300 updating index database can include:
Timing acquisition unit 304, for obtaining each user about the mesh in the execution time arrival of timed task
Mark the newest attribute value of user property;
Second updating unit 305, for the newest category using each user got about target user's attribute
Property value, is indexed update to the user data in second memory block.
Wherein, the index database further includes the second memory block, and the number of the user property of the second memory block storage is big
In the number of the user property of first memory block storage.
Optionally, target user's attribute is user tag.
Optionally, the user property stored in second memory block includes one or more of: user's gender, user
The frequency in area, user tag, participation vehicles scheduling events where age, user participates in vehicles scheduling events
Number.
Optionally, first updating unit 303 includes:
Message generation unit, for generating symbol to each user identifier in the user list using the more new thread
The message of setting format is closed, the message includes the user identifier and the Target Attribute values;
Message sending unit, for sending the message to the index database, described in being written in first memory block
The corresponding relationship of user identifier and the Target Attribute values.
Optionally, described device 300 further include:
Revision ID acquiring unit, for obtaining current version ID corresponding with the Target Attribute values;
Revision ID determination unit, for according to the current version ID, determination to be corresponding with the Target Attribute values to more
New version ID;
First updating unit 303 is specifically used for:
It, will be between the user identifier and Target Attribute values comprising the revision ID to be updated using the more new thread
Corresponding relationship first memory block is written.
Optionally, described device 300 further include:
Sentence generation unit, for generating query statement, the query statement for inquire in first memory block with
The corresponding number of users of Target Attribute values comprising the revision ID to be updated;
Sentence execution unit obtains the number of users for executing the query statement with inquiry;
Task result determination unit, for determining when the number of users is equal to the number of users that the user list includes
Data are updated successfully;Otherwise, it determines data update failure.
In one embodiment, a kind of computer storage medium is additionally provided, computer program is stored thereon with, the computer
Following steps are realized when program is executed by processor:
The user list for by target user's attribute assignment being Target Attribute values is received, the user list includes at least
One user identifier;
It creates at least one more new thread and is put into thread pool;
Using the more new thread, the index is written into the corresponding relationship of the user identifier and the Target Attribute values
The first memory block in library simultaneously updates index to the data in first memory block.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for computer
For apparatus embodiments, Installation practice, computer storage medium embodiment, since it is substantially similar to the method embodiment, institute
To be described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM).Memory is showing for computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitorymedia), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group
Part, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage equipment.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art
For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal
Replacement, improvement etc., should be included within the scope of the claims of this application.
Claims (16)
1. a kind of method for updating index database, which is characterized in that the described method includes:
The user list for by target user's attribute assignment being Target Attribute values is received, the user list includes at least one
User identifier;
It creates at least one more new thread and is put into thread pool;
Using the more new thread, the corresponding relationship of the user identifier and the Target Attribute values is written in the index database
The first memory block and in first memory block data update index.
2. the method according to claim 1, wherein the index database further includes the second memory block, described second
The number of the user property of memory block storage is greater than the number of the user property of first memory block storage;
The method also includes:
When the execution time of timed task arrives, newest attribute value of each user about target user's attribute is obtained;
Newest attribute value using each user got about target user's attribute, in second memory block
User data is indexed update.
3. the method according to claim 1, wherein target user's attribute is user tag.
4. according to the method described in claim 2, it is characterized in that, the user property stored in second memory block include with
Under it is one or more: area, user tag where user's gender, age of user, user participate in vehicles scheduling events
Frequency or the number for participating in vehicles scheduling events.
5. the method according to claim 1, wherein described utilize the more new thread, by the user identifier
The first memory block being written in the index database with the corresponding relationship of the Target Attribute values includes:
The message for meeting setting format is generated to each user identifier in the user list using the more new thread, it is described
Message includes the user identifier and the Target Attribute values;
The message is sent to the index database, the user identifier and the objective attribute target attribute is written in first memory block
The corresponding relationship of value.
6. the method according to claim 1, wherein described receive for being target by target user's attribute assignment
After the user list of attribute value, the method also includes:
Obtain current version ID corresponding with the Target Attribute values;
According to the current version ID, revision ID to be updated corresponding with the Target Attribute values is determined;
The index is written in the corresponding relationship of the user identifier and the Target Attribute values by the more new thread described in
The first memory block in library includes:
Using the more new thread, by pair between the user identifier and Target Attribute values comprising the revision ID to be updated
It should be related to write-in first memory block.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
Query statement is generated, the query statement is for inquiring in first memory block and comprising the revision ID to be updated
The corresponding number of users of Target Attribute values;
The query statement is executed, the number of users is obtained with inquiry;
If the number of users is equal to the number of users that the user list includes, determine that data are updated successfully.
8. a kind of device for updating index database, which is characterized in that described device includes:
Receiving unit, for receiving the user list for by target user's attribute assignment being Target Attribute values, user's column
Table includes at least one user identifier;
Thread creation unit, for creating at least one more new thread and being put into thread pool;
First updating unit, for using the more new thread, the user identifier and the corresponding of the Target Attribute values to be closed
System is written the first memory block in the index database and updates index to the data in first memory block.
9. device according to claim 8, which is characterized in that the index database further includes the second memory block, and described second
The number of the user property of memory block storage is greater than the number of the user property of first memory block storage;
Described device further include:
Timing acquisition unit, for obtaining each user about the target user in the execution time arrival of timed task
The newest attribute value of attribute;
Second updating unit, it is right for the newest attribute value using each user got about target user's attribute
User data in second memory block is indexed update.
10. device according to claim 8, which is characterized in that target user's attribute is user tag.
11. device according to claim 9, which is characterized in that the user property stored in second memory block includes
One or more of: area, user tag, participation vehicles scheduling events where user's gender, age of user, user
Frequency, participate in vehicles scheduling events number.
12. device according to claim 8, which is characterized in that first updating unit includes:
Message generation unit is set for being met using the more new thread each user identifier generation in the user list
The message for the formula that fixes, the message include the user identifier and the Target Attribute values;
Message sending unit, for sending the message to the index database, the user is written in first memory block
The corresponding relationship of mark and the Target Attribute values.
13. device according to claim 8, which is characterized in that described device further include:
Revision ID acquiring unit, for obtaining current version ID corresponding with the Target Attribute values;
Revision ID determination unit, for determining version to be updated corresponding with the Target Attribute values according to the current version ID
This ID;
First updating unit is specifically used for:
Using the more new thread, by pair between the user identifier and Target Attribute values comprising the revision ID to be updated
It should be related to write-in first memory block.
14. device according to claim 13, which is characterized in that described device further include:
Sentence generation unit, for generating query statement, the query statement for inquire in first memory block with comprising
The corresponding number of users of Target Attribute values of the revision ID to be updated;
Sentence execution unit obtains the number of users for executing the query statement with inquiry;
Task result determination unit, for determining data when the number of users is equal to the number of users that the user list includes
It is updated successfully;Otherwise, it determines data update failure.
15. a kind of electronic equipment, comprising:
Processor;
Memory for storage processor executable instruction;
It is characterized in that, the processor is configured to:
The user list for by target user's attribute assignment being Target Attribute values is received, the user list includes at least one
User identifier;
It creates at least one more new thread and is put into thread pool;
Using the more new thread, the corresponding relationship of the user identifier and the Target Attribute values is written in the index database
The first memory block and in first memory block data update index.
16. a kind of computer storage medium, is stored thereon with computer program, which is characterized in that the computer program is processed
Device realizes following steps when executing:
The user list for by target user's attribute assignment being Target Attribute values is received, the user list includes at least one
User identifier;
It creates at least one more new thread and is put into thread pool;
Using the more new thread, the corresponding relationship of the user identifier and the Target Attribute values is written in the index database
The first memory block and in first memory block data update index.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710638790.XA CN110019179A (en) | 2017-07-31 | 2017-07-31 | Update method and device, the electronic equipment, storage medium of index database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710638790.XA CN110019179A (en) | 2017-07-31 | 2017-07-31 | Update method and device, the electronic equipment, storage medium of index database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110019179A true CN110019179A (en) | 2019-07-16 |
Family
ID=67186032
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710638790.XA Pending CN110019179A (en) | 2017-07-31 | 2017-07-31 | Update method and device, the electronic equipment, storage medium of index database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110019179A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111031336A (en) * | 2019-12-10 | 2020-04-17 | 北京达佳互联信息技术有限公司 | Live broadcast list data updating method and device, electronic equipment and storage medium |
CN112380416A (en) * | 2020-11-25 | 2021-02-19 | 北京慕华信息科技有限公司 | Method for updating course index, course searching method and device |
CN112541327A (en) * | 2019-09-23 | 2021-03-23 | 北京国双科技有限公司 | Data reading method and device, electronic equipment and storage medium |
CN112559244A (en) * | 2019-09-25 | 2021-03-26 | 北京国双科技有限公司 | Data processing method and device, electronic equipment and computer readable medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090313252A1 (en) * | 2008-06-17 | 2009-12-17 | Qualcomm Incorporated | Database architecture for supporting group communications among wireless communication devices |
CN102103602A (en) * | 2009-12-17 | 2011-06-22 | 腾讯科技(深圳)有限公司 | System and method for increasing retrieval speed |
CN103559301A (en) * | 2013-11-14 | 2014-02-05 | 华为技术有限公司 | Method of data update, database trigger and SE (search engine) |
CN103744947A (en) * | 2013-12-31 | 2014-04-23 | 金蝶软件(中国)有限公司 | Version-ID-related (version-identity-related) data reference processing method and system |
CN105677865A (en) * | 2016-01-08 | 2016-06-15 | 天津车之家科技有限公司 | Method and system for updating index data and search engine |
-
2017
- 2017-07-31 CN CN201710638790.XA patent/CN110019179A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090313252A1 (en) * | 2008-06-17 | 2009-12-17 | Qualcomm Incorporated | Database architecture for supporting group communications among wireless communication devices |
CN102103602A (en) * | 2009-12-17 | 2011-06-22 | 腾讯科技(深圳)有限公司 | System and method for increasing retrieval speed |
CN103559301A (en) * | 2013-11-14 | 2014-02-05 | 华为技术有限公司 | Method of data update, database trigger and SE (search engine) |
CN103744947A (en) * | 2013-12-31 | 2014-04-23 | 金蝶软件(中国)有限公司 | Version-ID-related (version-identity-related) data reference processing method and system |
CN105677865A (en) * | 2016-01-08 | 2016-06-15 | 天津车之家科技有限公司 | Method and system for updating index data and search engine |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112541327A (en) * | 2019-09-23 | 2021-03-23 | 北京国双科技有限公司 | Data reading method and device, electronic equipment and storage medium |
CN112559244A (en) * | 2019-09-25 | 2021-03-26 | 北京国双科技有限公司 | Data processing method and device, electronic equipment and computer readable medium |
CN111031336A (en) * | 2019-12-10 | 2020-04-17 | 北京达佳互联信息技术有限公司 | Live broadcast list data updating method and device, electronic equipment and storage medium |
CN112380416A (en) * | 2020-11-25 | 2021-02-19 | 北京慕华信息科技有限公司 | Method for updating course index, course searching method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110019179A (en) | Update method and device, the electronic equipment, storage medium of index database | |
CN111708641B (en) | Memory management method, device, equipment and computer readable storage medium | |
CN112800095A (en) | Data processing method, device, equipment and storage medium | |
CN110389812B (en) | Method, apparatus, and computer-readable storage medium for managing virtual machines | |
CN110442480A (en) | A kind of mirror image data method for cleaning, apparatus and system | |
CN110851511A (en) | Data synchronization method and device | |
CN111880948A (en) | Data refreshing method and device, electronic equipment and computer readable storage medium | |
CN116467061B (en) | Task execution method and device, storage medium and electronic equipment | |
CN111274241B (en) | Method and apparatus for parallel processing of map data | |
CN112906206A (en) | Digital twin model construction method and device | |
CN115311399A (en) | Image rendering method and device, electronic equipment and storage medium | |
CN114997414B (en) | Data processing method, device, electronic equipment and storage medium | |
CN103294459B (en) | Map control generates method and apparatus | |
CN110020333A (en) | Data analysing method and device, electronic equipment, storage medium | |
CN113010296B (en) | Formalized model based task analysis and resource allocation method and system | |
CN110389817B (en) | Scheduling method, device and computer readable medium of multi-cloud system | |
CN117785490A (en) | Training architecture, method, system and server of graph neural network model | |
CN114924857A (en) | Redis-based distributed timing scheduling method and device and storage medium | |
CN116304079A (en) | Timing-based profile data management method, apparatus, and readable storage medium | |
CN113704272B (en) | Digital object state expression method and device under man-machine-object fusion environment | |
CN109976905A (en) | EMS memory management process, device and electronic equipment | |
CN112948251B (en) | Automatic software testing method and device | |
CN114817408A (en) | Scheduling resource identification method and device, electronic equipment and storage medium | |
CN114329058A (en) | Image gathering method and device and electronic equipment | |
CN112988383A (en) | Resource allocation method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190716 |