CN108268662B - Social graph generation method based on H5 page, electronic device and storage medium - Google Patents

Social graph generation method based on H5 page, electronic device and storage medium Download PDF

Info

Publication number
CN108268662B
CN108268662B CN201810144076.XA CN201810144076A CN108268662B CN 108268662 B CN108268662 B CN 108268662B CN 201810144076 A CN201810144076 A CN 201810144076A CN 108268662 B CN108268662 B CN 108268662B
Authority
CN
China
Prior art keywords
data
page
temporary
relationship information
list
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
Application number
CN201810144076.XA
Other languages
Chinese (zh)
Other versions
CN108268662A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810144076.XA priority Critical patent/CN108268662B/en
Priority to PCT/CN2018/083078 priority patent/WO2019153493A1/en
Publication of CN108268662A publication Critical patent/CN108268662A/en
Application granted granted Critical
Publication of CN108268662B publication Critical patent/CN108268662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B29/00Maps; Plans; Charts; Diagrams, e.g. route diagram

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Primary Health Care (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a social graph generation method based on an H5 page, and belongs to the technical field of networks. A social graph generation method based on an H5 page comprises the following steps: s1, receiving and temporarily storing data generated by the H5 page propagation into a temporary data table; s2, storing the data into a corresponding temporary list according to the activity ID classification; s3, sequentially acquiring the relation information contained in the data from the temporary list; s4, judging the validity of the acquired relationship information, if the relationship information is valid, executing S6, and if the relationship information is invalid, executing S5; s5, transferring the data containing the relation information from the temporary list to a data log table; s6, transferring the data containing the relation information from the temporary list to a corresponding effective list; and S7, generating an H5 page propagation diagram according to the data in the effective list. The invention can help the publisher of the H5 page to better monitor the propagation effect of the H5 page and intuitively master the progress condition of the activity.

Description

Social graph generation method based on H5 page, electronic device and storage medium
Technical Field
The invention relates to the technical field of networks, in particular to a social graph generation method based on an H5 page, an electronic device and a storage medium.
Background
With the advent of the mobile internet age, consumer attention has shifted from the traditional PC to the mobile end. After social media represented by WeChat has been developed, most consumers are attracted to the social media. "where the consumer's attention, where marketing is to be directed". Therefore, in the mobile internet era, marketing activities of enterprises have a tendency of shifting from offline to online, and the goals of brand marketing, customer service, customer acquisition and the like are realized by means of the internet and social circles.
On-line marketing activities are usually propagated through WeChat, and mainly depend on push, client's spontaneous forwarding and other modes, and the content pushed or forwarded is usually H5 activity page. Now, a large number of H5 pages are circulated in the WeChat friend circle every day, and a lot of needed information can be seen through an H5 activity page. However, in the process of H5 crazy propagation, there is no process of link monitoring, so that the publisher of the H5 activity page cannot know the progress state of the activity in time during the propagation of the activity.
Disclosure of Invention
The invention aims to solve the technical problem that a publisher cannot know the progress state of activities in time during the propagation of an H5 page in the prior art, and provides a social graph generation method based on an H5 page, an electronic device and a storage medium, wherein the function of automatically generating a corresponding social graph is realized by adding link monitoring in the propagation process of an H5 page, so that the publisher can master the propagation progress of the H5 page in time.
The invention solves the technical problems through the following technical scheme:
a social graph generation method based on an H5 page comprises the following steps:
s1, receiving data generated by H5 page propagation, and temporarily storing the data in a temporary data table in sequence according to the generation time of the data, wherein the data at least comprises an activity ID and relationship information;
s2, storing the data in the temporary data table into corresponding temporary lists according to the activity IDs contained in the data in a classified manner, and sequencing the data in each temporary list according to the generation time of the data;
s3, sequentially acquiring the relation information contained in the data from the temporary list according to the data sequence;
s4, judging the validity of the acquired relationship information, if the acquired relationship information is valid, executing S6, and if the acquired relationship information is invalid, executing S5;
s5, transferring the data containing the relation information from the temporary list to a data log table;
s6, transferring the data containing the relation information from the temporary list to a corresponding effective list;
s7, generating an H5 page propagation graph corresponding to each activity ID according to the data in the effective list.
Preferably, the S2 includes the following substeps:
s21, acquiring the first data in the temporary data table as the current data;
s22, acquiring the activity ID contained in the current data;
s23, judging whether a temporary list named by the activity ID contained in the current data exists, if so, directly executing S25, and if not, executing S24;
s24, creating a temporary list named by the activity ID contained in the current data;
s25, saving the current data to a temporary list named by the activity ID contained in the current data;
and S26, judging whether the current data is the last data in the temporary data table, and if not, executing S21.
Preferably, in S3, the multiple front-end applications acquire data from the temporary list at the same time, and the process of acquiring data includes the following sub-steps:
s31, receiving a request process for acquiring data sent by a plurality of front-end applications;
s32, enabling a plurality of request processes for acquiring data to enter a redis cache list to try to set a value of a locking key, setting a successful request process to execute S33, and repeatedly executing S32 if the successful request process is not set;
s33, acquiring the data arranged at the head in the temporary list;
s34, deleting the value of the lock key to release the lock.
Preferably, the value of the key is set as a lock timeout time, and the timeout time is a current time for setting the value of the key plus a lock valid time.
Preferably, a forwarding and passing relationship interface is arranged on the H5 page and used for recording relationship information generated in the H5 page propagating process.
Preferably, the relationship information includes a propagator and a sharer in a single propagation process of the H5 page, and identification information indicating a push direction pushed from the propagator to the sharer.
Preferably, the S4 includes the following substeps:
s41, judging whether the existing data in the valid list contains the same relation information as the acquired relation information, if so, judging that the acquired relation information is invalid, otherwise, executing S42;
s42, judging whether the existing data in the valid list contains relationship information which is in direct reverse-deducing relationship with the acquired relationship information, if so, judging that the acquired relationship information is invalid, otherwise, executing S43;
s43, judging whether the existing data in the valid list contains relationship information which is in indirect reverse-deducing relationship with the acquired relationship information, if so, judging that the acquired relationship information is invalid, otherwise, executing S44;
and S44, judging whether the sharer contained in the acquired relationship information is empty, if so, judging that the acquired relationship information is invalid, and if not, judging that the acquired relationship information is valid.
Preferably, the propagation map in S7 is a loop-free tree-like link map.
An electronic device comprising a memory and a processor, the memory having stored thereon an H5 page-based social graph generation system executable by the processor, the H5 page-based social graph generation system comprising:
the data receiving module is used for receiving data generated by H5 page propagation and temporarily storing the data into a temporary data table in sequence according to the generation time of the data, wherein the data at least comprises an activity ID and relationship information;
the classification sorting module is used for sequentially storing the data in the temporary data table into corresponding temporary lists according to the activity IDs contained in the data, and sorting the data in each temporary list according to the generation time of the data;
the intercepting module is used for sequentially acquiring the relationship information contained in the data from the temporary list according to the data sequence;
the validity judging module is used for judging the validity of the acquired relationship information;
the data distribution module is used for transferring the data containing invalid relation information from the temporary list to a data log table and transferring the data containing valid relation information from the temporary list to a corresponding valid list;
and the propagation diagram generating module is used for generating an H5 page propagation diagram corresponding to each activity ID according to the data in the effective list.
A computer-readable storage medium having stored therein an H5 page-based social graph generation system, the H5 page-based social graph generation system being executable by at least one processor to cause the at least one processor to perform the steps of the H5 page-based social graph generation method as recited in any one of the preceding.
The positive progress effects of the invention are as follows: according to the method, the data generated in the H5 page propagation are recorded, effective data are screened out according to the relation information in the data, and finally a loop-free top-down propagation diagram is generated based on the effective data, so that a publisher of the H5 page is helped to better monitor the propagation effect of the H5 page, and the activity progress condition is intuitively mastered.
Drawings
FIG. 1 is a diagram illustrating a hardware architecture of an embodiment of an electronic device according to the invention;
FIG. 2 is a schematic diagram illustrating program modules of an embodiment of the social graph generating system based on the H5 page in the electronic device according to the present invention;
FIG. 3 is a flow chart of a first embodiment of the H5 page-based social graph generation method of the present invention;
FIG. 4 is a flowchart of a second embodiment of the social graph generating method based on the H5 page;
FIG. 5 is a flowchart illustrating a third embodiment of the social graph generating method based on the H5 page;
FIG. 6 is a flowchart illustrating a fourth embodiment of the social graph generating method based on the H5 page.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
First, the present invention provides an electronic device.
Fig. 1 is a schematic diagram of a hardware architecture of an electronic device according to an embodiment of the invention. In the present embodiment, the electronic device 2 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers). As shown, the electronic device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a H5 page-based social graph generating system 20 communicatively coupled to each other via a system bus. Wherein:
the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 21 may be an internal storage unit of the electronic device 2, such as a hard disk or a memory of the electronic device 2. In other embodiments, the memory 21 may also be an external storage device of the electronic apparatus 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the electronic apparatus 2. Of course, the memory 21 may also comprise both an internal memory unit of the electronic apparatus 2 and an external memory device thereof. In this embodiment, the memory 21 is generally used for storing an operating system installed in the electronic device 2 and various types of application software, such as program codes of the H5 page-based social graph generating system 20. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is generally configured to control the overall operation of the electronic apparatus 2, such as performing data interaction or communication related control and processing with the electronic apparatus 2. In this embodiment, the processor 22 is configured to execute the program codes stored in the memory 21 or process data, for example, execute the social graph generating system 20 based on the H5 page.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing communication connection between the electronic device 2 and other electronic devices. For example, the network interface 23 is used to connect the electronic apparatus 2 to an external terminal through a network, establish a data transmission channel and a communication connection between the electronic apparatus 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
It is noted that fig. 1 only shows the electronic device 2 with components 21-23, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the H5 page-based social graph generating system 20 stored in the memory 21 may be divided into one or more program modules, and the one or more program modules are stored in the memory 21 and executed by one or more processors (in this embodiment, the processor 22) to complete the present invention.
For example, fig. 2 shows a program module diagram of an embodiment of the H5 page-based social graph generating system 20, in which the H5 page-based social graph generating system 20 may be divided into a data receiving module 201, a sorting module 202, a intercepting module 203, a validity judging module 204, a data distributing module 205, and a propagation graph generating module 206. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the H5 page-based social graph generating system 20 in the electronic device 2. The following description will specifically describe the specific functions of the program module 201 and 206.
The data receiving module 201 is configured to receive data generated by H5 page propagation, and temporarily store the data in a temporary data table in sequence according to the generation time of the data, where the data at least includes an activity ID and relationship information.
The H5 page correspondingly generates data once each time the data is propagated, once the data is generated, the data is sent to the temporary data table, the temporary data table temporarily stores the data in sequence of the received data, namely the data received firstly is temporarily stored in front of the temporary data table, and the data received later is temporarily stored in back of the temporary data table, wherein the working principle of the temporary data table is similar to that of a stack, and the data is sent once the data is generated, so the data in the temporary data table is actually sequenced according to the generation time of the data.
The activity ID is a unique identification code of the H5 page, is also equivalent to the name of the H5 page, and is recorded in the code of the H5 page; each H5 page is generated for a different activity and is assigned a different activity ID. Each time the H5 page is propagated once (pushed once), data is generated which is automatically recorded by the WeChat side, and the campaign ID, which is the name of the H5 page, is naturally part of the data.
The relationship information is obtained through a forwarding and passing relationship interface, the interface is added in the code when the H5 page is made, the forwarding and passing relationship interface is used for recording a propagator and a sharer of each propagation of the H5 page and identification information representing the pushing direction pushed from the propagator to the sharer, and the information is collectively called relationship information.
The sorting and sorting module 202 is configured to store the data in the temporary data table into corresponding temporary lists in a sorted manner according to the activity IDs included in the data, and sort the data in each temporary list according to the generation time of the data.
Since the data are sequentially fetched from front to back according to the arrangement sequence of the data in the temporary data table during the classification, the data are automatically arranged from front to back according to the generation time of the data when being stored in each corresponding temporary list.
The intercepting module 203 is configured to sequentially obtain relationship information included in the data from the temporary list according to the sequence of the data.
The validity judging module 204 is configured to judge validity of the acquired relationship information.
The data distribution module 205 is configured to transfer data containing invalid relationship information from the temporary list to a data log table, and transfer data containing valid relationship information from the temporary list to a corresponding valid list.
The invalid relationship information specifically refers to the following aspects:
1) the relationship information of direct inverse relationship with each other appears, and the relationship information generated in the following data is invalid. Examples are: the generation of the previous data records one relationship information generated by pushing H5 page from A to B (namely the relationship information of pushing A to B); the generated data records one relationship information generated by pushing the H5 page to A by B (namely the relationship information of B pushing A); the two relation information are called to form a direct reverse-deducing relation; since the relationship information of the push-A-B is in front, after the relationship information is judged to be valid, the relationship information of the push-B-A generated later is judged to be invalid.
2) The relationship information of indirect back-deducing relationship appears, and the relationship information in the finally generated data is invalid. Examples are: such three pieces of data appear in the order of generation time of the data; the first piece of data records a piece of relation information generated by pushing A to B of the H5 page (namely the relation information of pushing A to B); the second piece of data records a piece of relation information generated by pushing B to C of the H5 page (namely the relation information of pushing B to C); the third piece of data records a piece of relationship information generated by pushing C to A of the H5 page (namely the relationship information of pushing C to A); the three pieces of data form a loop (the data forming the loop can be more than three, but at least three), and the relationship information in the first and third pieces of data is referred to as forming an indirect reverse-deducing relationship (i.e. the relationship information in the first and last two pieces of data in the loop form an indirect reverse-deducing relationship); in this case, the relationship information of pushing a and B in the first piece of data is judged to be valid, and the relationship information of pushing C and a in the third piece of data is judged to be invalid.
3) Duplicate relationship information occurs, and the relationship information generated later is invalid. That is, at least two pieces of data record the relationship information generated by pushing a to B of the H5 page, and only the generation time is different, in this case, the relationship information of pushing a in B in the first piece of data is judged to be valid, and the relationship information of pushing a in B in the following data is judged to be invalid.
4) And the relationship information of which the sharer is empty appears, and the relationship information is judged to be invalid. The relationship information is not recorded with the information of the sharer, which is usually caused by system errors, and the relationship information is judged to be invalid once appearing.
The above four kinds of relationship information judged to be invalid are only examples, and other invalid conditions are not excluded; moreover, the judgment of various invalid conditions has no specific front-back sequence, and can be carried out simultaneously or sequentially, but the judgment result is the same no matter which form is adopted for judgment, and the relation information is judged to be invalid as long as one invalid condition occurs, namely the relation information conforms to any one of the invalid conditions.
The propagation map generation module 206 is configured to generate an H5 page propagation map corresponding to each activity ID according to the data in the active list.
Each active list corresponds to an activity ID, and thus the data in each active list can generate a propagation map corresponding to an activity ID.
The propagation map may be presented in a tree-like link map, but other forms of presentation are not excluded. Through the propagation diagram, the publisher of the H5 page can visually see the progress of the activity, the propagation diagram comprises all the propagators and sharers participating in the propagation of the H5 page, and the propagation direction of the H5 page between the propagators and the sharers is presented.
In this embodiment, the temporary data table, the temporary list, and the valid list all exist in the database, that is, are part of the database, and are obtained by partitioning the database, where each partition is used to store data at different stages.
Secondly, the invention provides a social graph generation method based on an H5 page.
In one embodiment, as shown in fig. 3, the method for generating a social graph based on an H5 page includes the following steps:
and S1, receiving data generated by H5 page propagation, and temporarily storing the data into a temporary data table in sequence according to the generation time of the data, wherein the data at least comprises an activity ID and relationship information.
The activity ID is a unique identification code of the H5 page, is also equivalent to the name of the H5 page, and is recorded in the code of the H5 page; each H5 page is generated for a different activity and is assigned a different activity ID. Each time the H5 page is propagated once (pushed once), data is generated which is automatically recorded by the WeChat side, and the campaign ID, which is the name of the H5 page, is naturally part of the data.
The relationship information is obtained through a forwarding and passing relationship interface, the interface is arranged in a code of the H5 page when the H5 page is produced, the forwarding and passing relationship interface is used for recording a propagator and a sharer of each propagation of the H5 page and identification information representing the pushing direction pushed from the propagator to the sharer, and the information is collectively called relationship information.
And S2, storing the data in the temporary data table into corresponding temporary lists in a classified manner according to the activity IDs contained in the data, and sequencing the data in each temporary list according to the generation time of the data.
Here, the data is stored in the corresponding temporary list, specifically, the data is stored in the temporary list named by the activity ID included in the data, that is, each activity ID corresponds to one temporary list.
And S3, sequentially acquiring the relation information contained in the data from the temporary list according to the sequence of the data.
The data are sequentially fetched from front to back according to the sequence of the data in a temporary list, and the relationship information contained in the data is further intercepted after the data are acquired.
And S4, judging the validity of the acquired relationship information, executing S6 if the acquired relationship information is valid, and executing S5 if the acquired relationship information is invalid.
What the relationship information is invalid has been specifically explained in the previous embodiment of the electronic device, and is not described herein again.
And S5, transferring the data containing the relation information from the temporary list to a data log table.
The data log table (i.e., data log table) is a record of some processing that has been completed by the system or some software for future reference, where the log table is used to record invalid data, and although the data is judged to be invalid, the invalid data needs to be kept in the file to ensure that some data can be subsequently traced, corrected or restored, and thus the invalid data is transferred to the data log table.
And S6, transferring the data containing the relation information from the temporary list to a corresponding effective list.
There is a valid list named by the activity ID for each activity ID, where transferring data to the corresponding valid list means transferring data to the valid list named by the activity ID included in the data.
S7, generating an H5 page propagation graph corresponding to each activity ID according to the data in the effective list.
The propagation graph is mainly generated according to the relationship information in the data, and the propagation graph can be presented by adopting a tree link graph, but other presentation forms are not excluded.
The propaganda diagram shows the propaganda and sharer involved in each propagation of the H5 page, wherein the propaganda and sharer are relative to each propagation, the propaganda in this time is the sharer in the last time, and the two roles are constantly changing; specifically, when the H5 page is pushed from a to B, in this propagation, a is a propagator and B is a sharer; then, the H5 page is pushed to C by B, and in the transmission, B is a transmitter and C is a sharer; here B is a sharer with respect to a and a propagator with respect to C.
H5 page is continuously propagated from top to bottom, A is pushed to B, B is pushed to C, B is twice, but B is only displayed once on the propagation diagram, A and B are connected by an arrow from A to B, B and C are connected by an arrow from B to C, C is supposed to continuously push the H5 page to other people, then the page is continuously connected by an arrow, and invalid data is removed, so that a loop-free tree-shaped link propagation diagram from top to bottom is formed.
The publisher of the H5 page can visually see the progress of the activity through the propagation diagram, and the propagation effect of the H5 page is better monitored.
In the second embodiment, based on the first embodiment, as shown in fig. 4, the step S2 specifically includes the following sub-steps:
s21, acquiring the first data in the temporary data table as the current data;
s22, acquiring the activity ID contained in the current data;
s23, judging whether a temporary list named by the activity ID contained in the current data exists, if so, directly executing S25, and if not, executing S24;
s24, creating a temporary list named by the activity ID contained in the current data;
s25, saving the current data to a temporary list named by the activity ID contained in the current data;
and S26, judging whether the current data is the last data in the temporary data table, and if not, executing S21.
In this embodiment, specific operation steps for storing data according to the activity ID classification are given. It should be noted that the temporary list corresponding to each activity ID is not pre-built in the database in advance, but is created according to the activity ID related to the received data, and if data related to a certain activity ID is not received, the corresponding temporary list is not created; in addition, the temporary list corresponding to each activity ID is created only once, and the creation of the temporary list is performed only when a temporary list not named by an activity ID included in data is detected when the data is acquired.
In a third embodiment, based on the first embodiment, when determining the validity of the relationship information, a plurality of front-end applications may execute simultaneously, so as to improve the overall operating speed. In this case, in order to prevent dirty reading and misreading of data, a lock function is added, that is, although a plurality of front-end applications request to acquire data, only one front-end application is allowed to acquire data at the same time. As shown in fig. 5, the process of acquiring data includes the following sub-steps:
and S31, receiving a request process for acquiring data sent by a plurality of front-end applications.
S32, entering a plurality of request processes for acquiring data into a redis cache list to try to set the value of the locking key, and executing the request processes which are successfully set S33, and repeatedly executing the request processes which are not successfully set S32.
The value of the key is specifically the timeout time of the lock, and the timeout time is the current time for setting the value of the key plus the valid time of the lock.
And S33, acquiring the data at the top in the temporary list.
S34, deleting the value of the lock key to release the lock.
In this embodiment, the request process for acquiring data sent by the front-end application does not directly enter the temporary list to acquire data, but enters the redis cache list to set the value of the key, because of the characteristics of the redis cache list, only one request process is successfully set at the same time, and other request processes continue to try to set the value of the key.
In short, when the value of the key already exists, it is impossible for any requesting process to set the value of the key, and the value of the key cannot be successfully set by another requesting process until the key is released or invalidated, so that each requesting process repeatedly tries to set the value of the key but cannot succeed during the period when the value of the key already exists.
The key is released, namely the value of the key is deleted after a request for completing the acquisition of the data is sent; the lock key failure means that when the locking time exceeds the set value of the lock key, the value of the lock key can be deleted by the subsequent request process, so that the subsequent request can acquire data from the temporary list.
In the fourth embodiment, based on the first embodiment, as shown in fig. 6, the step of determining the validity of the obtained relationship information by the step S4 specifically includes the following sub-steps:
s41, judging whether the existing data in the valid list contains the same relation information as the acquired relation information, if so, judging that the acquired relation information is invalid, otherwise, executing S42;
s42, judging whether the existing data in the valid list contains relationship information which is in direct reverse-deducing relationship with the acquired relationship information, if so, judging that the acquired relationship information is invalid, otherwise, executing S43;
s43, judging whether the existing data in the valid list contains relationship information which is in indirect reverse-deducing relationship with the acquired relationship information, if so, judging that the acquired relationship information is invalid, otherwise, executing S44;
and S44, judging whether the sharer contained in the acquired relationship information is empty, if so, judging that the acquired relationship information is invalid, and if not, judging that the acquired relationship information is valid.
The embodiment is only a judging step designed according to the four invalid cases listed in the foregoing, and the judging step can be modified appropriately according to the increase or decrease of the invalid cases, and those skilled in the art should understand that various similar modifications are within the protection scope of the present invention.
The judgment steps involved in the embodiment are to judge the validity of the relationship information in sequence, and it should be understood by those skilled in the art that the judgment conditions in each step may be arranged randomly, and various arrangements of the judgment conditions are within the protection scope of the present invention.
In this embodiment, the determination conditions involved in each determination step may also be determined at the same time, specifically, it is determined whether existing data in the valid list includes relationship information that is the same as the acquired relationship information, is a direct reverse-deduction relationship or is an indirect reverse-deduction relationship, or it is determined whether a sharer included in the acquired relationship information is empty, and if any one of the determination conditions is satisfied (that is, as long as one of the determination conditions appears, it is determined that the acquired relationship information is invalid. Those skilled in the art will appreciate that such judgment is within the scope of the present invention.
Furthermore, the present invention relates to a computer-readable storage medium, in which the H5 page-based social graph generating system 20 is stored, where the H5 page-based social graph generating system 20 is capable of being executed by one or more processors to implement the above-mentioned H5 page-based social graph generating method or the operation of an electronic device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (10)

1. A social graph generation method based on an H5 page is characterized by comprising the following steps:
s1, receiving data generated by H5 page propagation, and temporarily storing the data in a temporary data table in sequence according to the generation time of the data, wherein the data at least comprises an activity ID and relationship information;
s2, storing the data in the temporary data table into corresponding temporary lists according to the activity IDs contained in the data in a classified manner, and sequencing the data in each temporary list according to the generation time of the data;
s3, sequentially acquiring the relation information contained in the data from the temporary list according to the data sequence;
s4, judging the validity of the acquired relationship information according to the generation time of the data, if the validity is valid, executing S6, and if the validity is invalid, executing S5;
s5, transferring the data containing the relation information from the temporary list to a data log table;
s6, transferring the data containing the relation information from the temporary list to a corresponding effective list;
s7, generating an H5 page propagation graph corresponding to each activity ID according to the data in the effective list.
2. The method for generating social graph based on H5 page, according to claim 1, wherein the S2 comprises the following sub-steps:
s21, acquiring the first data in the temporary data table as the current data;
s22, acquiring the activity ID contained in the current data;
s23, judging whether a temporary list named by the activity ID contained in the current data exists, if so, directly executing S25, and if not, executing S24;
s24, creating a temporary list named by the activity ID contained in the current data;
s25, saving the current data to a temporary list named by the activity ID contained in the current data;
and S26, judging whether the current data is the last data in the temporary data table, and if not, executing S21.
3. The method for generating social graph based on H5 page, according to claim 1, wherein in S3, the multiple front-end applications simultaneously obtain data from the temporary list, and the process of obtaining data includes the following sub-steps:
s31, receiving a request process for acquiring data sent by a plurality of front-end applications;
s32, enabling a plurality of request processes for acquiring data to enter a redis cache list to try to set a value of a locking key, setting a successful request process to execute S33, and repeatedly executing S32 if the successful request process is not set;
s33, acquiring the data arranged at the head in the temporary list;
s34, deleting the value of the lock key to release the lock.
4. The method for generating a social graph based on H5 pages, according to claim 3, wherein the value of the key is set as lock timeout time, the timeout time is current time of setting the value of the key plus lock valid time.
5. The method for generating a social graph based on H5 pages according to claim 1, wherein a forwarding and passing relationship interface is provided on the H5 page, and the forwarding and passing relationship interface is used for recording relationship information generated in a H5 page propagation process.
6. The method for generating a social graph based on H5 pages as claimed in claim 5, wherein the relationship information includes a propagator and a sharer in a single propagation process of the H5 page, and identification information indicating a pushing direction pushed from the propagator to the sharer.
7. The method for generating social graph based on H5 page, according to claim 6, wherein the S4 comprises the following sub-steps:
s41, judging whether the existing data in the valid list contains the same relation information as the acquired relation information, if so, judging that the acquired relation information is invalid, otherwise, executing S42;
s42, judging whether the existing data in the valid list contains relationship information which is in direct reverse-deducing relationship with the acquired relationship information, if so, judging that the acquired relationship information is invalid, otherwise, executing S43;
s43, judging whether the existing data in the valid list contains relationship information which is in indirect reverse-deducing relationship with the acquired relationship information, if so, judging that the acquired relationship information is invalid, otherwise, executing S44;
and S44, judging whether the sharer contained in the acquired relationship information is empty, if so, judging that the acquired relationship information is invalid, and if not, judging that the acquired relationship information is valid.
8. The method for generating social graph based on H5 page, according to claim 1, wherein the propagation graph in S7 is a loop-free tree-like link graph.
9. An electronic device comprising a memory and a processor, wherein the memory has stored thereon an H5 page based social graph generation system executable by the processor, the H5 page based social graph generation system comprising:
the data receiving module is used for receiving data generated by H5 page propagation and temporarily storing the data into a temporary data table in sequence according to the generation time of the data, wherein the data at least comprises an activity ID and relationship information;
the classification sorting module is used for sequentially storing the data in the temporary data table into corresponding temporary lists according to the activity IDs contained in the data, and sorting the data in each temporary list according to the generation time of the data;
the intercepting module is used for sequentially acquiring the relationship information contained in the data from the temporary list according to the data sequence;
the validity judging module is used for judging the validity of the acquired relationship information according to the generation time of the data;
the data distribution module is used for transferring the data containing invalid relation information from the temporary list to a data log table and transferring the data containing valid relation information from the temporary list to a corresponding valid list;
and the propagation diagram generating module is used for generating an H5 page propagation diagram corresponding to each activity ID according to the data in the effective list.
10. A computer-readable storage medium having stored therein an H5 page-based social graph generating system, the H5 page-based social graph generating system being executable by at least one processor to cause the at least one processor to perform the steps of the H5 page-based social graph generating method as recited in any one of claims 1-8.
CN201810144076.XA 2018-02-09 2018-02-09 Social graph generation method based on H5 page, electronic device and storage medium Active CN108268662B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810144076.XA CN108268662B (en) 2018-02-09 2018-02-09 Social graph generation method based on H5 page, electronic device and storage medium
PCT/CN2018/083078 WO2019153493A1 (en) 2018-02-09 2018-04-13 H5 page-based social media map generation method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810144076.XA CN108268662B (en) 2018-02-09 2018-02-09 Social graph generation method based on H5 page, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN108268662A CN108268662A (en) 2018-07-10
CN108268662B true CN108268662B (en) 2020-11-10

Family

ID=62774040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810144076.XA Active CN108268662B (en) 2018-02-09 2018-02-09 Social graph generation method based on H5 page, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN108268662B (en)
WO (1) WO2019153493A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125588B (en) * 2018-10-30 2023-04-07 北京国双科技有限公司 Method and device for drawing and evaluating propagation effect graph, storage medium and processor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885993A (en) * 2012-12-24 2014-06-25 北大方正集团有限公司 Public opinion monitoring method and device for microblog
CN104850549A (en) * 2014-02-13 2015-08-19 夷希数码科技(上海)有限公司 Method for monitoring public opinions on Internet
CN105701100A (en) * 2014-11-26 2016-06-22 上海高研明鉴信息技术有限公司 Automatic recording method, device and system of internet information forwarding process
CN106533926A (en) * 2016-12-27 2017-03-22 武汉斗鱼网络科技有限公司 Webpage information dissemination method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101754097B (en) * 2008-11-27 2013-04-17 华为技术有限公司 Advertisement forwarding method, device and system
US20170286558A1 (en) * 2016-04-01 2017-10-05 Buzzfeed, Inc. Tracking Internet Sharing Using Augmented URLs
CN106227551B (en) * 2016-08-05 2019-09-20 互动派科技股份有限公司 A kind of marketing program designing system and method based on H5 technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885993A (en) * 2012-12-24 2014-06-25 北大方正集团有限公司 Public opinion monitoring method and device for microblog
CN104850549A (en) * 2014-02-13 2015-08-19 夷希数码科技(上海)有限公司 Method for monitoring public opinions on Internet
CN105701100A (en) * 2014-11-26 2016-06-22 上海高研明鉴信息技术有限公司 Automatic recording method, device and system of internet information forwarding process
CN106533926A (en) * 2016-12-27 2017-03-22 武汉斗鱼网络科技有限公司 Webpage information dissemination method and device

Also Published As

Publication number Publication date
CN108268662A (en) 2018-07-10
WO2019153493A1 (en) 2019-08-15

Similar Documents

Publication Publication Date Title
CN109873904B (en) User message state reporting processing method, device and storage medium for message pushing
CN106933854B (en) Short link processing method and device and server
CN110096517B (en) Method, device and system for monitoring cache data based on distributed system
CN103136243B (en) File system duplicate removal method based on cloud storage and device
CN106484906B (en) Distributed object storage system flash-back method and device
CN111414389B (en) Data processing method and device, electronic equipment and storage medium
CN111444196B (en) Method, device and equipment for generating Hash of global state in block chain type account book
US8276022B2 (en) Efficient failure detection for long running data transfer jobs
CN111444192B (en) Method, device and equipment for generating Hash of global state in block chain type account book
WO2019085466A1 (en) Association test method and system, application server, and computer readable storage medium
CN110781061A (en) Method and device for recording user behavior link
CN103503388B (en) A kind of distributed queue's message read method and equipment, system
CN112328592A (en) Data storage method, electronic device and computer readable storage medium
CN108268662B (en) Social graph generation method based on H5 page, electronic device and storage medium
CN116155597A (en) Access request processing method and device and computer equipment
CN109766313A (en) Geological project data processing method, device and computer equipment
KR101797482B1 (en) Method, apparatus, and computer program stored in computer readable medium for recoverying block in database system
CN114625751A (en) Data tracing query method and device based on block chain
CN114416560A (en) Program crash analysis aggregation method and system
CN111367750B (en) Exception handling method, device and equipment thereof
CN108932284B (en) General logic scheduling method, electronic device and readable storage medium
CN108509513B (en) Platform client data reflow method, electronic device, equipment and storage medium
CN114297273B (en) Data extraction method and device
CN115766498B (en) Big data link full-link tracking monitoring method and system
CN114756564B (en) Data processing method, device, equipment and medium for stream computing

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