A kind of search method and device of propagating contents
Technical field
This specification is related to the search method and device of internet area more particularly to a kind of propagating contents.
Background technique
Community content can be generally divided into multiple lower layer's contents under source contents and source contents, with reference to Fig. 1, in all sources
Perhaps lower layer's content can be forwarded, and be commented on, and shared, spread again to generate new content.But these contents are often deposited
In supervision risk, when there are problem or public opinion wind direction unfavorable variation occurs for source contents, we must make in a short time
Only content continues to spread.
In the prior art, often delete etc. processing to the comment of source contents and generation by operation personnel, but for
Raw content of practicing midwifery (such as the comment again generated after forwarding source contents) can not directly inquire to obtain, and need to call special under source contents
Stationary interface is inquired, and also needs to carry out traversing operation sometimes, when the level of lower layer's content is relatively more, logical comparison complexity when
It waits, many times can be expended, thereby increases and it is possible to have omission.
Summary of the invention
In view of the above technical problems, this specification embodiment provides the search method and device of a kind of propagating contents, technology
Scheme is as follows:
According to this specification embodiment in a first aspect, provide a kind of search method of propagating contents, this method comprises:
It determines the source contents for being used for content retrieval, is retrieved in index database according to the tracking code of the source contents and belong to institute
State each lower layer's content of source contents;
Wherein, index database establishes mode are as follows:
After having detected new content creation, tracking code is generated for the new content, the tracking code includes the new content
Each layer content identification on mark and the new content;
Rope is added by index creation tool in other predetermined informations of the tracking code of the new content and the new content
Draw library.
According to the second aspect of this specification embodiment, a kind of retrieval device of propagating contents is provided, which includes:
Retrieval module: for determining the source contents for being used for content retrieval, according to the tracking code of the source contents in index database
In retrieve each lower layer's content for belonging to the source contents;
Wherein, the device for establishing index database includes:
Tracking code generation module: after having detected new content creation, generating tracking code for the new content, described to chase after
Track code includes each layer content identification on new content mark and the new content;
Index establishes module: for other predetermined informations of the tracking code of the new content and the new content to be passed through rope
Draw creation tool and index database is added.
According to the third aspect of this specification embodiment, a kind of computer equipment is provided, including memory, processor and deposit
Store up the computer program that can be run on a memory and on a processor, wherein the processor is realized when executing described program
A kind of search method of propagating contents, which comprises
It determines the source contents for being used for content retrieval, is retrieved in index database according to the tracking code of the source contents and belong to institute
State each lower layer's content of source contents;
Wherein, index database establishes mode are as follows:
After having detected new content creation, tracking code is generated for the new content, the tracking code includes the new content
Each layer content identification on mark and the new content;
Rope is added by index creation tool in other predetermined informations of the tracking code of the new content and the new content
Draw library.
Technical solution provided by this specification embodiment can be identified for that its institute when content generates for content generation
There is the tracking code of upper layer content, when being retrieved according to source contents, which can be retrieved by tracking code and diffused out
Include comment, forwarding, share etc. all junior's contents, to be managed to junior's content.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or
Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only
The some embodiments recorded in this specification embodiment for those of ordinary skill in the art can also be attached according to these
Figure obtains other attached drawings.
Fig. 1 is a kind of schematic diagram of the community content level distribution shown in one exemplary embodiment of this specification;
Fig. 2 is a kind of flow chart of the search method of the propagating contents shown in one exemplary embodiment of this specification;
Fig. 3 is a kind of flow chart of the creation method of the index database shown in one exemplary embodiment of this specification;
Fig. 4 is another flow chart of the creation method of the index database shown in one exemplary embodiment of this specification;
Fig. 5 is a kind of schematic diagram of the retrieval device of the propagating contents shown in one exemplary embodiment of this specification;
Fig. 6 is a kind of schematic diagram of the creating device of the index database shown in one exemplary embodiment of this specification;
Fig. 7 is a kind of structural schematic diagram of computer equipment shown in one exemplary embodiment of this specification.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute
The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses
Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims
Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is
Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but
These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off
In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed
For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or
" when ... " or " in response to determination ".
Community content can be generally divided into multiple lower layer's contents under source contents and source contents, with reference to Fig. 1, in all sources
Perhaps lower layer's content can be forwarded, and be commented on, and shared, spread again to generate new content.But these contents are often deposited
In supervision risk, when there are problem or public opinion wind direction unfavorable variation occurs for source contents, we must make in a short time
Only content continues to spread.
In the prior art, often delete etc. processing to the comment of source contents and generation by operation personnel, but for
Raw content of practicing midwifery (such as the comment again generated after forwarding source contents) can not directly inquire to obtain, and need to call special under source contents
Stationary interface is inquired, and also needs to carry out traversing operation sometimes, when the level of lower layer's content is relatively more, logical comparison complexity when
It waits, many times can be expended, thereby increases and it is possible to have omission.
In view of the above problems, this specification embodiment provides a kind of search method of propagating contents, and a kind of for holding
The retrieval device of the propagating contents of row this method.It is flat that the method that this specification embodiment is mentioned is mainly used in the Internet community
Platform, specifically, community platform may include the online communations platform such as BBS/ forum, discussion bar, microblogging.
The search method for the propagating contents being related to below to the present embodiment is described in detail, shown in Figure 2, this method
It may comprise steps of:
S201 determines the index database for being used for content retrieval;
ElasticSearch can be used in index database, and the index creations tool such as Lucence is created, the tool used
It needs to have under normal conditions and most left front sews retrieval characteristic.
S202 determines the source contents for being used for content retrieval, is retrieved in index database according to the tracking code of the source contents
Belong to each lower layer's content of the source contents;
The content of (such as wealth community, microblogging, discussion bar etc.) is generally divided into PGC and UGC two major classes in community forum.PGC
(Professionally-generated Content) is professional production content, and information, big V viewpoint etc. are corresponded in community;
UGC (User-generated Content) is that user produces content, and user comment, forwarding are corresponded in community, share etc..
All these PGC with UGC contents also can be by sharing, paying close attention to be diffused to generate new content in community.
With reference to Fig. 1, when some content does not have upper layer content, this specification is referred to as source contents, in the source in community
Hold usually can by the forwarding of user, comment on, and forwarding after forwarding again and comment and diffuse out in a large amount of lower layer
Hold.
And in community often there is supervision risk in these contents, when there are problems or the carriage after diffusion for some source contents
When unfavorable variation occurs by wind direction, we must prevent content in a short time and continue to spread.Find source contents and
Lower layer's contents at different levels of source contents.It first determines the source contents for being used for content retrieval, is then existed according to the tracking code of the source contents
The each lower layer's content for belonging to the source contents is retrieved in index database.
Specifically, the method for building up of index database can be found in shown in Fig. 3, and this method may comprise steps of:
S301 after having detected new content creation, generates tracking code for the new content, the tracking code includes described new
Each layer content identification on content identification and the new content;
That is, for new content generate tracking code after, due to the tracking code include the new content mark and the new content it
On each layer content identification, the subsequent tracking code that can use learns that the new content is spread by which source contents, with
And the new content belong to the source contents diffusion in multiple lower layer's contents in which level belonged to.
Specifically, it generates tracking code and is divided into two ways, mode one is used to generate the tracking code of source contents, and mode two is used for
Generate the tracking code of non-source contents.
When detect created by new content after, if the new content be source contents, employing mode one: be using preset algorithm
The source contents generate a new unique identification information traceId, using unique identification traceId as the tracking code of source contents
traceMark。
Wherein, there are many in such a way that preset algorithm is the source contents one new unique identification information of generation, at this
In for example:
A) unique identification information is generated at random for the new content using UUID generating algorithm, such as: ID is generated at random:
0bea3bc21514961879490833728386, the random ID are the unique identification information of new content, by the unique identification
Tracking code of the information as the new content.
It b) is that the new content generates unique identification letter according to the client identification and time identifier that generate the new content
Breath, using the unique identification information as the tracking code of the new content.
In practical applications, there can be more methods for generating new unique identification information for source contents, user can root
It is voluntarily selected according to actual conditions, this specification is only for example, and is not construed as limiting to this.
When detect created by new content after, if the new content be non-source contents, employing mode two: by the new content
Tracking code traceMark of the unique identification follwId splicing after the tracking code of corresponding upper layer content, as new content.
Wherein, the unique identification of non-source contents can be made of the attribute-bit of itself, such as: be new when creation new content
Content generates business id information;Using the business id information as the unique identification follwId of the new content, and by the follwId
Splice after the tracking code of corresponding upper layer content.
Or, can determine whether the type of service of the new content, the traffic ID of the type of service of new content and generation is combined,
Such as NEWS:15478174.Using the combined arrangement as the unique identification follwId of the new content, and the follwId is spliced
After the tracking code of corresponding upper layer content.
After the completion of splicing, the composition form of the tracking code of the new content are as follows: traceId/followId, concrete form can be with
It is: 0bea3bc21514961879490833728386/NEWS:15478174.There is multistage lower layer content in code when tracking
When follwId, it can be spliced with " " between the follwId of lower layer's content.
S302 adds other predetermined informations of the tracking code of the new content and the new content by index creation tool
Enter index database.
Wherein, the field of the index may include: the type information of the tracking code and the new content of the new content, ID
Information and heading message, such as the following table 1.
Field |
Composition |
Explanation |
traceMark |
traceID/followID |
Track code |
Type |
News/Comment/Special |
Information/viewpoint/special topic ... |
id |
newsid/commentid/specialid |
Content ID |
title |
title |
Content title |
Table 1
This specification embodiment also provides a kind of method for building up of more specifically index database, shown in Figure 4, this method
It may comprise steps of:
S401 after having detected new content creation, generates traffic ID for new content;
S402, judges whether the new content has upper layer content, if there is upper layer content, thens follow the steps S403, if not having
Upper layer content, thens follow the steps S404;
S403 is that new content generates tracking code using preset algorithm;
S404, by tracking of the unique identification splicing of new content after the tracking code of corresponding upper layer content, as new content
Code;
S405 establishes index using new content tracking code and other predetermined informations.
After establishing index, when subsequent progress content tracking, it can be passed through according to the title field of any content
Search index tool (ElasticSearch etc.) obtains the tracking code traceMark field of the content, then passes through traceMark
Field carries out left prefix lookups using index tool, obtains this and interior holds all lower layer's contents spread out.And then it inquires
The fields such as the type and id of lower layer's content prohibit the Content Management such as speech delete note.
It is possible to further obtain how many content of each level by index tool, which each content is located at
Level.More application modes can be expanded in actual use accordingly, such as: can track hot ticket fermentation process,
The key node of popular information, the contribution margin that can see each node, such as this information are become by the forwarding of which big V
Obtain more heated door etc..
Corresponding to above method embodiment, this specification embodiment also provides a kind of retrieval device of propagating contents, referring to
Shown in Fig. 5, the apparatus may include: index database obtains module 510, retrieval module 520;
Index database obtains module 510: determining the index database for being used for content retrieval;
Retrieval module 520: it for determining the source contents for being used for content retrieval, is being indexed according to the tracking code of the source contents
The each lower layer's content for belonging to the source contents is retrieved in library.
Corresponding to above method embodiment, what this specification embodiment also provided a kind of index database establishes device, referring to Fig. 6
It is shown, the apparatus may include: tracking code generation module 610, index establish module 620;
Tracking code generation module 610: after having detected new content creation, tracking code, institute are generated for the new content
Stating tracking code includes each layer content identification on new content mark and the new content;
Index establishes module 620: for leading to other predetermined informations of the tracking code of the new content and the new content
It crosses index creation tool and index database is added.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor is realized in aforementioned propagation when executing described program
The search method of appearance, the method include at least:
It determines the source contents for being used for content retrieval, is retrieved in index database according to the tracking code of the source contents and belong to institute
State each lower layer's content of source contents;
Wherein, index database establishes mode are as follows:
After having detected new content creation, tracking code is generated for the new content, the tracking code includes the new content
Each layer content identification on mark and the new content;
Rope is added by index creation tool in other predetermined informations of the tracking code of the new content and the new content
Draw library.
Fig. 7 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram,
The equipment may include: processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus
1050.Wherein processor 1010, memory 1020, input/output interface 1030 and communication interface 1040 are real by bus 1050
The now communication connection inside equipment each other.
Processor 1010 can use general CPU (Central Processing Unit, central processing unit), micro- place
Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one
Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment
Case.
Memory 1020 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 1020 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 1020, and execution is called by processor 1010.
Input/output interface 1030 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 1040 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 1050 include an access, equipment various components (such as processor 1010, memory 1020, input/it is defeated
Outgoing interface 1030 and communication interface 1040) between transmit information.
It should be noted that although above equipment illustrates only processor 1010, memory 1020, input/output interface
1030, communication interface 1040 and bus 1050, but in the specific implementation process, which can also include realizing normal fortune
Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment
Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
Realize that the search method of propagating contents above-mentioned, the method include at least when sequence is executed by processor:
It determines the source contents for being used for content retrieval, is retrieved in index database according to the tracking code of the source contents and belong to institute
State each lower layer's content of source contents;
Wherein, index database establishes mode are as follows:
After having detected new content creation, tracking code is generated for the new content, the tracking code includes the new content
Each layer content identification on mark and the new content;
Rope is added by index creation tool in other predetermined informations of the tracking code of the new content and the new content
Draw library.
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 (transitory media), such as the data-signal and carrier wave of modulation.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
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.
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 device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.