CN114745421B - Method, device, server and storage medium for recording fission path data - Google Patents
Method, device, server and storage medium for recording fission path data Download PDFInfo
- Publication number
- CN114745421B CN114745421B CN202210333580.0A CN202210333580A CN114745421B CN 114745421 B CN114745421 B CN 114745421B CN 202210333580 A CN202210333580 A CN 202210333580A CN 114745421 B CN114745421 B CN 114745421B
- Authority
- CN
- China
- Prior art keywords
- sharing code
- sharing
- preamble
- code
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9017—Indexing; Data structures therefor; Storage structures using directory or table look-up
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a method, a device, a server and a storage medium for recording fission path data, wherein the method comprises the following steps: receiving a sharing code generation request sent by a client, wherein the sharing code generation request carries a preamble sharing code and a user identifier; determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request; recording the user identification, the preamble sharing code, the current sharing code and the source sharing code in a preset fission path data record table; and returning the current sharing code to the client so that the client can splice the current sharing code into a sharing link for sharing. Therefore, the source sharing code is continuously determined, the current sharing code is generated, the user identification, the preamble sharing code, the current sharing code and the source sharing code are recorded, the fission path data can be accurately and efficiently recorded and stored, and subsequent data analysis and data query are supported.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and apparatus for recording fission path data, a server, and a storage medium.
Background
The fission path refers to a specific propagation path of a user in a sharing activity, and by collecting fission path data, the activity effect can be accurately analyzed, friend relations generated by the user in the sharing activity can be obtained, fine operation can be performed, and the like, so that the collection of the fission path data has important significance. For this reason, a solution for recording fission path data is urgently needed, which can accurately and efficiently record and store the fission path data, and support subsequent data analysis and data query.
Disclosure of Invention
In order to solve the technical problems that the solution for recording the fission path data is needed urgently, the fission path data can be recorded and stored accurately and efficiently, and subsequent data analysis and data query are supported, the embodiment of the invention provides a recording method, a device, a server and a storage medium for the fission path data. The specific technical scheme is as follows:
in a first aspect of the embodiment of the present invention, there is first provided a recording method of fission path data, applied to a server, the method including:
receiving a sharing code generation request sent by a client, wherein the sharing code generation request carries a preamble sharing code and a user identifier;
determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request;
recording the user identification, the preamble sharing code, the current sharing code and the source sharing code in a preset fission path data record table; the method comprises the steps of,
and returning the current sharing code to the client so that the client can splice the current sharing code into a sharing link for sharing.
In an optional embodiment, the determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request includes:
and under the condition that the preamble sharing code is empty, generating a current sharing code in response to the sharing code generation request, and determining the current sharing code as a source sharing code.
In an optional embodiment, the determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request includes:
under the condition that the preamble sharing code is not empty, inquiring the preamble sharing code in a preset fission path data record table;
and if the preamble sharing code is inquired, acquiring a historical source sharing code of the preamble sharing code as a source sharing code, and generating a current sharing code in response to the sharing code generation request.
In an alternative embodiment, the method further comprises:
and if the preamble sharing code is not queried, responding to the sharing code generation request, and returning a message of failure in sharing code generation to the client.
In an optional embodiment, the generating the current sharing code in response to the sharing code generation request includes:
inquiring the user identification and the history sharing code corresponding to the preamble sharing code in a preset fission path data record table;
and if the user identification and the historical sharing code corresponding to the preamble sharing code are not queried, responding to the sharing code generation request to generate a current sharing code.
In an alternative embodiment, the method further comprises:
and if the user identifier and the history sharing code corresponding to the preamble sharing code are inquired, returning the user identifier and the history sharing code corresponding to the preamble sharing code to the client.
In an alternative embodiment, the method further comprises:
storing the user identification in a graph database as a path node by adopting a graph database storage mode;
and creating a corresponding edge for the path node, and recording the preamble sharing code, the current sharing code and the source sharing code on the edge.
In a second aspect of the embodiment of the present invention, there is also provided a recording apparatus of fission path data, applied to a server, the apparatus including:
the request receiving module is used for receiving a sharing code generation request sent by the client, wherein the sharing code generation request carries a preamble sharing code and a user identifier;
the sharing code generation module is used for determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request;
the path data recording module is used for recording the user identification, the preamble sharing code, the current sharing code and the source sharing code in a preset fission path data recording table; the method comprises the steps of,
and the sharing code returning module is used for returning the current sharing code to the client so that the client can splice the current sharing code in a sharing link for sharing.
In a third aspect of the embodiments of the present invention, there is also provided a server, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the method for recording fission path data according to any one of the first aspect when executing the program stored in the memory.
In a fourth aspect of embodiments of the present invention, there is further provided a storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the method of recording fissile path data as described in any of the first aspects above.
In a fifth aspect of embodiments of the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform a method of recording fissile path data as described in any of the above.
According to the technical scheme provided by the embodiment of the invention, a sharing code generation request sent by a client is received, wherein the sharing code generation request carries a preamble sharing code and a user identification, a source sharing code is determined according to the preamble sharing code, a current sharing code is generated in response to the sharing code generation request, the user identification, the preamble sharing code, the current sharing code and the source sharing code are recorded in a preset fission path data record table, and the current sharing code is returned to the client so that the client can splice the current sharing code in a sharing link for sharing. The method comprises the steps of receiving a sharing code generation request carrying a preamble sharing code and a user identification, determining a source sharing code and generating a current sharing code, recording the user identification, the preamble sharing code, the current sharing code and the source sharing code, returning the current sharing code to a client, enabling the client to splice the current sharing code in a sharing link for sharing, and transmitting the current sharing code to a next user, so that the source sharing code is continuously determined, the current sharing code is generated, the user identification, the preamble sharing code, the current sharing code and the source sharing code are recorded, fission path data can be accurately and efficiently recorded and stored, and follow-up data analysis and data query are supported.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of an architecture of a recording system for fission path data according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an embodiment of a method for recording fission path data according to the present invention;
FIG. 3 is a schematic flow chart of another embodiment of a method for recording fission path data according to the present invention;
FIG. 4 is a schematic diagram of a recording apparatus for fission path data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another server according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, a schematic architecture of a recording system 100 of fission path data according to an embodiment of the present invention, where the recording system 100 of fission path data may include a terminal device 101, a network 102, and a server 103. Network 102 is the medium used to provide communication links between terminal device 101 and server 103. Network 102 may include various connection types such as wired, wireless communication links, or fiber optic cables, among others.
It should be noted that the numbers of the terminal device 101, the network 102, and the server 103 shown in fig. 1 are merely illustrative. There may be any number of terminal devices 101, networks 102, and servers 103, as desired for implementation. For example, the server 103 may be a server cluster formed by a plurality of servers.
The server 103 may be a server providing various services. For example, the server 103 may receive a sharing code generation request sent by a client (the client is installed and operated on the terminal device 101), where the sharing code generation request carries a preamble sharing code and a user identifier, determine a source sharing code according to the preamble sharing code, generate a current sharing code in response to the sharing code generation request, record the user identifier, the preamble sharing code, the current sharing code and the source sharing code in a preset fission path data record table, and return the current sharing code to the client, so that the client splices the current sharing code in a sharing link for sharing.
The method comprises the steps of receiving a sharing code generation request carrying a preamble sharing code and a user identification, determining a source sharing code and generating a current sharing code, recording the user identification, the preamble sharing code, the current sharing code and the source sharing code, returning the current sharing code to a client, enabling the client to splice the current sharing code in a sharing link for sharing, and transmitting the current sharing code to a next user, so that the source sharing code is continuously determined, the current sharing code is generated, the user identification, the preamble sharing code, the current sharing code and the source sharing code are recorded, fission path data can be accurately and efficiently recorded and stored, and follow-up data analysis and data query are supported.
In the embodiment of the present invention, the recording method of the fission path data provided in the embodiment of the present invention is generally executed by the server 103, and accordingly, the recording device of the fission path data is generally disposed in the server 103. Furthermore, in another alternative embodiment of the present invention, some terminals may have functions similar to those of a server, so that a recording method of fission path data may be performed. Therefore, the recording method of the fission path data provided by the embodiment of the invention is not limited to be executed by the server.
Specifically, as shown in fig. 2, a schematic implementation flow chart of a method for recording fission path data according to an embodiment of the present invention is provided, where the method is applied to a server, and may specifically include the following steps:
s201, receiving a sharing code generation request sent by a client, wherein the sharing code generation request carries a preamble sharing code and a user identifier.
In the embodiment of the invention, in the sharing activity, a user can be used as an initiator of the sharing activity, a sharing button is clicked at a client point to share a certain connection, namely a sharing link, to a certain user, at this time, the client side can acquire a user identification of the user, and the user is used as the initiator of the sharing activity, so that no preamble sharing code exists in the sharing link, namely the preamble sharing code defaults to be empty, and then the client side can send a sharing code generation request carrying the user identification and the preamble sharing code to be empty to a server. The server receives a request for generating the sharing code sent by the client, where the request for generating the sharing code carries the preamble sharing code and the user identifier, and the preamble sharing code is null, which means that the preamble sharing code may default to 0.
In addition, in the sharing activity, the user can be used as a follow-up participant of the sharing activity, the client clicks a sharing link shared by a certain user, at this time, the client can obtain a user identification of the user, the user is used as a follow-up participant of the sharing activity, a preamble sharing code (i.e. the sharing code of the last user) exists in the sharing link, the client can also obtain the preamble sharing code, and then the client sends a sharing code generation request carrying the user identification and the non-null preamble sharing code to the server. The server also receives a sharing code generation request sent by the client, wherein the sharing code generation request carries a preamble sharing code and a user identifier, and the preamble sharing code is not null, that is, the preamble sharing code is the sharing code of the previous user.
For example, in a sharing activity, a user a acts as an initiator of the sharing activity, a sharing button is clicked at a client to share a sharing link with a user B, at this time, the client obtains the UID of the user a (i.e., the identity of the user a), and in addition, the user a acts as the initiator of the sharing activity, so that there is no preamble sharing code in the sharing link, i.e., the preamble sharing code defaults to be empty, and then the client sends a request for generating a sharing code carrying the UID of the user a and the preamble sharing code to be empty to the server. The server receives a request for generating the sharing code sent by the client, where the request for generating the sharing code carries the preamble sharing code and the UID of the user a, and the preamble sharing code is null, which means that the preamble sharing code may default to 0.
For another example, in the sharing activity, the user B is used as a subsequent participant of the sharing activity, the client clicks the sharing link shared by the user a to enter a specific activity page, at this time, the client obtains the UID of the user B, in addition, the user B is used as a subsequent participant of the sharing activity, the sharing link has a preamble sharing code (i.e. the sharing code of the user a), the client also obtains the preamble sharing code, and then the client sends a request for generating the sharing code carrying the UID of the user B and the preamble sharing code that is not null to the server. The server receives a sharing code generation request sent by the client, wherein the sharing code generation request carries a preamble sharing code and a UID of the user B, and the preamble sharing code is not null, namely the sharing code of the user A.
It should be noted that, for the preamble sharing code and the current sharing code, the source sharing code, the history source sharing code, etc. related later, the preamble sharing code is essentially different random characters, and the preamble sharing code may be c48ef293bde4432b8da25176a770eb3d, for example. For the user identifier, i.e. the identity identifier (UID) of the user, for example, the UID of the user a may be 1, and the UID of the user B may be 2, which is not limited in the embodiment of the present invention.
S202, determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request.
In the embodiment of the present invention, for the preamble sharing code, differences (for example, null or non-null) exist due to different roles (for example, initiator or subsequent participant) of the user triggering the sharing code generation request in the sharing activity, and accordingly, the determination of the source sharing code and the generation of the current sharing code also have differences, so that the preamble sharing code determines the determination of the source sharing code and the generation of the current sharing code. Thus, for the server, the source sharing code may be determined according to the preamble sharing code and the current sharing code may be generated in response to the sharing code generation request.
Under the condition that the preamble sharing code is empty, the user triggering the sharing code generation request plays an initiator role in the sharing activity, which means that the user plays an initiator role in the sharing activity, and accordingly the sharing code of the user at the moment is the source sharing code, so that the current sharing code of the user is generated first, then the current sharing code of the user is determined to be the source sharing code, that is to say, the current sharing code is generated in response to the sharing code generation request, and the current sharing code is determined to be the source sharing code.
For example, in a sharing activity, a user a acts as an initiator of the sharing activity, a sharing button is clicked at a client point to share a sharing link with a user B, at this time, the client side obtains the UID of the user a (i.e. the identity of the user a), and in addition, the user a acts as the initiator of the sharing activity, so that there is no preamble sharing code in the sharing link, i.e. the preamble sharing code defaults to be empty, and then the client side sends a request for generating a sharing code carrying the UID of the user and the preamble sharing code to be empty to the server. The server receives a request for generating a sharing code sent by the client, where the request for generating the sharing code carries a preamble sharing code and a UID of the user a, and the preamble sharing code is null, so that when the preamble sharing code is null, a current sharing code (abbreviated as SC) of the user a is generated in response to the request for generating the sharing code, that is, the SC of the user a, and then the current sharing code can be determined to be a source sharing code (abbreviated as SSC).
In addition, under the condition that the preamble sharing code is not null, the user triggering the request for generating the sharing code plays a role of a subsequent participant in the sharing activity, which means that the user plays a role of a subsequent participant in the sharing activity, and accordingly, the historical source sharing code of the preamble sharing code, namely the source sharing code, is determined without influencing the generation of the current sharing code, that is, the historical source sharing code of the preamble sharing code is obtained as the source sharing code, and the current sharing code is generated in response to the request for generating the sharing code.
In addition, in order to verify the legality of the preamble sharing code, it is ensured that the preamble sharing code is not tampered, before the historical source sharing code of the preamble sharing code is obtained as the source sharing code, and before the current sharing code is generated in response to the sharing code generation request, the preamble sharing code is queried in the preset fission path data record table, if the preamble sharing code is queried, the historical source sharing code of the preamble sharing code is obtained as the source sharing code, and the current sharing code is generated in response to the sharing code generation request.
For example, in a sharing activity, a user B is taken as a subsequent participant of the sharing activity, a client clicks a sharing link shared by a user a to enter a specific activity page, at this time, the client obtains the UID of the user B, in addition, the user B is taken as a subsequent participant of the sharing activity, a preamble sharing code (PSC for short, i.e. a sharing code of the user a) exists in the sharing link, the client also obtains the preamble sharing code, and then the client sends a sharing code generation request carrying the UID of the user B and the non-null preamble sharing code to a server. The server receives a sharing code generation request sent by the client, wherein the sharing code generation request carries a preamble sharing code and a UID of a user B, where the preamble sharing code is not null, i.e. the preamble sharing code is a sharing code of the user a, so that in the case that the preamble sharing code is not null, the server queries the preamble sharing code in a preset fission path data record table (abbreviated as SC data table), i.e. takes the PSC as the SC to query the SC data table, if the preamble sharing code is queried, meaning that the SC data table has a corresponding record, the preamble sharing code is legal, at this time, the history source sharing code of the preamble sharing code is acquired as the source sharing code, i.e. the SSC of the PSC is acquired as the current SSC, and correspondingly generates the current sharing code (of the user B), i.e. the SC of the user B, in response to the sharing code generation request.
And if the preamble sharing code is not queried in the preset fission path data record table, responding to the sharing code generation request, and returning a message of failure of sharing code generation to the client. For example, in the preset fission path data record table, if the preamble sharing code (i.e. SC of the user a) is not queried, it indicates that the preamble sharing code is illegal, and illegal data may be discarded, where a message of failure in sharing code generation may be returned to the client in response to the sharing code generation request, and the subsequent steps are not performed.
In addition, in order to avoid repeatedly generating unique sharing codes of users, before generating current sharing codes in response to a sharing code generation request, inquiring historical sharing codes corresponding to user identifiers and preamble sharing codes in a preset fission path data record table, if the historical sharing codes corresponding to the user identifiers and the preamble sharing codes are not inquired, generating the current sharing codes in response to the sharing code generation request, and if the historical sharing codes corresponding to the user identifiers and the preamble sharing codes are inquired, returning the historical sharing codes corresponding to the user identifiers and the preamble sharing codes to the client.
For example, in a preset fission path data record table, i.e. in the SC data table, the history sharing code corresponding to UID 1 and null preamble sharing code is queried, if the history sharing code corresponding to UID 1 and null preamble sharing code is not queried, it indicates that the unique sharing code of user a is generated for the first time, at this time, the current sharing code of user a may be generated in response to the sharing code generation request, i.e. SC of user a, otherwise, if the history sharing code corresponding to UID 1 and null preamble sharing code is queried, it indicates that the unique sharing code of user a has been generated, at this time, the history sharing code corresponding to UID 1 and null preamble sharing code may be returned to the client, and the client splices SC in the sharing link to share SC to user B.
It should be noted that, in the embodiment of the present invention, a unique current sharing code may be randomly generated in response to a sharing code generation request, so as to correspond to a user triggering the sharing code generation request, and the current sharing code may also be generated in a predetermined generation manner, for example, an incremental generation manner, for example, the current sharing code 2 is generated in an incremental generation manner, and the sharing code of the last user is 1.
And S203, recording the user identification, the preamble sharing code, the current sharing code and the source sharing code in a preset fission path data record table.
In the embodiment of the present invention, a user SC data table, that is, a fission path data record table, is created in advance, where the fission path data record table stores fields such as a user identifier, a current sharing code (SC, a sharing code of a user in a sharing link), a preamble sharing code (PSC, SC of a previous user), and a source sharing code (SSC, source sharing code, that is, SC corresponding to a source initiator of the current sharing link). Therefore, the user identification, the preamble sharing code, the current sharing code and the source sharing code are recorded in a preset fission path data record table.
For example, UID, SC (random character generated this time), PSC (no preamble shared code, default to 0), SSC (source originator is current user, SSC and SC are kept identical) of user a are recorded in the SC data table as shown in table 1 below.
TABLE 1
And S204, returning the current sharing code to the client so that the client can splice the current sharing code into a sharing link for sharing.
In the embodiment of the invention, the server can return the current sharing code to the client. Therefore, the client can receive the current sharing code and splice the current sharing code into the sharing link for sharing. If the current user is the initiator of the sharing activity, the client may splice the current sharing code in the sharing link to share directly, and if the current user is not the initiator of the sharing activity but a subsequent participant of the sharing activity, the client splices the current sharing code in the sharing link to share when the user clicks the sharing button.
For example, the server returns the current sharing code of the user a, that is, the SC of the user a, to the client, so that the client may receive the SC of the user a, where the user a is an initiator of the sharing activity, and the client may splice the SC of the user a in the sharing link to share the SC of the user a to the user B.
For example, the server returns the current sharing code of the user B, that is, the SC of the user B, to the client, so that the client may receive the SC of the user B, where the user B is a subsequent participant in the sharing activity, and for the client, may store the SC of the user B, and splice the SC of the user B to the user C in the sharing link under the condition that the user B clicks the sharing button.
Through the description of the technical scheme provided by the embodiment of the invention, the sharing code generation request sent by the client is received, wherein the sharing code generation request carries the preamble sharing code and the user identification, the source sharing code is determined according to the preamble sharing code, the current sharing code is generated in response to the sharing code generation request, the user identification, the preamble sharing code, the current sharing code and the source sharing code are recorded in the preset fission path data record table, and the current sharing code is returned to the client so that the client can splice the current sharing code in the sharing link for sharing.
The method comprises the steps of receiving a sharing code generation request carrying a preamble sharing code and a user identification, determining a source sharing code and generating a current sharing code, recording the user identification, the preamble sharing code, the current sharing code and the source sharing code, returning the current sharing code to a client, enabling the client to splice the current sharing code in a sharing link for sharing, and transmitting the current sharing code to a next user, so that the source sharing code is continuously determined, the current sharing code is generated, the user identification, the preamble sharing code, the current sharing code and the source sharing code are recorded, fission path data can be accurately and efficiently recorded and stored, and follow-up data analysis and data query are supported.
In order to more clearly describe the method for recording the fission path data provided by the embodiment of the present invention, the sharing of the user a to the user B and the sharing of the user B to the user C are described as follows, as shown in fig. 3:
in the sharing activity, the user A is used as an initiator of the sharing activity, the sharing button is clicked at the client to share the sharing link to the user B, at this time, the client can acquire the UID of the user A, and the user A is used as the initiator of the sharing activity, so that no preamble sharing code exists in the sharing link, namely the preamble sharing code defaults to be empty, and then the client can send a sharing code generation request carrying the UID of the user A and the preamble sharing code to be empty to the server.
The server receives a sharing code generation request sent by the client, wherein the sharing code generation request carries a preamble sharing code and a UID of a user A, and the preamble sharing code is empty. Therefore, under the condition that the preamble sharing code is empty, in a preset fissile path data record table, namely, in an SC data table, inquiring the UID of the user A and the history sharing code corresponding to the preamble sharing code being empty, if the UID of the user A and the history sharing code corresponding to the preamble sharing code being empty are inquired, returning the history sharing code to the client, otherwise, responding to a sharing code generation request to generate the current sharing code of the user A, namely, the SC of the user A, determining the SC of the user A as a source sharing code, recording the UID, the SC (current sharing code) and the PSC (default 0) of the user A in the SC data table, and returning the SC of the user A to the client.
In addition, the server uses a graph database storage mode (for example, nebula graph), stores the UID of the user a as a path node in the graph database, where the path node of the user a is a starting point, creates a corresponding edge for the path node, and records information such as SC (current sharing code), PSC (preamble sharing code is empty, default to 0), SSC (source sharing code, and SC of the user a.
And the client splices the SC of the user A in the sharing link and shares the SC with the user B. In the sharing activity, the user B is used as a subsequent participant of the sharing activity, the user B clicks the sharing link to enter a specific activity page, at this time, the client side obtains the UID of the user B and the preamble sharing code (i.e., SC of the user a, abbreviated as PSC) included in the sharing link, and then the client side sends a sharing code generation request carrying the UID of the user B and the PSC (i.e., SC of the user a) to the server.
The subsequent server receives the request for generating the sharing code, which is sent by the client and carries the UID of the user B and the PSC (i.e., SC of the user a), where the PSC (i.e., SC of the user a) is not null. Thus, when the PSC (i.e., the SC of the user a) is not empty, the PSC (i.e., the SC of the user a) is queried in the SC data table, that is, the PSC is considered as the SC to query the SC data table, if the PSC (i.e., the SC of the user a) is queried, meaning that the SC data table has a corresponding record, the PSC (i.e., the SC of the user a) is legal, at this time, the history source sharing code of the PSC (i.e., the SC of the user a) is obtained as the source sharing code, and if not queried, the UID of the user B and the history sharing code corresponding to the PSC (i.e., the SC of the user a) are queried in the SC data table, the current sharing code (i.e., the SC of the user B) is generated in response to the sharing code generation request, and UID, SC, PSC (i.e., the SC of the user a) and the SSC (source sharing code, which are consistent with the SC of the user a) are recorded in the SC data table, and the SC of the user B is returned to the client.
In addition, the PSC (i.e., the SC of the user a) can query the corresponding UID, i.e., the UID of the user a, so that it can be known that the user a is a sharer, the user B is a sharee, the UID of the user B is stored as a path node in the graph database, where the path node corresponding to the UID of the user B is a path node corresponding to the UID of the user a, and after the path node corresponding to the UID of the user a, an edge is created for the path node corresponding to the UID of the user B, and information such as the SC, PSC (i.e., the SC of the user a), SSC (source sharing code, which is consistent with the SC of the user a) and the like of the user B is recorded on the edge.
And the client splices the SC of the user B in the sharing link and shares the SC with the user C. In the sharing activity, the user C is used as a subsequent participant of the sharing activity, and the processing flow of the user C is similar to that of the user B, which is not described here again. Thus, using the graph database, the complete fission path data of user a > user B > user C is recorded and stored, and the data is collected extensively according to the flow, and can be analyzed and queried as follows:
1. statistics of the most direct fissile users: namely, the user corresponding to the record with the largest PSC (preamble sharing code) occurrence number can be counted by using SQL sentences;
2. the users with the most total fission are counted: namely, the user corresponding to the record with the largest occurrence number of SSC (source sharing code) can realize statistics by using SQL sentences;
3. fission path query: providing the starting point user UID, and inquiring the side and point information passed by the designated starting point by using the inquiring capability of the graph database.
The method comprises the steps of receiving a sharing code generation request carrying a preamble sharing code and a user identification, determining a source sharing code and generating a current sharing code, recording the user identification, the preamble sharing code, the current sharing code and the source sharing code, returning the current sharing code to a client, enabling the client to splice the current sharing code in a sharing link for sharing, and transmitting the current sharing code to a next user, so that the source sharing code is continuously determined, the current sharing code is generated, the user identification, the preamble sharing code, the current sharing code and the source sharing code are recorded, fission path data can be accurately and efficiently recorded and stored, and follow-up data analysis and data query are supported.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a recording apparatus for fission path data, as shown in fig. 4, where the apparatus may include: a request receiving module 410, a shared code generating module 420, a path data recording module 430, and a shared code returning module 440.
A request receiving module 410, configured to receive a sharing code generation request sent by a client, where the sharing code generation request carries a preamble sharing code and a user identifier;
the sharing code generating module 420 is configured to determine a source sharing code according to the preamble sharing code and generate a current sharing code in response to the sharing code generating request;
the path data recording module 430 is configured to record the user identifier, the preamble sharing code, the current sharing code, and the source sharing code in a preset fission path data recording table; the method comprises the steps of,
and the sharing code returning module 440 is configured to return the current sharing code to the client, so that the client splices the current sharing code into a sharing link for sharing.
The embodiment of the invention also provides a server, as shown in fig. 5, comprising a processor 51, a communication interface 52, a memory 53 and a communication bus 54, wherein the processor 51, the communication interface 52 and the memory 53 complete communication with each other through the communication bus 54,
a memory 53 for storing a computer program;
the processor 51 is configured to execute a program stored in the memory 53, and implement the following steps:
receiving a sharing code generation request sent by a client, wherein the sharing code generation request carries a preamble sharing code and a user identifier; determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request; recording the user identification, the preamble sharing code, the current sharing code and the source sharing code in a preset fission path data record table; and returning the current sharing code to the client so that the client can splice the current sharing code into a sharing link for sharing.
The communication bus mentioned by the server may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, there is further provided a storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the method of recording fissile path data as set forth in any of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the method of recording fissile path data as described in any of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage media may be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (8)
1. A recording method of fission path data, characterized by being applied to a server, the method comprising:
receiving a sharing code generation request sent by a client, wherein the sharing code generation request carries a preamble sharing code and a user identifier;
determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request; the generating the current sharing code in response to the sharing code generation request comprises the following steps: inquiring the user identification and the history sharing code corresponding to the preamble sharing code in a preset fission path data record table; if the user identification and the historical sharing code corresponding to the preamble sharing code are not queried, responding to the sharing code generation request to generate a current sharing code; if the user identification and the history sharing code corresponding to the preamble sharing code are inquired, returning the user identification and the history sharing code corresponding to the preamble sharing code to the client;
recording the user identification, the preamble sharing code, the current sharing code and the source sharing code in a preset fission path data record table; the method comprises the steps of,
and returning the current sharing code to the client so that the client can splice the current sharing code into a sharing link for sharing.
2. The method of claim 1, wherein the determining a source sharing code from the preamble sharing code and generating a current sharing code in response to the sharing code generation request comprises:
and under the condition that the preamble sharing code is empty, generating a current sharing code in response to the sharing code generation request, and determining the current sharing code as a source sharing code.
3. The method of claim 1, wherein the determining a source sharing code from the preamble sharing code and generating a current sharing code in response to the sharing code generation request comprises:
under the condition that the preamble sharing code is not empty, inquiring the preamble sharing code in a preset fission path data record table;
and if the preamble sharing code is inquired, acquiring a historical source sharing code of the preamble sharing code as a source sharing code, and generating a current sharing code in response to the sharing code generation request.
4. A method according to claim 3, characterized in that the method further comprises:
and if the preamble sharing code is not queried, responding to the sharing code generation request, and returning a message of failure in sharing code generation to the client.
5. The method according to claim 1, wherein the method further comprises:
storing the user identification in a graph database as a path node by adopting a graph database storage mode;
and creating a corresponding edge for the path node, and recording the preamble sharing code, the current sharing code and the source sharing code on the edge.
6. A recording apparatus for fission path data, applied to a server, the apparatus comprising:
the request receiving module is used for receiving a sharing code generation request sent by the client, wherein the sharing code generation request carries a preamble sharing code and a user identifier;
the sharing code generation module is used for determining a source sharing code according to the preamble sharing code and generating a current sharing code in response to the sharing code generation request; the generating the current sharing code in response to the sharing code generation request comprises the following steps: inquiring the user identification and the history sharing code corresponding to the preamble sharing code in a preset fission path data record table; if the user identification and the historical sharing code corresponding to the preamble sharing code are not queried, responding to the sharing code generation request to generate a current sharing code; if the user identification and the history sharing code corresponding to the preamble sharing code are inquired, returning the user identification and the history sharing code corresponding to the preamble sharing code to the client;
the path data recording module is used for recording the user identification, the preamble sharing code, the current sharing code and the source sharing code in a preset fission path data recording table; the method comprises the steps of,
and the sharing code returning module is used for returning the current sharing code to the client so that the client can splice the current sharing code in a sharing link for sharing.
7. The server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1-5 when executing a program stored on a memory.
8. A storage medium having stored thereon a computer program, which when executed by a processor, implements the method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210333580.0A CN114745421B (en) | 2022-03-30 | 2022-03-30 | Method, device, server and storage medium for recording fission path data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210333580.0A CN114745421B (en) | 2022-03-30 | 2022-03-30 | Method, device, server and storage medium for recording fission path data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114745421A CN114745421A (en) | 2022-07-12 |
CN114745421B true CN114745421B (en) | 2023-10-10 |
Family
ID=82278589
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210333580.0A Active CN114745421B (en) | 2022-03-30 | 2022-03-30 | Method, device, server and storage medium for recording fission path data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114745421B (en) |
Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008217376A (en) * | 2007-03-02 | 2008-09-18 | Vision Arts Kk | Content sharing method and system |
CN105893636A (en) * | 2016-06-23 | 2016-08-24 | 乐视控股(北京)有限公司 | Historical sharing recording method and device |
WO2018076865A1 (en) * | 2016-10-25 | 2018-05-03 | 广东欧珀移动通信有限公司 | Data sharing method, device, storage medium, and electronic device |
CN109074591A (en) * | 2016-12-15 | 2018-12-21 | S·阿鲁穆加姆 | URL for tracking user shares historic villages and towns |
CN110175661A (en) * | 2019-04-17 | 2019-08-27 | 深圳壹账通智能科技有限公司 | The generation method and device in two dimensional code sharing path |
WO2019174124A1 (en) * | 2018-03-16 | 2019-09-19 | South University Of Science And Technology | File sharing method based on two-dimensional code, server and terminal device |
CN110297717A (en) * | 2018-03-22 | 2019-10-01 | 香港乐蜜有限公司 | Determine method, apparatus, electronic equipment and the storage medium of client application participator |
CN110322269A (en) * | 2019-05-09 | 2019-10-11 | 成都天钥科技有限公司 | A kind of internet marketing method |
CN110912809A (en) * | 2019-12-23 | 2020-03-24 | 京东数字科技控股有限公司 | Information sharing chain generation method and device, electronic equipment and storage medium |
CN111447137A (en) * | 2020-02-29 | 2020-07-24 | 中国平安人寿保险股份有限公司 | Browsing condition data analysis method and device, server and storage medium |
CN111447081A (en) * | 2020-02-29 | 2020-07-24 | 中国平安人寿保险股份有限公司 | Data chain generation method, device, server and storage medium |
CN111460049A (en) * | 2020-04-01 | 2020-07-28 | 北京字节跳动网络技术有限公司 | Content sharing method and device, electronic equipment and computer readable storage medium |
CN111639280A (en) * | 2020-05-27 | 2020-09-08 | 北京学之途网络科技有限公司 | Information sharing method and device |
CN111782617A (en) * | 2020-06-30 | 2020-10-16 | 深圳前海微众银行股份有限公司 | Shared data analysis method and device based on application link and readable storage medium |
KR102238622B1 (en) * | 2020-12-30 | 2021-04-12 | 주식회사 엔에스씨비씨 | Product sales system |
WO2021093423A1 (en) * | 2019-11-11 | 2021-05-20 | 北京沃东天骏信息技术有限公司 | Method and device for tagging user |
CN113536160A (en) * | 2020-04-21 | 2021-10-22 | ***通信集团贵州有限公司 | Page link processing method and device, electronic equipment and storage medium |
CN113783869A (en) * | 2021-09-08 | 2021-12-10 | 上海达龙信息科技有限公司 | Sharing link-based cloud application sharing method and device, storage medium and equipment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190356744A1 (en) * | 2018-05-17 | 2019-11-21 | International Business Machines Corporation | Transforming a shortened link based upon social event for tracking sharing analytics |
US11416484B2 (en) * | 2019-10-15 | 2022-08-16 | Salesforce, Inc. | Performance optimization of hybrid sharing model queries |
-
2022
- 2022-03-30 CN CN202210333580.0A patent/CN114745421B/en active Active
Patent Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008217376A (en) * | 2007-03-02 | 2008-09-18 | Vision Arts Kk | Content sharing method and system |
CN105893636A (en) * | 2016-06-23 | 2016-08-24 | 乐视控股(北京)有限公司 | Historical sharing recording method and device |
WO2018076865A1 (en) * | 2016-10-25 | 2018-05-03 | 广东欧珀移动通信有限公司 | Data sharing method, device, storage medium, and electronic device |
CN109074591A (en) * | 2016-12-15 | 2018-12-21 | S·阿鲁穆加姆 | URL for tracking user shares historic villages and towns |
WO2019174124A1 (en) * | 2018-03-16 | 2019-09-19 | South University Of Science And Technology | File sharing method based on two-dimensional code, server and terminal device |
CN110297717A (en) * | 2018-03-22 | 2019-10-01 | 香港乐蜜有限公司 | Determine method, apparatus, electronic equipment and the storage medium of client application participator |
CN110175661A (en) * | 2019-04-17 | 2019-08-27 | 深圳壹账通智能科技有限公司 | The generation method and device in two dimensional code sharing path |
CN110322269A (en) * | 2019-05-09 | 2019-10-11 | 成都天钥科技有限公司 | A kind of internet marketing method |
WO2021093423A1 (en) * | 2019-11-11 | 2021-05-20 | 北京沃东天骏信息技术有限公司 | Method and device for tagging user |
CN110912809A (en) * | 2019-12-23 | 2020-03-24 | 京东数字科技控股有限公司 | Information sharing chain generation method and device, electronic equipment and storage medium |
CN111447081A (en) * | 2020-02-29 | 2020-07-24 | 中国平安人寿保险股份有限公司 | Data chain generation method, device, server and storage medium |
CN111447137A (en) * | 2020-02-29 | 2020-07-24 | 中国平安人寿保险股份有限公司 | Browsing condition data analysis method and device, server and storage medium |
CN111460049A (en) * | 2020-04-01 | 2020-07-28 | 北京字节跳动网络技术有限公司 | Content sharing method and device, electronic equipment and computer readable storage medium |
CN113536160A (en) * | 2020-04-21 | 2021-10-22 | ***通信集团贵州有限公司 | Page link processing method and device, electronic equipment and storage medium |
CN111639280A (en) * | 2020-05-27 | 2020-09-08 | 北京学之途网络科技有限公司 | Information sharing method and device |
CN111782617A (en) * | 2020-06-30 | 2020-10-16 | 深圳前海微众银行股份有限公司 | Shared data analysis method and device based on application link and readable storage medium |
KR102238622B1 (en) * | 2020-12-30 | 2021-04-12 | 주식회사 엔에스씨비씨 | Product sales system |
CN113783869A (en) * | 2021-09-08 | 2021-12-10 | 上海达龙信息科技有限公司 | Sharing link-based cloud application sharing method and device, storage medium and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114745421A (en) | 2022-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108153670B (en) | Interface testing method and device and electronic equipment | |
CN113364853B (en) | Business service system, business request method and gateway equipment | |
CN111723313A (en) | Page jump processing method, device, equipment and storage medium | |
JP2015508543A (en) | Processing store visit data | |
CN111104664A (en) | Risk identification method of electronic equipment and server | |
CN108366012B (en) | Social relationship establishing method and device and electronic equipment | |
CN110134583B (en) | Software testing and data processing method and device | |
CN108712478A (en) | A kind of method and apparatus for sharing boarding application | |
CN113067853A (en) | Data pushing method and device, electronic equipment and storage medium | |
CN108650123B (en) | Fault information recording method, device, equipment and storage medium | |
CN111355765A (en) | Network request processing and sending method and device | |
CN111367691B (en) | Data feedback method and device, electronic equipment and storable medium | |
CN114745421B (en) | Method, device, server and storage medium for recording fission path data | |
CN112860567A (en) | Buried point identification method and device, computer equipment and storage medium | |
CN110727895B (en) | Sensitive word sending method and device, electronic equipment and storage medium | |
CN110427538B (en) | Data query method, data storage method, data query device, data storage device and electronic equipment | |
CN113114611B (en) | Blacklist management method and device | |
CN111045983B (en) | Nuclear power station electronic file management method, device, terminal equipment and medium | |
CN113254399A (en) | Log query method and device, electronic equipment and medium | |
CN111782428A (en) | Data calling system and method | |
CN111061543A (en) | Multi-tenant workflow engine service method, device and server | |
CN111291127B (en) | Data synchronization method, device, server and storage medium | |
CN110955847B (en) | Information processing method, device, storage medium and processor | |
CN112486816B (en) | Test method, test device, electronic equipment and storage medium | |
CN115118583A (en) | Log query method and device, electronic equipment and computer readable storage equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |