CN114745421A - Fission path data recording method, device, server and storage medium - Google Patents

Fission path data recording method, device, server and storage medium Download PDF

Info

Publication number
CN114745421A
CN114745421A CN202210333580.0A CN202210333580A CN114745421A CN 114745421 A CN114745421 A CN 114745421A CN 202210333580 A CN202210333580 A CN 202210333580A CN 114745421 A CN114745421 A CN 114745421A
Authority
CN
China
Prior art keywords
sharing code
sharing
code
preamble
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.)
Granted
Application number
CN202210333580.0A
Other languages
Chinese (zh)
Other versions
CN114745421B (en
Inventor
刘文才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202210333580.0A priority Critical patent/CN114745421B/en
Publication of CN114745421A publication Critical patent/CN114745421A/en
Application granted granted Critical
Publication of CN114745421B publication Critical patent/CN114745421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9017Indexing; Data structures therefor; Storage structures using directory or table look-up
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; 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 preorder 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 preorder sharing code, the current sharing code and the source sharing code in a preset fission path data recording table; and returning the current sharing code to the client so that the client can splice the current sharing code in a sharing link for sharing. Therefore, the source sharing code is continuously determined, the current sharing code is generated, the user identification, the preorder sharing code, the current sharing code and the source sharing code are recorded, the fission path data can be accurately and efficiently recorded, and subsequent data analysis and data query are supported.

Description

Fission path data recording method, device, server and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to a method, a device, a server and a storage medium for recording fission path data.
Background
The fission path is a specific propagation path of a user in the sharing activity, the activity effect can be accurately analyzed by collecting fission path data, the friend relationship generated by the user in the sharing activity is obtained, the fine operation is carried out, and the like, so that the fission path data collection has important significance. Therefore, a solution for recording fission path data is urgently needed, the fission path data can be accurately and efficiently recorded and stored, and subsequent data analysis and data query are supported.
Disclosure of Invention
In order to solve the technical problems that a solution for recording fission path data is urgently needed, the fission path data can be accurately and efficiently recorded and stored, and subsequent data analysis and data query are supported, the embodiment of the invention provides a fission path data recording method, a fission path data recording device, a server and a storage medium. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, there is first provided a method for recording 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 preorder 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 preorder sharing code, the current sharing code and the source sharing code in a preset fission path data recording table; and the number of the first and second groups,
and returning the current sharing code to the client so that the client splices the current sharing code in 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 include:
and under the condition that the preamble sharing code is empty, responding to the sharing code generation request to generate a current sharing code, and determining that the current sharing code is 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 include:
under the condition that the preamble sharing code is not empty, inquiring the preamble sharing code in a preset fission path data record table;
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 optional embodiment, the method further comprises:
and if the preamble sharing code is not inquired, responding to the sharing code generation request, and returning a sharing code generation failure message to the client.
In an optional embodiment, the generating a current sharing code in response to the sharing code generation request includes:
querying the user identification and a historical sharing code corresponding to the preamble sharing code in a preset fission path data recording table;
and if the user identification and the historical sharing code corresponding to the preamble sharing code are not inquired, responding to the sharing code generation request to generate a current sharing code.
In an optional embodiment, the method further comprises:
and 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.
In an optional embodiment, the method further comprises:
storing the user identification as a path node in 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 embodiments 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 a client, wherein the sharing code generation request carries a preorder sharing code and a user identifier;
the sharing code generating 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 generating request;
a path data recording module, 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; and the number of the first and second groups,
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 further provided a server, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method for recording fission path data according to any one of the first aspect described above, when executing a program stored in the memory.
In a fourth aspect of embodiments of the present invention, there is also provided a storage medium having stored therein instructions that, when run on a computer, cause the computer to execute the method of recording fission path data as recited in any one of the first aspects above.
In a fifth aspect of embodiments of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-described fission path data recording methods.
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 preorder sharing code and a user identifier, a source sharing code is determined according to the preorder sharing code, a current sharing code is generated in response to the sharing code generation request, the user identifier, the preorder sharing code, the current sharing code and the source sharing code are recorded in a preset fission path data recording table, and the current sharing code is returned 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 preorder sharing code and a user identifier, determining a source sharing code and generating a current sharing code, recording the user identifier, the preorder 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 accordingly transmitting the current sharing code to a next user.
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 present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is an architectural schematic diagram of a fission path data recording system shown in an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation of a fission path data recording method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating another implementation of a fission path data recording method in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a fission path data recording device shown in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another server shown in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, an architecture diagram of a recording system 100 for fission path data provided for an embodiment of the present invention is provided, and the recording system 100 for 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 devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be noted that the numbers of the terminal apparatuses 101, the networks 102, and the servers 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 composed of a plurality of servers.
The server 103 may be a server that provides 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 to share.
The method comprises the steps of receiving a sharing code generation request carrying a preorder sharing code and a user identifier, determining a source sharing code and generating a current sharing code, recording the user identifier, the preorder 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 accordingly transmitting the current sharing code to a next user.
In the embodiment of the present invention, the recording method of the fission path data provided by 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 a function similar to that of the server, so that the recording method of the 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 a server.
Specifically, as shown in fig. 2, an implementation flow diagram of a method for recording fission path data provided in an embodiment of the present invention is applied to a server, and the method may specifically include the following steps:
s201, receiving a sharing code generation request sent by a client, where the sharing code generation request carries a preamble sharing code and a user identifier.
In the embodiment of the invention, in a sharing activity, a user can serve as an initiator of the sharing activity, a client clicks a sharing button, a certain connection, namely a sharing link, is shared with a certain user, at the moment, the client can acquire a user identifier of the user, the user serves as the initiator of the sharing activity, so that no preamble sharing code exists in the sharing link, namely the preamble sharing code is empty by default, and then the client sends a sharing code generation request carrying the user identifier and the preamble sharing code which are empty to a server. Thus, the server receives a sharing code generation request sent by the client, wherein the sharing code generation request carries the preamble sharing code and the user identifier, and the absence of the preamble sharing code means that the preamble sharing code can be defaulted to 0.
In addition, in the sharing activity, a user can serve as a subsequent participant of the sharing activity, a sharing link shared by a certain user is clicked at a client, the client can obtain a user identifier of the user at the moment, the user serves as the subsequent participant of the sharing activity, a preamble sharing code (namely, a sharing code of a previous user) exists in the sharing link, the client can also obtain the preamble sharing code, and then the client sends a non-empty sharing code generation request carrying the user identifier and the preamble sharing code to a server. Thus, the server also receives a sharing code generation request sent by the client, wherein the sharing code generation request carries the preamble sharing code and the user identifier, and the preamble sharing code is not empty, that is, the preamble sharing code is the sharing code of the previous user.
For example, in a sharing activity, a user a serves as an initiator of the sharing activity, a client clicks a sharing button, a sharing link is shared with a user B, at this time, the client acquires a UID (i.e., an identity of the user a) of the user a, the user a serves as an initiator of the sharing activity, so that no preamble sharing code exists in the sharing link, i.e., the preamble sharing code is empty by default, and then the client sends a sharing code generation request carrying the UID of the user a and the preamble sharing code which are empty to a server. Thus, the server receives a sharing code generation request sent by the client, wherein the sharing code generation request carries the preamble sharing code and the UID of the user a, and the fact that the preamble sharing code is empty means that the preamble sharing code can be defaulted to 0.
For another example, in a sharing activity, a user B, as a subsequent participant of the sharing activity, clicks a sharing link shared by the user a at a client to enter a specific activity page, at this time, the client may obtain the UID of the user B, and in addition, the user B, as a subsequent participant of the sharing activity, has a preamble sharing code (i.e., the sharing code of the user a) in the sharing link, the client may also obtain the preamble sharing code, and then the client sends a sharing code generation request carrying the UID of the user B and the preamble sharing code, which is not empty, to the server. Thus, the server receives a sharing code generation request sent by the client, wherein the sharing code generation request carries the preamble sharing code and the UID of the user B, and the preamble sharing code is not empty, namely, the sharing code of the user a.
It should be noted that the preamble and the current, source, history source, etc. shared code to be referred to later are substantially different random characters and are unique, for example, the preamble may be c48ef293bde4432b8da25176a770eb3 d. For the user identifier, that is, the identity identifier (abbreviated as 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 this embodiment of the present invention.
S202, according to the preamble sharing code, determining a source sharing code and responding to the sharing code generation request to generate a current sharing code.
In the embodiment of the present invention, for the preamble sharing code, there is a difference (for example, null or non-null) due to different roles (for example, an initiator or a subsequent participant) played by a user triggering the sharing code generation request in the sharing activity, and there is a difference in the corresponding determination of the source sharing code and the generation of the current sharing code, so that the determination of the source sharing code and the generation of the current sharing code are determined by the preamble 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.
When the preceding sharing code is empty, the user triggering the sharing code generation request plays the role of an initiator in the sharing activity, which means that the user plays the initiator in the sharing activity, and the corresponding sharing code of the user at this time 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, 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 serves as an initiator of the sharing activity, a client clicks a sharing button, a sharing link is shared with a user B, at this time, the client acquires a UID of the user a (i.e., an identity of the user a), the user a serves as an initiator of the sharing activity, so that no preamble sharing code exists in the sharing link, i.e., the preamble sharing code is empty by default, and then the client sends a sharing code generation request carrying the UID of the user and the preamble sharing code which are empty to a server. Thus, the server receives a sharing code generation request sent by the client, wherein the sharing code generation request carries a preamble sharing code and the UID of the user a, and the preamble sharing code is null, so that under the condition that the preamble sharing code is null, a current sharing code (SC for short) of the user a is generated in response to the sharing code generation request, that is, the SC of the user a, and then the current sharing code can be determined to be a source sharing code (SSC for short).
In addition, under the condition that the preamble sharing code is not empty, the user triggering the sharing code generation request plays the role of a subsequent participant in the sharing activity, that is, the user plays the subsequent participant in the sharing activity, and correspondingly, the historical source sharing code of the preamble sharing code at the moment is the source sharing code, the determination of the source sharing code is not affected by 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 sharing code generation request.
In addition, in order to verify the validity of the preamble sharing code and ensure that the preamble sharing code is not tampered, the preamble sharing code is inquired in a preset fission path data recording table before a historical source sharing code of the preamble sharing code is acquired as the source sharing code and a current sharing code is generated in response to a sharing code generation request, and if the preamble sharing code is inquired, the historical source sharing code of the preamble sharing code is acquired 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 used as a subsequent participant of the sharing activity, a client clicks a sharing link shared by the user a to enter a specific activity page, at this time, the client acquires a UID of the user B, and in addition, the user B is used as a subsequent participant of the sharing activity, a preamble sharing code (PSC for short, namely, the sharing code of the user a) exists in the sharing link, the client also acquires the preamble sharing code, and then the client sends a sharing code generation request carrying the UID of the user B and the non-empty preamble sharing code to a server. Thus, 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 empty, that is, the preamble sharing code is a sharing code of the user a, and therefore, when the preamble sharing code is not empty, the sharing preamble is queried in a preset fission path data record table (SC data table for short), that is, a PSC is used as an SC query SC data table, and if the preamble sharing code is queried, which means that the SC data table has a corresponding record, it indicates that the preamble sharing code is legal, at this time, a historical source sharing code of the sharing code is obtained as a source sharing code, that is, the SSC of the PSC is obtained as a current SSC, and a corresponding response to the sharing code generation request generates a current sharing code (of the user B), that is, the SC of the user B.
And in a preset fission path data record table, if the preorder sharing code is not inquired, responding to the sharing code generation request, and returning a sharing code generation failure message to the client. For example, in a preset fission path data record table, if the preamble sharing code (i.e. the SC of the user a) is not queried, it indicates that the preamble sharing code is illegal, and the illegal data may be discarded, at this time, a message that the generation of the sharing code fails may be returned to the client in response to the sharing code generation request, and the subsequent steps are not executed.
In addition, in order to avoid repeated generation of the unique sharing code of the user, before the current sharing code is generated in response to the sharing code generation request, historical sharing codes corresponding to the user identification and the preamble sharing code are inquired in a preset fission path data record table, if the historical sharing codes corresponding to the user identification and the preamble sharing code are not inquired, the current sharing code is generated in response to the sharing code generation request, and if the historical sharing codes corresponding to the user identification and the preamble sharing code are inquired, the historical sharing codes corresponding to the user identification and the preamble sharing code are returned to the client.
For example, in a preset fission path data record table, that is, in an SC data table, a historical share code corresponding to a UID of 1 and a preamble share code of null is queried, if a historical share code corresponding to a UID of 1 and a preamble share code of null is not queried, it is indicated that the unique share code of the user a is currently generated for the first time, at this time, a current share code of the user a, that is, an SC of the user a, may be generated in response to a share code generation request, otherwise, if a historical share code corresponding to a UID of 1 and a preamble share code of null is queried, it is indicated that the unique share code of the user a has been generated, at this time, a historical share code corresponding to a UID of 1 and a preamble share code of null may be returned to the client, and the client splices the SC in a share link to the 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 of course, the current sharing code may also be generated according to a predetermined generation manner, for example, an incremental generation manner, for example, a current sharing code 2 is generated according to an incremental generation manner, and the sharing code of a previous user is 1, which is not limited in the embodiment of the present invention.
S203, 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.
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, a user identifier, a preorder sharing code, a current sharing code and a source sharing code are recorded in a preset fission path data recording table.
For example, UID and SC (random character generated this time), PSC (default to 0 without preamble sharing code), SSC (source initiator is the current user, and SSC and SC are consistent) of user a are recorded in the SC data table, as shown in table 1 below.
Figure BDA0003573796730000101
TABLE 1
And S204, 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 the embodiment of the present invention, the server may return the current sharing code to the client. Therefore, the client can receive the current sharing code and splice the current sharing code in the sharing link for sharing. If the current user is the initiator of the sharing activity, the client can splice the current sharing code in the sharing link for direct sharing, and if the current user is not the initiator of the sharing activity but a subsequent participant of the sharing activity, for the client, under the condition that the user clicks the sharing button, the current sharing code is spliced in the sharing link for sharing.
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 can receive the SC of the user a, where the user a is an initiator of the sharing activity, and the client can 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 can receive the SC of the user B, where the user B is a subsequent participant of the sharing activity, and for the client, the SC of the user B can be stored, and the SC of the user B is spliced in the sharing link to be shared to the user C when the user B clicks the sharing button.
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 preorder sharing code and a user identifier, a source sharing code is determined according to the preorder sharing code, a current sharing code is generated in response to the sharing code generation request, the user identifier, the preorder sharing code, the current sharing code and the source sharing code are recorded in a preset fission path data recording 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 preorder sharing code and a user identifier, determining a source sharing code and generating a current sharing code, recording the user identifier, the preorder 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 accordingly transmitting the current sharing code to a next user.
In order to describe the method for recording fission path data more clearly according to the embodiment of the present invention, the link that the user a shares with the user B and the user B shares with the user C is described as follows, as shown in fig. 3:
in the sharing activity, a user A serves as an initiator of the sharing activity, a sharing button is clicked at a client, a sharing link is shared to a user B, the client can obtain the UID of the user A at the moment, the user A serves as the initiator of the sharing activity, therefore, no preamble sharing code exists in the sharing link, namely, the preamble sharing code is empty by default, and then the client can send a sharing code generation request carrying the UID of the user A and the sharing preamble code which is empty 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 the UID of the user A, and the preamble sharing code is null. Therefore, under the condition that the preamble sharing code is empty, a historical sharing code corresponding to the fact that the UID and the preamble sharing code of the user A are empty is inquired in a preset fission path data record table, namely an SC data table, if the UID and the preamble sharing code of the user A are inquired, the historical sharing code is returned to the client, otherwise, a current sharing code of the user A, namely the SC of the user A is generated in response to a sharing code generation request, the SC of the user A is determined to be a source sharing code, the UID, the SC (the current sharing code), the PSC (the preamble sharing code is empty, and is 0 by default), the SSC (the source sharing code is consistent with the SC of the user A), and the SC of the user A is returned to the client.
In addition, the server stores the UID of the user a as a path node in a graph database storage manner (e.g., NebulaGraph), 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 the SC (current sharing code), the PSC (preamble sharing code is empty, and 0 is default), the SSC (source sharing code, and is consistent with the SC of the user a) of the user a on the edge.
And the client splices the SC of the user A in a sharing link to share the SC to 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 acquires the UID and the preamble sharing code of the user B (namely, the SC of the user a included in the sharing link, which is abbreviated as PSC), and then the client sends a sharing code generation request carrying the UID and the PSC of the user B (namely, the SC of the user a) to the server.
The subsequent server receives a request for generating the sharing code, which is sent by the client and carries the UID of the user B and the PSC (namely, the SC of the user a), wherein the PSC (namely, the SC of the user a) is not null. Therefore, 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 used as the SC query SC data table, if the PSC (i.e. the SC of the user a) is queried, it means that the SC data table has a corresponding record, which indicates that the PSC (i.e. the SC of the user a) is legal, at this time, a historical source sharing code of the PSC (i.e. the SC of the user a) is obtained as the source sharing code, the UID of the user B and the historical sharing code corresponding to the PSC (i.e. the SC of the user a) are queried in the SC data table, if the UID of the user B, the SC, the PSC (i.e. the PSC of the user B) and the SSC (i.e. the SC of the user a) are not queried, the UID, the PSC of the user B, the SSC (i.e. the SC of the user a) and the SSC (i.e. the source sharing code 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 inquire about the corresponding UID, i.e. the UID of the user a, so that the user a is known to be the sharer, the user B is known to be the sharee, the UID of the user B is stored in the database as a path node, and here, the path node corresponding to the UID of the user B is located behind 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) of the user B is recorded on the edge.
And the client splices the SC of the user B in a sharing link to share the SC to 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, and the details are not repeated herein. Therefore, the graph database is used for recording and storing the complete fission path data of the user A, the user B and the user C, and the data is widely collected according to the process and can be analyzed and inquired as follows:
1. counting the users with the most direct fissions: that is, the user corresponding to the record with the most occurrence times of PSC (preamble sharing code) can realize statistics by using SQL statements;
2. counting the users with the most fission overall: that is, the user corresponding to the record with the most number of SSC (source sharing code) occurrences can realize statistics by using SQL statements;
3. fission path query: an origin user UID is provided, and the graph database query capability is used to query the information of the edge and point passed by the specified origin.
The method comprises the steps of receiving a sharing code generation request carrying a preorder sharing code and a user identifier, determining a source sharing code and generating a current sharing code, recording the user identifier, the preorder 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 accordingly transmitting the sharing code to a next user.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides an apparatus for recording fission path data, where as shown in fig. 4, the apparatus may include: the request receiving module 410, the sharing code generating module 420, the path data recording module 430, and the sharing 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;
a sharing code generating module 420, 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;
a path data recording module 430, 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; and the number of the first and second groups,
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 in a sharing link for sharing.
The embodiment of the present invention further provides a server, as shown in fig. 5, including a processor 51, a communication interface 52, a memory 53 and a communication bus 54, where the processor 51, the communication interface 52, and the memory 53 complete mutual communication through the communication bus 54,
a memory 53 for storing a computer program;
the processor 51 is configured to implement the following steps when executing the program stored in the memory 53:
receiving a sharing code generation request sent by a client, wherein the sharing code generation request carries a preorder 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 recording table; and returning the current sharing code to the client so that the client can splice the current sharing code in a sharing link for sharing.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is 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 a Random Access Memory (RAM) or a 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 processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present invention, there is also provided a storage medium having stored therein instructions that, when run on a computer, cause the computer to perform the method of recording fission path data as recited in any of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to carry out the method of recording fission path data as recited in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. 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)), among others.
It is noted that, herein, 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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method of recording fission path data, 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 preorder 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 preorder sharing code, the current sharing code and the source sharing code in a preset fission path data recording table; and the number of the first and second groups,
and returning the current sharing code to the client so that the client splices the current sharing code in a sharing link for sharing.
2. The method of claim 1, wherein 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 comprises:
and under the condition that the preamble sharing code is empty, responding to the sharing code generation request to generate a current sharing code, and determining that the current sharing code is a source sharing code.
3. The method of claim 1, wherein 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 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;
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. The method of claim 3, further comprising:
and if the preamble sharing code is not inquired, responding to the sharing code generation request, and returning a message of sharing code generation failure to the client.
5. The method according to any one of claims 1 to 4, wherein the generating a current sharing code in response to the sharing code generation request comprises:
querying the user identification and a historical sharing code corresponding to the preamble sharing code in a preset fission path data recording table;
and if the user identification and the historical sharing code corresponding to the preamble sharing code are not inquired, responding to the sharing code generation request to generate a current sharing code.
6. The method of claim 5, further comprising:
if the user identification and the historical sharing code corresponding to the preamble sharing code are inquired, returning the user identification and the historical sharing code corresponding to the preamble sharing code to the client.
7. The method of claim 1, further comprising:
storing the user identification as a path node in 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.
8. A device for recording fission path data, applied to a server, the device comprising:
the request receiving module is used for receiving a sharing code generation request sent by a client, wherein the sharing code generation request carries a preorder sharing code and a user identifier;
the sharing code generating 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 generating request;
a path data recording module, 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; and the number of the first and second groups,
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.
9. A server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 7 when executing a program stored in the memory.
10. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202210333580.0A 2022-03-30 2022-03-30 Method, device, server and storage medium for recording fission path data Active CN114745421B (en)

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 true CN114745421A (en) 2022-07-12
CN114745421B 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 (20)

* Cited by examiner, † Cited by third party
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
US20190356744A1 (en) * 2018-05-17 2019-11-21 International Business Machines Corporation Transforming a shortened link based upon social event for tracking sharing analytics
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
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
US20210109929A1 (en) * 2019-10-15 2021-04-15 Salesforce.Com, Inc. Performance optimization of hybrid sharing model queries
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

Patent Citations (20)

* Cited by examiner, † Cited by third party
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
US20190356744A1 (en) * 2018-05-17 2019-11-21 International Business Machines Corporation Transforming a shortened link based upon social event for tracking sharing analytics
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
US20210109929A1 (en) * 2019-10-15 2021-04-15 Salesforce.Com, Inc. Performance optimization of hybrid sharing model queries
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
CN114745421B (en) 2023-10-10

Similar Documents

Publication Publication Date Title
CN111314459A (en) Service request method, device, electronic equipment and storage medium
CN113364853B (en) Business service system, business request method and gateway equipment
CN112202633B (en) Block chain network testing method and device, electronic equipment and readable storage medium
CN111309635A (en) Test case generation method, device, server and storage medium
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN111367691B (en) Data feedback method and device, electronic equipment and storable medium
CN110427538B (en) Data query method, data storage method, data query device, data storage device and electronic equipment
CN112437148A (en) Service request processing method and device, service server and system
CN111309693A (en) Data synchronization method, device and system, electronic equipment and storage medium
CN114745421B (en) Method, device, server and storage medium for recording fission path data
CN110020166B (en) Data analysis method and related equipment
CN112948733B (en) Interface maintenance method, device, computing equipment and medium
CN111291127B (en) Data synchronization method, device, server and storage medium
CN113114611B (en) Blacklist management method and device
CN113468886A (en) Work order processing method and device and computer equipment
CN111651356A (en) Application program testing method, device and system
CN113014456A (en) Monitoring data transmission system, method, device, equipment and storage medium
CN112100534A (en) Information processing method, device, medium and electronic equipment in page sharing
CN111061543A (en) Multi-tenant workflow engine service method, device and server
CN115118583B (en) Log query method and device, electronic equipment and computer readable storage equipment
CN110418020B (en) List state information processing method and device, electronic terminal and storage medium
CN111163088B (en) Message processing method, system and device and electronic equipment
CN113946853B (en) File filtering method and device, electronic equipment and storage medium
CN112785302B (en) Message statistics method and device, electronic equipment and readable storage medium
CN114443759A (en) Cross-chain system, method, device and storage medium

Legal Events

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