CN111274333A - Map relation updating method, device, server and storage medium - Google Patents

Map relation updating method, device, server and storage medium Download PDF

Info

Publication number
CN111274333A
CN111274333A CN202010066267.6A CN202010066267A CN111274333A CN 111274333 A CN111274333 A CN 111274333A CN 202010066267 A CN202010066267 A CN 202010066267A CN 111274333 A CN111274333 A CN 111274333A
Authority
CN
China
Prior art keywords
relation
relationship
request
written
associated nodes
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.)
Withdrawn
Application number
CN202010066267.6A
Other languages
Chinese (zh)
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 Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System 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 Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN202010066267.6A priority Critical patent/CN111274333A/en
Publication of CN111274333A publication Critical patent/CN111274333A/en
Withdrawn legal-status Critical Current

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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases

Abstract

The embodiment of the invention provides a map relation updating method, a map relation updating device, a server and a storage medium, and relates to the technical field of map construction. The method comprises the steps of judging whether a relation to be written exists between two associated nodes or not when a relation write-in request is received, responding to the relation write-in request if the relation to be written exists, obtaining historical attributes of the relation to be written, and newly building and obtaining current attributes of the relation to be written based on the historical attributes. Because the current attribute of the relation to be written is newly established when the relation to be written already exists, and the parameter is not rewritten on the basis of the historical attribute to cover the historical attribute, a plurality of attributes of the relation to be written can be simultaneously reserved, and the user can conveniently trace back the data without recomposing.

Description

Map relation updating method, device, server and storage medium
Technical Field
The invention relates to the technical field of map construction, in particular to a map relation updating method, a map relation updating device, a server and a storage medium.
Background
All people, cases, things and objects in real life do not exist independently, and all people, cases, things and objects have various internal or external, indirect or direct relations, a graph is one of the ways which can express the relations most intuitively, but the construction and the updating of the graph are particularly time-consuming and expensive operations, and under the condition of large data scale, the graph relation of the things is constructed, the demand on computing resources is very large, and the computing period is long, so that the ideal condition is one-time construction, micro updating and multiple retrieval.
In the prior art, if a certain batch of data needs to be backtracked, the atlas needs to be reconstructed, and the method is time-consuming, labor-consuming and cost-consuming.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a server and a storage medium for updating a graph relationship.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment provides a map relation updating method, where the method includes:
receiving a relation write-in request, wherein the relation write-in request comprises two associated nodes and a to-be-written relation between the two associated nodes;
if the relation to be written exists between the two associated nodes, responding to the relation writing request to obtain the historical attribute of the relation to be written, and newly building a new relation to obtain the current attribute of the relation to be written based on the historical attribute; and the history attribute comprises the interaction times of the relation to be written between the two associated nodes after the relation write request is received last time.
In an alternative embodiment, the method further comprises:
receiving a relation deleting request, wherein the relation deleting request comprises two associated nodes and a relation to be deleted between the two associated nodes;
and responding to the relation deletion request to add deletion marks to the relation to be deleted and the attribute information associated with the relation to be deleted.
In an alternative embodiment, the method further comprises:
receiving a relationship recovery request, wherein the relationship recovery request comprises two associated nodes and a to-be-recovered relationship between the two associated nodes;
and responding to the relationship recovery request and clearing the deletion mark of the relationship to be recovered and the deletion mark of the attribute information associated with the relationship to be recovered.
In an alternative embodiment, the method further comprises:
receiving a retrieval request, wherein the retrieval request comprises retrieval conditions;
searching based on the search condition to obtain a preliminary search result;
and filtering interference data in the preliminary retrieval result to obtain a final retrieval result, wherein the interference data is added with the deletion mark.
In an alternative embodiment, the method further comprises:
and if the relation to be written does not exist between the two associated nodes, responding to the relation writing request to establish the relation to be written between the two associated nodes, and setting the current attribute of the relation to be written.
In a second aspect, an embodiment provides an apparatus for updating a map relation, the apparatus including:
the system comprises a receiving module, a writing module and a writing module, wherein the receiving module is used for receiving a relation writing request which comprises two associated nodes and a to-be-written relation between the two associated nodes;
the response module is used for responding to the relation write request to acquire the historical attribute of the relation to be written if the relation to be written exists between the two associated nodes, and newly establishing the current attribute of the relation to be written based on the historical attribute; and the history attribute comprises the interaction times of the relation to be written between the two associated nodes after the relation write request is received last time.
In an optional implementation manner, the receiving module is further configured to receive a relationship deletion request, where the relationship deletion request includes two associated nodes and a relationship to be deleted between the two associated nodes;
the response module is further used for responding to the relation deletion request and adding deletion marks to the relation to be deleted and the attribute information associated with the relation to be deleted.
In an optional implementation manner, the receiving module is further configured to receive a relationship recovery request, where the relationship recovery request includes two associated nodes and a relationship to be recovered between the two associated nodes;
the response module is also used for responding to the relationship recovery request and clearing the deletion mark of the relationship to be recovered and the deletion mark of the attribute information associated with the relationship to be recovered.
In a third aspect, an embodiment provides a server, including a processor and a memory, where the memory stores machine executable instructions capable of being executed by the processor, and the processor can execute the machine executable instructions to implement the map relation updating method described in any one of the foregoing embodiments.
In a fourth aspect, an embodiment provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the map relation updating method according to any one of the foregoing embodiments.
According to the map relationship updating method, device, server and storage medium provided by the embodiment of the invention, when a relationship writing request is received, whether a to-be-written relationship exists between two associated nodes is judged, if yes, the relationship writing request is responded to obtain the historical attribute of the to-be-written relationship, and the current attribute of the to-be-written relationship is newly established based on the historical attribute. Because the current attribute of the relation to be written is newly established when the relation to be written already exists, and the parameter is not rewritten on the basis of the historical attribute to cover the historical attribute, a plurality of attributes of the relation to be written can be simultaneously reserved, and the user can conveniently trace back the data without recomposing.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows an application scenario diagram of the map relationship updating method provided by the embodiment of the present invention.
Fig. 2 is a block diagram illustrating a server according to an embodiment of the present invention.
Fig. 3 shows a flowchart of a map relation updating method provided by the embodiment of the present invention.
Figure 4 shows a topological diagram of a graph relationship.
Fig. 5 shows a further flowchart of the map relationship updating method provided by the embodiment of the present invention.
Fig. 6 shows a flowchart of retrieving relationships in the graph relationship updating method provided by the embodiment of the present invention.
Fig. 7 is a functional block diagram of a map relation updating apparatus according to an embodiment of the present invention.
Icon: 100-a server; 110-a memory; 120-a processor; 130-a communication module; 200-a distributed storage system; 300-map relationship updating means; 310-a receiving module; 320-a judgment module; 330-response module; 340-a retrieval module; 350-screening module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Fig. 1 is a diagram of an application scenario of the map relationship updating method provided by the present invention. Wherein the server 100 is communicatively coupled to the distributed storage system 200. The server 100 can perform the work of map construction, map updating and the like; the distributed storage system 200 may be used to store information for various nodes in a graph.
In an alternative embodiment, the distributed storage system 200 may be an HBase, which is a high-reliability, high-performance, column-oriented, scalable distributed storage system 200 that can effectively improve the storage capacity of the server 100.
It should be noted that, in other embodiments, the distributed storage system 200 may also be implemented by components such as an Elasticsearch, mysql, and the like.
Fig. 2 is a block diagram of the server 100. The server 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, the processor 120 and the communication module 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an erasable read only memory (EPROM), an electrically erasable read only memory (EEPROM), and the like.
The processor 120 is a control center of the server 100, and may connect various parts of the entire server 100 using various interfaces and lines, by operating or executing software programs and/or modules stored in the memory 110, and calling data stored in the memory 110 to perform corresponding functions.
The communication module 130 is configured to establish a communication connection between the server 100 and another communication terminal through the network, and to transceive data through the network.
It should be understood that the configuration shown in fig. 2 is merely a schematic diagram of the configuration of the server 100, and that the server 100 may include more or less components than those shown in fig. 2, or have a different configuration than that shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
First embodiment
The invention provides a map relation updating method which can conveniently backtrack historical data. Please refer to fig. 3, which is a flowchart of a map relationship updating method according to the present invention. The map relation updating method comprises the following steps:
s301, a relation write-in request is received, wherein the relation write-in request comprises two associated nodes and a to-be-written relation between the two associated nodes.
It should be noted that the relationship graph can be used to describe various entities or concepts existing in the real world and their relationships, and it constitutes a huge semantic network graph, where nodes represent entities or concepts, and edges are constituted by relationships (for example, the relationship graph shown in fig. 4). The entities may be any person or object, such as a person, a school, a city, etc., and different relationships exist between different entities. And a relationship may refer to some kind of connection between different entities, such as Zhang three and Liqu make a call, Zhang three and Liqu send an email, Zhang three and Liqu are classmates, Zhang three lives in a ceremony, logistic regression is a "leading knowledge" of deep learning, and so on.
It should also be noted that the relationship may have attribute information, and the attribute information may reflect the number of interactions between two nodes about the relationship. For example, the relationship may be Zhang III and Liqu, and the attribute information mainly refers to a value of the object specifying the relationship, such as Zhang III and Liqu having made 4 calls, and the like. For another example, the relationship may be that three open is reading a book in a certain elementary school, and the attribute information may be that three open is reading a book in a certain elementary school for 1-3 grades.
When a user needs to add or change a certain relationship, the user may operate on the front-end device, so that the front-end device generates a relationship write request and then transmits the relationship write request to the server 100. The relationship write request includes two associated nodes, which may be, for example, two nodes of zhang-san and lie-quad. And the to-be-written relationship may be any relationship between two associated nodes, and may be, for example, zhang san and lie si phone calls.
In an optional implementation manner, the relationship write request includes ID information of two associated nodes, and each associated node has unique ID information, so that the server 100 finds the corresponding two associated nodes according to the ID information of the two associated nodes after receiving the relationship write request.
S302, judging whether a to-be-written relation exists between two associated nodes, if so, executing S303; if not, S304 is performed.
In an optional implementation manner, the server 100 may first query all relationships between two associated nodes stored in the distributed storage system 200 based on ID information of the two associated nodes, and then determine whether all relationships between the two associated nodes include the to-be-written relationship, and if so, may determine that the to-be-written relationship exists between the two associated nodes; otherwise, it may be determined that the to-be-written relationship does not exist between the two associated nodes.
In another optional implementation, the relationship writing request may further include ID information of the relationship to be written, so that after receiving the relationship writing request, the server 100 may query whether a relationship matching the ID information exists in the distributed storage system 200 according to the ID information of the relationship to be written, and if so, may determine that the relationship to be written exists between two associated nodes; otherwise, it may be determined that the to-be-written relationship does not exist between the two associated nodes.
S303, responding to the relation writing request to obtain the historical attribute of the relation to be written, and newly building the current attribute of the relation to be written based on the historical attribute.
It can be understood that if there is a to-be-written relationship between two associated nodes, attribute information of the to-be-written relationship inevitably exists. The attribute information may include a history attribute, and the history attribute may include the number of interactions between two associated nodes about the relationship to be written after the relationship write request is received last time. For example, the historical attribute may characterize that Zhang three and Lile four made 3 calls. Note that the attribute information includes attribute information other than the history attribute. For example, the server 100 receives the request written in the relationship a for 3 times, and thus, the attribute information of 3 versions corresponds to each other, so that the attribute information obtained after the request is received for the last time is the history attribute, and the attribute information of the other two versions is the attribute information except the history attribute.
After the fact that the relationship to be written does exist between the two associated nodes is determined, the historical attribute of the relationship to be written can be directly obtained, and then the current attribute of the relationship to be written is newly established and obtained based on the historical attribute. For example, the historical attribute represents that the three-piece and the four-piece short messages have been sent for 3 times, and the newly-established current attribute should represent that the three-piece and the four-piece short messages have been sent for 4 times.
In an optional implementation manner, when the current attribute is newly created, the time for newly creating the current attribute is bound with the current attribute, so that a user can screen attribute information required by the user according to the time.
For example, the relationship write request is used to instruct the server 100 to write a relationship between the three-piece and the four-piece short messages, and when the relationship write request is received for the first time, the attribute information of the first version is generated, the representation interaction frequency of the attribute information is 1, and the association time is 2020, 1 month and 1 day; and when the relation write request is received for the second time, generating the attribute information of the second version, wherein the representation interaction frequency is 1, and when the relation write request is received for the nth time in 1 month, 2 months and … … in the associated time 2020, generating the attribute information of the nth version, wherein the representation interaction frequency is n, and associating the corresponding time. Therefore, the user can add the screening condition of time during the query, for example, the attribute information of the relationship between Zhang III and Li Qu SMS in 1 month and 1 day.
S304, responding to the relation writing request, establishing a new relation to be written between the two associated nodes, and setting the current attribute of the relation to be written.
It can be understood that, if there is no to-be-written relationship between the two associated nodes, there is no attribute information of the to-be-written relationship. At this time, the relationship to be written is newly created between the two associated nodes in response to the relationship writing request, and the current attribute of the relationship to be written is set, so that the current attribute is newly created when the same relationship to be written is received next time.
It can be understood that the present invention is newly built on the basis of the historical attributes, instead of directly rewriting the historical attributes or covering the original data with new data, so that the distributed storage system 200 can simultaneously store the attribute information of different stages of a relationship, and thus, when a user needs to check the historical map relationship, the user only needs to screen the previous attribute information without reconstructing the map relationship, and the user can conveniently trace back; meanwhile, the user can compare and check the attributes of a plurality of versions of the relationship in one map relationship, and compare the map relationship and the change in different periods. In addition, the map relation does not need to be reconstructed again in the updating mode, only local updating is carried out, and the workload is low.
It can be understood that the foregoing mainly describes the processing flow of the map relationship updating method when a relationship needs to be added. In addition, the map relationship updating method provided by the invention also comprises a specific processing flow when the relationship needs to be deleted. Please refer to fig. 5, which is a further flowchart of the map relationship updating method provided by the present invention. The map relation updating method further comprises the following steps:
s305, receiving a relation deleting request, wherein the relation deleting request comprises two associated nodes and a relation to be deleted between the two associated nodes.
It can be understood that, when a user needs to delete a certain relationship, the front-end device may operate, so that the front-end device generates a relationship deletion request and then transmits the relationship deletion request to the server 100. The relationship deletion request includes two associated nodes, which may be, for example, two nodes of zhang san and lie san. The relationship deletion request may be any relationship between two associated nodes, for example, a relationship between three-piece mail and four-piece mail.
S306, responding to the relation deleting request, and adding deleting marks to the relation to be deleted and the attribute information associated with the relation to be deleted.
It is understood that the relationship to be deleted may be any relationship between two associated nodes. After receiving the relationship deletion request, the server 100 adds a deletion flag to the relationship to be deleted in response to the relationship deletion request, and adds a deletion flag to the attribute information associated with the relationship to be deleted, so as to indicate that the server 100 has completed the deletion operation in response to the relationship deletion request. When the user searches, the data to which the deletion flag is added cannot be searched, and this means that the data is "deleted".
It should be further noted that the attribute information associated with the relationship to be deleted refers to all attribute information of the relationship to be deleted.
In addition, when the data needs to be deleted, the corresponding data is not really deleted, but the deletion mark is added on the corresponding data, so that the deleted data is ensured not to be lost, the corresponding relation is ensured not to be lost, and the user can conveniently recover the deleted relation.
S307, receiving a relationship recovery request, wherein the relationship recovery request comprises two associated nodes and a to-be-recovered relationship between the two associated nodes.
It is understood that when a user needs to restore a certain relationship, the front-end device may operate on the front-end device, so that the front-end device generates a relationship restoration request and transmits the relationship restoration request to the server 100. The relationship recovery request includes two associated nodes, which may be, for example, two nodes of zhang-san and lie-quad. The relationship recovery request may be any relationship between two associated nodes, for example, the relationship between Zhang three and Liqu email.
It should be noted that the operation object of the relationship restoration request can only be a relationship that has been deleted, and not a relationship that does not exist in the graph relationship.
S308, the relation recovery request is responded, and the deletion mark of the relation to be recovered and the deletion mark of the attribute information associated with the relation to be recovered are cleared.
After receiving the relationship recovery request, the server 100 directly clears the deletion flag of the relationship to be recovered and the deletion flag of the attribute information associated with the relationship to be recovered, thereby realizing recovery of the deleted data.
Since the deletion of data in the present invention is not true to delete corresponding data in the conventional technical means, in order to avoid the user retrieving irrelevant information during retrieval, please refer to fig. 6, the method for updating the graph relationship provided by the present invention further includes:
s309, receives a search request, where the search request includes a search condition.
It can be understood that, when a user needs to perform spectrogram relationship search, the front-end device may operate to generate a search request and then transmit the search request to the server 100. The retrieval request includes a retrieval condition, and the server 100 searches the distributed storage system 200 for data that meets the retrieval condition. For example, the search condition may be: and inquiring the calling condition of Zhang three and Li four in 1 month and 1 day of 2020.
It should be noted that the processor 120 of the server 100 may be configured with a graph calculation engine in advance, so that the graph calculation engine may perform retrieval based on the retrieval condition. In an alternative embodiment, the graph computation engine may use Neo4j, and a graph relationship-based search, neighborhood search, 2-degree relationship, attribute filtering, etc. may be conveniently performed using a Neo4j high-performance computation engine and a convenient Cypher search language. In another alternative embodiment, the graph computation engine may also use Graphx, janussgraph, or the like.
And S310, searching to obtain a preliminary retrieval result based on the retrieval condition.
At this time, the server 100 may query all data satisfying the search condition in the distributed storage system 200, and preliminarily search results for all data satisfying the search condition.
It should be noted that, since the data is not actually deleted when the data is deleted, the preliminary search result obtained by the search still includes the data that has been "deleted" and the data that is actually required by the user.
S311, filtering interference data in the preliminary search result to obtain a final search result, wherein the interference data is data added with a deletion mark.
In order to avoid the user from being interfered by the data that has been "deleted", the server 100 filters out the data with the deletion flag in the preliminary search result again, and uses the remaining data as the final search result and feeds back the final search result to the front-end device.
Second embodiment
In order to execute the corresponding steps in the above-described embodiment and each possible manner, an implementation manner of the map relation updating apparatus 300 is given below, and optionally, the map relation updating apparatus 300 may adopt the device structure of the server 100 shown in fig. 2. Further, referring to fig. 7, fig. 7 is a functional block diagram of a map relationship updating apparatus 300 according to an embodiment of the present invention. It should be noted that the basic principle and the generated technical effect of the map relationship updating apparatus 300 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and corresponding contents in the above embodiments may be referred to. The map relation updating apparatus 300 includes: a receiving module 310, a determining module 320, a responding module 330, a retrieving module 340, and a screening module 350.
The receiving module 310 is configured to receive a relationship write request, where the relationship write request includes two associated nodes and a to-be-written relationship between the two associated nodes.
It is understood that in an alternative embodiment, the receiving module 310 may be configured to perform S301.
The determining module 320 is configured to determine whether a to-be-written relationship exists between two associated nodes.
It is understood that in an alternative embodiment, the determining module 320 may be configured to execute S302.
The response module 330 is configured to, when a to-be-written relationship exists between two associated nodes, respond to the relationship write request to obtain a history attribute of the to-be-written relationship, and newly create a current attribute of the to-be-written relationship based on the history attribute.
It is to be appreciated that in an alternative embodiment, the response module 330 may be configured to perform S303.
The response module 330 is further configured to, when there is no to-be-written relationship between the two associated nodes, respond to the relationship write request to create a to-be-written relationship between the two associated nodes, and set a current attribute of the to-be-written relationship.
It is to be appreciated that in an alternative embodiment, the response module 330 may be configured to perform S304.
The receiving module 310 is further configured to receive a relationship deletion request, where the relationship deletion request includes two associated nodes and a to-be-deleted relationship between the two associated nodes.
It is understood that in an alternative embodiment, the receiving module 310 may be configured to perform S305.
The response module 330 is further configured to add a deletion flag to the relationship to be deleted and the attribute information associated with the relationship to be deleted in response to the relationship deletion request.
It is to be appreciated that in an alternative embodiment, the response module 330 may be configured to perform S306.
The receiving module 310 is further configured to receive a relationship recovery request, where the relationship recovery request includes two associated nodes and a relationship to be recovered between the two associated nodes.
It is understood that in an alternative embodiment, the receiving module 310 may be configured to execute S307.
The response module 330 is further configured to clear the deletion flag of the relationship to be restored and the deletion flag of the attribute information associated with the relationship to be restored in response to the relationship restoration request.
It is to be appreciated that in an alternative embodiment, the response module 330 may be configured to perform S308.
The receiving module 310 is further configured to receive a retrieval request, where the retrieval request includes a retrieval condition.
It is understood that in an alternative embodiment, the receiving module 310 may be configured to execute S309.
The retrieval module 340 is configured to search for a preliminary retrieval result based on the retrieval condition.
It is to be appreciated that in an alternative embodiment, the retrieval module 340 may be configured to perform S310.
The screening module 350 is configured to filter interference data in the preliminary search result to obtain a final search result, where the interference data is data to which a deletion flag is added.
It is to be appreciated that in an alternative embodiment, the screening module 350 can be configured to perform S311.
Alternatively, the modules may be stored in the memory 110 shown in fig. 2 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the server 100, and may be executed by the processor 120 in fig. 2. Meanwhile, data, codes of programs, and the like required to execute the above-described modules may be stored in the memory 110.
The present invention also provides a storage medium on which a computer program is stored, which when executed by the processor 120 implements the atlas relationship updating method as described in any of the preceding embodiments.
In summary, according to the map relationship updating method, apparatus, server, and storage medium provided in the embodiments of the present invention, when a relationship write request is received, it is determined whether a to-be-written relationship exists between two associated nodes, if so, a history attribute of the to-be-written relationship is obtained in response to the relationship write request, and a current attribute of the to-be-written relationship is newly created based on the history attribute. Because the current attribute of the relation to be written is newly established when the relation to be written already exists, and the parameter is not rewritten on the basis of the historical attribute to cover the historical attribute, a plurality of attributes of the relation to be written can be simultaneously reserved, and the user can conveniently trace back the data without recomposing.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for updating a graph relation, the method comprising:
receiving a relation write-in request, wherein the relation write-in request comprises two associated nodes and a to-be-written relation between the two associated nodes;
if the relation to be written exists between the two associated nodes, responding to the relation writing request to obtain the historical attribute of the relation to be written, and newly building a new relation to obtain the current attribute of the relation to be written based on the historical attribute; and the history attribute comprises the interaction times of the relation to be written between the two associated nodes after the relation write request is received last time.
2. The atlas relationship update method of claim 1, the method further comprising:
receiving a relation deleting request, wherein the relation deleting request comprises two associated nodes and a relation to be deleted between the two associated nodes;
and responding to the relation deletion request to add deletion marks to the relation to be deleted and the attribute information associated with the relation to be deleted.
3. The atlas relationship update method of claim 2, the method further comprising:
receiving a relationship recovery request, wherein the relationship recovery request comprises two associated nodes and a to-be-recovered relationship between the two associated nodes;
and responding to the relationship recovery request and clearing the deletion mark of the relationship to be recovered and the deletion mark of the attribute information associated with the relationship to be recovered.
4. The atlas relationship update method of claim 2 or 3, wherein the method further comprises:
receiving a retrieval request, wherein the retrieval request comprises retrieval conditions;
searching based on the search condition to obtain a preliminary search result;
and filtering interference data in the preliminary retrieval result to obtain a final retrieval result, wherein the interference data is added with the deletion mark.
5. The atlas relationship update method of any one of claims 1-3, wherein the method further comprises:
and if the relation to be written does not exist between the two associated nodes, responding to the relation writing request to establish the relation to be written between the two associated nodes, and setting the current attribute of the relation to be written.
6. An apparatus for updating a map relation, the apparatus comprising:
the system comprises a receiving module, a writing module and a writing module, wherein the receiving module is used for receiving a relation writing request which comprises two associated nodes and a to-be-written relation between the two associated nodes;
the response module is used for responding to the relation write request to acquire the historical attribute of the relation to be written if the relation to be written exists between the two associated nodes, and newly establishing the current attribute of the relation to be written based on the historical attribute; and the history attribute comprises the interaction times of the relation to be written between the two associated nodes after the relation write request is received last time.
7. The graph relation updating device according to claim 6, wherein the receiving module is further configured to receive a relation deletion request, where the relation deletion request includes two associated nodes and a relation to be deleted between the two associated nodes;
the response module is further used for responding to the relation deletion request and adding deletion marks to the relation to be deleted and the attribute information associated with the relation to be deleted.
8. The graph relationship updating apparatus according to claim 7, wherein the receiving module is further configured to receive a relationship recovery request, where the relationship recovery request includes two associated nodes and a relationship to be recovered between the two associated nodes;
the response module is also used for responding to the relationship recovery request and clearing the deletion mark of the relationship to be recovered and the deletion mark of the attribute information associated with the relationship to be recovered.
9. A server comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the graph relationship updating method of any one of claims 1 to 5.
10. A storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the atlas relationship updating method of any of claims 1-5.
CN202010066267.6A 2020-01-20 2020-01-20 Map relation updating method, device, server and storage medium Withdrawn CN111274333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010066267.6A CN111274333A (en) 2020-01-20 2020-01-20 Map relation updating method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010066267.6A CN111274333A (en) 2020-01-20 2020-01-20 Map relation updating method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN111274333A true CN111274333A (en) 2020-06-12

Family

ID=71001830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010066267.6A Withdrawn CN111274333A (en) 2020-01-20 2020-01-20 Map relation updating method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111274333A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120323955A1 (en) * 2011-06-15 2012-12-20 Microsoft Corporation Relational modeling and runtime for date effective entities
CN109508384A (en) * 2018-10-31 2019-03-22 北京国双科技有限公司 Processing method, device, storage medium and the processor of knowledge mapping
CN109670089A (en) * 2018-12-29 2019-04-23 颖投信息科技(上海)有限公司 Knowledge mapping system and its figure server
CN110413695A (en) * 2019-07-29 2019-11-05 北京百度网讯科技有限公司 Police affair information management method, apparatus, equipment and medium based on block chain
CN110609870A (en) * 2019-09-11 2019-12-24 深圳众赢维融科技有限公司 Distributed data processing method and device, electronic equipment and storage medium
CN110609904A (en) * 2019-09-11 2019-12-24 深圳众赢维融科技有限公司 Graph database data processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120323955A1 (en) * 2011-06-15 2012-12-20 Microsoft Corporation Relational modeling and runtime for date effective entities
CN109508384A (en) * 2018-10-31 2019-03-22 北京国双科技有限公司 Processing method, device, storage medium and the processor of knowledge mapping
CN109670089A (en) * 2018-12-29 2019-04-23 颖投信息科技(上海)有限公司 Knowledge mapping system and its figure server
CN110413695A (en) * 2019-07-29 2019-11-05 北京百度网讯科技有限公司 Police affair information management method, apparatus, equipment and medium based on block chain
CN110609870A (en) * 2019-09-11 2019-12-24 深圳众赢维融科技有限公司 Distributed data processing method and device, electronic equipment and storage medium
CN110609904A (en) * 2019-09-11 2019-12-24 深圳众赢维融科技有限公司 Graph database data processing method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WGH100817: "史上超全面的Neo4j使用指南", 《HTTPS://BLOG.CSDN.NET/WGH100817/ARTICLE/DETAILS/101720250》 *
郭林斐 等: "基于Neo4j不确定性数据处理技术的研究", 《计算机技术与发展》 *

Similar Documents

Publication Publication Date Title
US20150154243A1 (en) Incremental schema consistency validation on geographic features
JP2018531379A6 (en) Route inquiry method, apparatus, device, and non-volatile computer storage medium
CN109684270B (en) Database archiving method, device, system, equipment and readable storage medium
CN113157947A (en) Knowledge graph construction method, tool, device and server
CN113467669A (en) Information processing method and device, electronic equipment and readable medium
CN109375843A (en) Application search method, device, equipment and medium based on shortcut
CN109255214B (en) Authority configuration method and device
CN111274333A (en) Map relation updating method, device, server and storage medium
CN112433757A (en) Method and device for determining interface calling relationship
CN110704468A (en) Data updating method and device and controller
CN111367500A (en) Data processing method and device
CN114240179A (en) Financial process mining method based on event map and related device
CN112632266B (en) Data writing method and device, computer equipment and readable storage medium
CN108628895A (en) A kind of processing method and processing device of map datum
CN109255081B (en) Portal service navigation method and system based on cloud platform
CN113448980A (en) Method and device for generating SQL (structured query language) statement and electronic equipment
CN113467997A (en) Data recovery method and device, mobile device and storage medium
CN111161047A (en) Bank business data processing and inquiring method and device
CN112860725A (en) SQL automatic generation method and device, storage medium and electronic equipment
EP3798864A1 (en) Functions for path traversals from seed input to output
CN115061982B (en) Case-customization-based relational graph construction method, system, terminal and medium
CN113419992B (en) File clearing configuration page display method and device, electronic equipment and medium
CN111831231B (en) Partition merging and partition splitting method and device
CN111125083B (en) Historical record screening method and device
CN115794737A (en) Data migration method, device and equipment and computer readable 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200612