WO2019153493A1 - H5 page-based social media map generation method, electronic device, and storage medium - Google Patents

H5 page-based social media map generation method, electronic device, and storage medium Download PDF

Info

Publication number
WO2019153493A1
WO2019153493A1 PCT/CN2018/083078 CN2018083078W WO2019153493A1 WO 2019153493 A1 WO2019153493 A1 WO 2019153493A1 CN 2018083078 W CN2018083078 W CN 2018083078W WO 2019153493 A1 WO2019153493 A1 WO 2019153493A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
temporary
relationship information
page
activity
Prior art date
Application number
PCT/CN2018/083078
Other languages
French (fr)
Chinese (zh)
Inventor
邵立伟
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019153493A1 publication Critical patent/WO2019153493A1/en

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

Definitions

  • the present application relates to the field of network technologies, and relates to a social graph generation method, an electronic device, and a storage medium based on an H5 page.
  • the technical problem to be solved by the present application is to overcome the state in which the publisher in the prior art cannot know the progress status of the activity during the H5 page propagation, and proposes a social graph generation method, an electronic device and a storage medium based on the H5 page.
  • Link monitoring is added during the H5 page propagation process, and the function of automatically generating the corresponding social graph is realized, so that the publisher can timely grasp the progress of the propagation of the H5 page.
  • a method for generating a social graph based on an H5 page comprising the following steps:
  • S1 Receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information;
  • the data in the temporary data table is sequentially classified into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time when the generated data is generated;
  • An electronic device includes a memory and a processor, and the memory stores an H5 page-based social graph generation system executable by the processor, the H5 page-based social graph generation system comprising:
  • a data receiving module configured to receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information;
  • a sorting and sorting module configured to sequentially save the data in the temporary data table into a corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time of the generation;
  • An intercepting module configured to sequentially obtain relationship information included in the data according to the sorting of the data in the temporary list
  • a validity determining module configured to determine validity of the acquired relationship information
  • a data distribution module configured to transfer data including invalid relationship information from the temporary list to a data log table, and transfer data including valid relationship information from the temporary list to a corresponding valid list;
  • a propagation map generation module is configured to generate an H5 page propagation map corresponding to each activity ID according to the data in the valid list.
  • a computer readable storage medium having an H5 page-based social graph generation system stored therein, the H5 page-based social graph generation system being executable by at least one processor to implement the following steps :
  • S1 Receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information;
  • the data in the temporary data table is sequentially classified into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time when the generated data is generated;
  • the positive progress of the present application is that the present application records the data generated in the H5 page propagation, and then filters out the valid data according to the relationship information in the data, and finally generates a loop-free, top-down propagation map based on the valid data. To help publishers of H5 pages better monitor the spread of H5 pages and visualize the progress of the event.
  • FIG. 1 is a schematic diagram showing the hardware architecture of an embodiment of an electronic device of the present application.
  • FIG. 2 is a schematic diagram showing a program module of an embodiment of an H5 page-based social graph generation system in an electronic device of the present application
  • FIG. 3 is a flowchart of Embodiment 1 of a social graph generation method based on an H5 page of the present application
  • Embodiment 4 is a flowchart of Embodiment 2 of a social graph generation method based on an H5 page of the present application;
  • FIG. 5 is a flowchart of Embodiment 3 of a method for generating a social graph based on an H5 page according to the present application;
  • FIG. 6 is a flowchart of Embodiment 4 of a social graph generation method based on an H5 page of the present application.
  • the present application proposes an electronic device.
  • the electronic device 2 is an apparatus capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance.
  • the electronic device 2 can be a smartphone, a tablet, a laptop, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including a stand-alone server, or a server cluster composed of multiple servers).
  • the electronic device 2 includes at least, but not limited to, a memory 21, a processor 22, a network interface 23, and an H5 page-based social graph generation system 20 that are communicably coupled to one another via a system bus. among them:
  • 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 (eg, SD or DX memory, etc.), a random access memory (RAM), Static Random Access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 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.
  • the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk equipped on the electronic device 2, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card, etc.
  • the memory 21 can also include both the internal storage unit of the electronic device 2 and its external storage device.
  • the memory 21 is generally used to store an operating system installed on the electronic device 2 and various types of application software, such as program code of the H5 page-based social graph generation system 20, and the like. Further, the memory 21 can 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 typically used to control the overall operation of the electronic device 2, such as performing control and processing associated with data interaction or communication with the electronic device 2.
  • the processor 22 is configured to run program code or process data stored in the memory 21, such as running the H5 page-based social graph generation system 20 and the like.
  • the network interface 23 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 2 and other electronic devices.
  • the network interface 23 is configured to connect the electronic device 2 to an external terminal through a network, establish a data transmission channel, a communication connection, and the like between the electronic device 2 and an external terminal.
  • the network may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, or a 5G network.
  • Wireless or wired networks such as network, Bluetooth, Wi-Fi, etc.
  • Figure 1 shows only the electronic device 2 having the components 21-23, but it should be understood that not all illustrated components may be implemented and that more or fewer components may be implemented instead.
  • the H5 page-based social graph generation system 20 stored in the memory 21 may be divided into one or more program modules, the one or more program modules being stored in the memory 21, and It can be performed by one or more processors (the processor 22 in this embodiment) to complete the application.
  • FIG. 2 shows a schematic diagram of a program module of the H5 page-based social graph generation system 20, in which the H5 page-based social graph generation system 20 can be divided into data receiving modules 201.
  • the program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function. The following description will specifically describe the specific functions of the program modules 201-206.
  • the data receiving module 201 is configured to receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information.
  • the temporary data table temporarily stores the data according to the received data, that is, before the data received first exists. After the received data is temporarily stored, the temporary data table described here works like a stack, and since the data is sent as soon as it is generated, the data in the temporary data table is actually sorted according to the data generation time. .
  • the activity ID is a unique identifier of the H5 page, and 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 corresponding to different activities, and correspondingly allocated differently. Activity ID. Each time the H5 page is propagated once (pushed once), the data is generated. This data is automatically recorded by the WeChat, and the activity ID as the name of the H5 page is naturally part of the data.
  • the relationship information is obtained by forwarding a circulation relationship interface, which is added in the code when the H5 page is created, and the forwarding and routing relationship interface is used to record the communicator and the sharer of each propagation of the H5 page, and The identification information indicating the direction of the push from the communicator to the sharer, which is collectively referred to as relationship information.
  • the sorting and sorting module 202 is configured to sequentially save the data in the temporary data table into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time of its generation.
  • the data Since the data is sorted in the order of the data in the temporary data table, the data is saved to the corresponding temporary list, and the data is automatically arranged from the time of the arrival.
  • the intercepting module 203 is configured to sequentially acquire relationship information included in the data according to the sorting of data from the temporary list.
  • the validity determining module 204 is configured to determine validity of the acquired relationship information.
  • the data distribution module 205 is configured to transfer data including invalid relationship information from the temporary list to a data log table, and transfer data including valid relationship information from the temporary list to a corresponding valid list. in.
  • the invalid relationship information specifically refers to the following aspects:
  • relationship information that is mutually direct reverse relationship, and the relationship information generated in the subsequent data is invalid.
  • the generated data records a relationship information generated by the A5 push-to-B from the A5 page (ie, the relationship information of the A push B); the generated data records the H5 page that is pushed by B to the A.
  • a relationship information that is, B pushes the relationship information of A
  • the two relationship information forms a direct reverse relationship; since the relationship information of A push B is in front, the relationship information is judged to be valid, and then generated.
  • the relationship information of B push A is judged to be invalid.
  • the relationship information of the indirect reverse relationship occurs, and the relationship information in the last generated data is invalid.
  • three pieces of data appear in the order in which the data is generated; the first piece of data records a relationship information generated by the A page being pushed by A to B (ie, the relationship information of A push B); the second data record A relationship information generated by B to be sent to C by C (ie, B push C relationship information); the third data records a relationship information generated by C5 to be sent to A by C (ie, C push A relationship information)
  • These three data form a loop (there are more than three, but at least three, of the data forming the loop here), which is said to form an indirect reverse relationship between the relationship information in the first and third pieces of data ( That is, the relationship information in the first two data in the loop forms an indirect reverse relationship; in this case, the relationship information of A push B in the first data is judged to be valid, and the relationship between C and A in the third data The information is judged to be invalid.
  • the above four kinds of relationship information that are judged to be invalid are only examples, and there are other invalid cases; and the judgment of various invalid cases has no specific order, and can be judged at the same time, or sequentially arranged, but regardless of In which form is used for the judgment, the results are the same. As long as one type of invalidity occurs, the relationship information is judged to be invalid as long as it meets any of several invalid conditions.
  • the propagation map generation module 206 is configured to generate an H5 page propagation map corresponding to each activity ID according to data in the valid list.
  • Each valid list corresponds to an activity ID, so the data in each valid list can generate a propagation map corresponding to an activity ID.
  • the propagation map can be rendered using a tree link map, but other forms of presentation are not excluded. By propagating the map, the publisher of the H5 page can visually see the progress of the activity.
  • the communication map contains all the communicators and sharers involved in the H5 page propagation, and also presents the H5 page among the communicators and the sharers. The direction of communication between.
  • the temporary data table, the temporary list, and the valid list in the embodiment are all present in the database, that is, part of the database, and each area is used to store data of different stages by partitioning the database.
  • the present application proposes a social graph generation method based on an H5 page.
  • the H5 page-based social graph generation method includes the following steps:
  • S1 Receive data generated by H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information.
  • the activity ID is a unique identifier of the H5 page, and 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 corresponding to different activities, and correspondingly allocated differently. Activity ID. Each time the H5 page is propagated once (pushed once), the data is generated. This data is automatically recorded by the WeChat, and the activity ID as the name of the H5 page is naturally part of the data.
  • the relationship information is obtained by forwarding a forwarding relationship interface, which is set in the code when the H5 page is created, and the forwarding and routing relationship interface is used to record the communicator and the sharer of each propagation of the H5 page, and The identification information indicating the direction of the push from the communicator to the sharer, which is collectively referred to as relationship information.
  • the data in the temporary data table is sequentially sorted into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time of its generation.
  • the data is saved to the corresponding temporary list, specifically, the data is saved to a temporary list named by the activity ID included in the data, that is, each activity ID corresponds to a temporary list.
  • the data is taken in order from the going to the back, and after acquiring the data, the relationship information contained in the data is further intercepted.
  • the data log table (ie, the data log table) is a record of some processing done by the system or some software for future reference, where the log table is used to record invalid data, although the data is invalidated, but the data is invalid. In order to ensure that some data can be traced, corrected or restored in the future, these invalid data also need to be archived, so the invalid data is transferred to the data log table here.
  • Transferring the data to the corresponding valid list here means transferring the data to a valid list named with the activity ID contained in the data.
  • the propagation map is mainly generated according to the relationship information in the data, and the propagation map can be represented by a tree link diagram, but other forms of presentation are not excluded.
  • the propagator map shows the communicators and sharers involved in each H5 page's communication.
  • the communicators and sharers described here are relative to each communication.
  • the communicator in this time is the last share.
  • the two roles are constantly changing; specifically, when the H5 page is pushed from A to B, in this communication, A is the communicator and B is the sharer; after that, the H5 page is pushed by B again.
  • B is the communicator
  • C is the sharer; here B is a sharer with respect to A, and a communicator relative to C.
  • the H5 page is constantly being propagated from top to bottom.
  • A is pushed to B, B is pushed to C, and B is played twice, but B is only displayed once on the propagation map, and A to B is used between A and B.
  • the arrows are connected, and the arrow connecting B to C is used between B and C. If C continues to push the H5 page to other people, the arrow continues to be connected downward. Since the invalid data is removed, a form is formed.
  • the publisher of the H5 page can visually see the progress of the activity through the propagation map, and better monitor the propagation effect of the H5 page.
  • step S2 specifically includes the following sub-steps:
  • the temporary list corresponding to each activity ID is not pre-built in the database, but is created according to the activity ID involved in the received data, if no data related to an activity ID is received. , the corresponding temporary list will not be created; in addition, the temporary list corresponding to each activity ID is only created once, and will only be executed when a temporary list named after the activity ID contained in the data is detected when a data is acquired. The creation of a temporary list.
  • the process of acquiring data includes the following sub-steps:
  • S31 Receive a request process for acquiring data sent by multiple front-end applications.
  • the request process for acquiring the data enters the redis cache list and attempts to set a value of the lock key.
  • the successful request process is executed in S33, and the unsuccessful request process is repeatedly executed in S32.
  • the value of the lock key here is specifically the timeout period of the lock, and the timeout time is the current time of setting the value of the lock key plus the effective time of the lock.
  • the request process for acquiring data sent by the front-end application does not directly enter the temporary list to obtain data, but first enters the redis cache list to set the value of the lock key. Due to the characteristics of the redis cache list, at the same time Only one request process is set successfully, and other request processes continue to try to set the value of the lock key.
  • the lock key is released after the acquisition of a request completion data is deleted; the lock key failure means that the lock time exceeds the value of the set lock key, and the value of the lock key can be requested by the latter
  • the process is deleted, which in turn allows the latter request to retrieve data from the temporary list.
  • the validity of the acquired relationship information by the S4 specifically includes the following sub-steps:
  • This embodiment is only a judging step designed according to the four invalid cases listed above, and the judging step can be appropriately modified according to the increase or decrease of the invalid situation, and those skilled in the art should know that various similar modifications are in this embodiment.
  • the judging step can be appropriately modified according to the increase or decrease of the invalid situation, and those skilled in the art should know that various similar modifications are in this embodiment.
  • the judging step involved in the embodiment is to determine the validity of the relationship information in sequence, and those skilled in the art should know that the judging conditions in each step can be randomly arranged, and various pre-arrangements of the judging conditions are in the protection scope of the present application. within.
  • the determining conditions involved in the determining steps in this embodiment may also be determined at the same time. Specifically, it is determined whether the existing data in the valid list includes the same relationship information as the acquired relationship, and is a direct reverse relationship or an indirect relationship. The relation information of the relationship is reversed, or whether the sharer included in the acquired relationship information is empty, and if any one of the judgment conditions is satisfied (that is, as long as one is YES), the obtained relationship information is judged to be invalid. Those skilled in the art will appreciate that such a manner of judgment is also within the scope of the present application.
  • the present application is a computer readable storage medium having stored therein an H5 page-based social graph generation system 20 that can be executed by one or more processors The operation of the above-described H5 page-based social graph generation method or electronic device is implemented.

Landscapes

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

Abstract

Disclosed is a method based on H5 pages for generating social media maps, comprising the following steps: S1, receiving and provisionally storing to a temporary data table data produced by H5 page propagation; S2, sorting the data on the basis of activity IDs and storing same to corresponding temporary lists; S3, from the temporary lists, sequentially obtaining relationship information contained in the data; S4, determining the validity of the obtained relationship information and, when valid, executing S6, when invalid, executing S5; S5, transferring the data containing the relationship information from the temporary lists to a data log table; S6, transferring the data containing the relationship information from the temporary lists to corresponding valid lists; S7, generating an H5 page propagation map on the basis of the data in the valid lists. The present invention assists publishers of H5 pages in better monitoring and controlling the effects of H5 page propagation, providing by means of direct observation a grasp of the development of any trend.

Description

基于H5页面的社交图谱生成方法、电子装置及存储介质Social graph generation method, electronic device and storage medium based on H5 page
本申请申明享有2018年2月9日递交的申请号为201810144076.X、名称为“基于H5页面的社交图谱生成方法、电子装置及存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。The present application claims the priority of the Chinese patent application entitled "H5 page-based social graph generation method, electronic device and storage medium", which is filed on February 9, 2018, with the application number 201810144076.X. The entire content is incorporated herein by reference.
技术领域Technical field
本申请涉及网络技术领域,涉及一种基于H5页面的社交图谱生成方法、电子装置及存储介质。The present application relates to the field of network technologies, and relates to a social graph generation method, an electronic device, and a storage medium based on an H5 page.
背景技术Background technique
随着移动互联网时代的到来,消费者注意力从传统的PC转移到移动端。以微信为代表的社交媒体发展起来后,绝大多数消费者的注意力被吸引到社交媒体上。“消费者的注意力在哪里,营销就要渠道哪里”。所以在移动互联网时代,企业的营销活动大有从线下向线上转移的趋势,借助互联网和社交圈实现品牌营销、客户服务、获取客户等目标。With the advent of the mobile Internet era, consumer attention has shifted from traditional PCs to mobile phones. After the development of social media represented by WeChat, the attention of the vast majority of consumers was drawn to social media. "Where is the consumer's attention? Where is the marketing channel?" Therefore, in the era of mobile Internet, corporate marketing activities have a tendency to shift from offline to online, with the help of the Internet and social circles to achieve brand marketing, customer service, and customer acquisition.
线上营销活动比较常见的是通过微信传播,主要依靠推送、客户自发的转发等方式传播,推送或转发的内容通常为H5活动页面。现在,每天都有大量的H5页面流转在微信朋友圈,我们通过H5活动页面可以看到很多需要的信息。但是在H5疯狂传播的过程中,并没有链路监控的一些处理,使得H5活动页面的发布者在活动传播期间,无法及时得知活动的进展状态。Online marketing activities are more common through WeChat communication, mainly relying on push, customer spontaneous forwarding, etc. The content pushed or forwarded is usually the H5 activity page. Now, every day, a lot of H5 pages are circulating in the WeChat circle of friends. We can see a lot of information needed through the H5 event page. However, in the process of H5 crazy communication, there is no some processing of link monitoring, so that the publisher of the H5 activity page cannot know the progress status of the activity in time during the activity propagation.
发明内容Summary of the invention
本申请要解决的技术问题是为了克服现有技术中发布者在H5页面传播期间无法及时得知活动的进展状态,提出了一种基于H5页面的社交图谱生 成方法、电子装置及存储介质,通过在H5页面传播过程中增加链路监控,实现自动生成相应社交图谱的功能,使得发布者及时掌握H5页面的传播进展。The technical problem to be solved by the present application is to overcome the state in which the publisher in the prior art cannot know the progress status of the activity during the H5 page propagation, and proposes a social graph generation method, an electronic device and a storage medium based on the H5 page. Link monitoring is added during the H5 page propagation process, and the function of automatically generating the corresponding social graph is realized, so that the publisher can timely grasp the progress of the propagation of the H5 page.
本申请是通过下述技术方案来解决上述技术问题:The present application solves the above technical problems by the following technical solutions:
一种基于H5页面的社交图谱生成方法,包括如下步骤:A method for generating a social graph based on an H5 page, comprising the following steps:
S1、接收H5页面传播产生的数据,并按数据的产生时间依次暂存至临时数据表中,所述数据中至少包含活动ID和关系信息;S1: Receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information;
S2、依次将临时数据表中的数据按其包含的活动ID分类保存至相应的临时列表中,每个所述临时列表中的数据按其产生的时间进行排序;S2. The data in the temporary data table is sequentially classified into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time when the generated data is generated;
S3、从临时列表中按数据的排序依次获取数据中包含的关系信息;S3. Acquire, in order from the temporary list, the relationship information included in the data according to the sorting of the data;
S4、判断获取的所述关系信息的有效性,若有效则执行S6,若无效则执行S5;S4, determining the validity of the acquired relationship information, if it is valid, executing S6; if not, executing S5;
S5、将包含该关系信息的数据从所述临时列表转移至数据log表中;S5. Transfer data including the relationship information from the temporary list to a data log table.
S6、将包含该关系信息的数据从所述临时列表转移至相应的有效列表中;S6. Transfer data including the relationship information from the temporary list to a corresponding valid list.
S7、根据有效列表中的数据,生成与每个活动ID相对应的H5页面传播图。S7. Generate an H5 page propagation map corresponding to each activity ID according to the data in the valid list.
一种电子装置,包括存储器和处理器,所述存储器上存储有可被所述处理器执行的基于H5页面的社交图谱生成系统,所述基于H5页面的社交图谱生成系统包括:An electronic device includes a memory and a processor, and the memory stores an H5 page-based social graph generation system executable by the processor, the H5 page-based social graph generation system comprising:
数据接收模块,用于接收H5页面传播产生的数据,并按数据的产生时间依次暂存至临时数据表中,所述数据中至少包含活动ID和关系信息;a data receiving module, configured to receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information;
分类排序模块,用于依次将临时数据表中的数据按其包含的活动ID分类保存至相应的临时列表中,每个所述临时列表中的数据按其产生的时间进行排序;a sorting and sorting module, configured to sequentially save the data in the temporary data table into a corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time of the generation;
截取模块,用于从临时列表中按数据的排序依次获取数据中包含的关系 信息;An intercepting module, configured to sequentially obtain relationship information included in the data according to the sorting of the data in the temporary list;
有效性判断模块,用于判断获取的所述关系信息的有效性;a validity determining module, configured to determine validity of the acquired relationship information;
数据分发模块,用于将包含有无效的关系信息的数据从所述临时列表转移至数据log表中,将包含有有效的关系信息的数据从所述临时列表转移至相应的有效列表中;a data distribution module, configured to transfer data including invalid relationship information from the temporary list to a data log table, and transfer data including valid relationship information from the temporary list to a corresponding valid list;
传播图生成模块,用于根据有效列表中的数据生成与每个活动ID相对应的H5页面传播图。A propagation map generation module is configured to generate an H5 page propagation map corresponding to each activity ID according to the data in the valid list.
一种计算机可读存储介质,所述计算机可读存储介质内存储有基于H5页面的社交图谱生成系统,所述基于H5页面的社交图谱生成系统可被至少一个处理器所执行,以实现以下步骤:A computer readable storage medium having an H5 page-based social graph generation system stored therein, the H5 page-based social graph generation system being executable by at least one processor to implement the following steps :
S1、接收H5页面传播产生的数据,并按数据的产生时间依次暂存至临时数据表中,所述数据中至少包含活动ID和关系信息;S1: Receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information;
S2、依次将临时数据表中的数据按其包含的活动ID分类保存至相应的临时列表中,每个所述临时列表中的数据按其产生的时间进行排序;S2. The data in the temporary data table is sequentially classified into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time when the generated data is generated;
S3、从临时列表中按数据的排序依次获取数据中包含的关系信息;S3. Acquire, in order from the temporary list, the relationship information included in the data according to the sorting of the data;
S4、判断获取的所述关系信息的有效性,若有效则执行S6,若无效则执行S5;S4, determining the validity of the acquired relationship information, if it is valid, executing S6; if not, executing S5;
S5、将包含该关系信息的数据从所述临时列表转移至数据log表中;S5. Transfer data including the relationship information from the temporary list to a data log table.
S6、将包含该关系信息的数据从所述临时列表转移至相应的有效列表中;S6. Transfer data including the relationship information from the temporary list to a corresponding valid list.
S7、根据有效列表中的数据,生成与每个活动ID相对应的H5页面传播图。S7. Generate an H5 page propagation map corresponding to each activity ID according to the data in the valid list.
本申请的积极进步效果在于:本申请通过记录H5页面传播中产生的数据,然后根据数据中的关系信息筛选出有效数据,最终基于这些有效数据生成无循环的、自上而下的传播图,以帮助H5页面的发布者更好地监控H5页面的传播效果,直观地掌握活动进展情况。The positive progress of the present application is that the present application records the data generated in the H5 page propagation, and then filters out the valid data according to the relationship information in the data, and finally generates a loop-free, top-down propagation map based on the valid data. To help publishers of H5 pages better monitor the spread of H5 pages and visualize the progress of the event.
附图说明DRAWINGS
图1示出了本申请电子装置一实施例的硬件架构示意图;1 is a schematic diagram showing the hardware architecture of an embodiment of an electronic device of the present application;
图2示出了本申请电子装置中基于H5页面的社交图谱生成系统一实施例的程序模块示意图;2 is a schematic diagram showing a program module of an embodiment of an H5 page-based social graph generation system in an electronic device of the present application;
图3示出了本申请基于H5页面的社交图谱生成方法实施例一的流程图;FIG. 3 is a flowchart of Embodiment 1 of a social graph generation method based on an H5 page of the present application;
图4示出了本申请基于H5页面的社交图谱生成方法实施例二的流程图;4 is a flowchart of Embodiment 2 of a social graph generation method based on an H5 page of the present application;
图5示出了本申请基于H5页面的社交图谱生成方法实施例三的流程图;FIG. 5 is a flowchart of Embodiment 3 of a method for generating a social graph based on an H5 page according to the present application;
图6示出了本申请基于H5页面的社交图谱生成方法实施例四的流程图。FIG. 6 is a flowchart of Embodiment 4 of a social graph generation method based on an H5 page of the present application.
具体实施方式Detailed ways
下面通过实施例的方式进一步说明本申请,但并不因此将本申请限制在所述的实施例范围之中。The present application is further illustrated by the following examples, but is not intended to limit the scope of the embodiments.
首先,本申请提出了一种电子装置。First of all, the present application proposes an electronic device.
参阅图1所示,是本申请电子装置一实施例的硬件架构示意图。本实施例中,所述电子装置2是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。例如,可以是智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图所示,所述电子装置2至少包括,但不限于,可通过系统总线相互通信连接存储器21、处理器22、网络接口23、以及基于H5页面的社交图谱生成系统20。其中:1 is a schematic diagram of a hardware architecture of an embodiment of an electronic device of the present application. In the embodiment, the electronic device 2 is an apparatus capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance. For example, it can be a smartphone, a tablet, a laptop, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including a stand-alone server, or a server cluster composed of multiple servers). As shown, the electronic device 2 includes at least, but not limited to, a memory 21, a processor 22, a network interface 23, and an H5 page-based social graph generation system 20 that are communicably coupled to one another via a system bus. among them:
所述存储器21至少包括一种类型的计算机可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储 器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器21可以是所述电子装置2的内部存储单元,例如该电子装置2的硬盘或内存。在另一些实施例中,所述存储器21也可以是所述电子装置2的外部存储设备,例如该电子装置2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器21还可以既包括所述电子装置2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器21通常用于存储安装于所述电子装置2的操作系统和各类应用软件,例如所述基于H5页面的社交图谱生成系统20的程序代码等。此外,所述存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。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 (eg, SD or DX memory, etc.), a random access memory (RAM), Static Random Access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. In some embodiments, the memory 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 device 2, such as a plug-in hard disk equipped on the electronic device 2, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card, etc. Of course, the memory 21 can also include both the internal storage unit of the electronic device 2 and its external storage device. In this embodiment, the memory 21 is generally used to store an operating system installed on the electronic device 2 and various types of application software, such as program code of the H5 page-based social graph generation system 20, and the like. Further, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.
所述处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制所述电子装置2的总体操作,例如执行与所述电子装置2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器22用于运行所述存储器21中存储的程序代码或者处理数据,例如运行所述的基于H5页面的社交图谱生成系统20等。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 typically used to control the overall operation of the electronic device 2, such as performing control and processing associated with data interaction or communication with the electronic device 2. In this embodiment, the processor 22 is configured to run program code or process data stored in the memory 21, such as running the H5 page-based social graph generation system 20 and the like.
所述网络接口23可包括无线网络接口或有线网络接口,该网络接口23通常用于在所述电子装置2与其他电子装置之间建立通信连接。例如,所述网络接口23用于通过网络将所述电子装置2与外部终端相连,在所述电子装置2与外部终端之间的建立数据传输通道和通信连接等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。The network interface 23 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 2 and other electronic devices. For example, the network interface 23 is configured to connect the electronic device 2 to an external terminal through a network, establish a data transmission channel, a communication connection, and the like between the electronic device 2 and an external terminal. The network may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, or a 5G network. Wireless or wired networks such as network, Bluetooth, Wi-Fi, etc.
需要指出的是,图1仅示出了具有组件21-23的电子装置2,但是应理 解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。It is to be noted that Figure 1 shows only the electronic device 2 having the components 21-23, but it should be understood that not all illustrated components may be implemented and that more or fewer components may be implemented instead.
在本实施例中,存储于存储器21中的所述基于H5页面的社交图谱生成系统20可以被分割为一个或者多个程序模块,所述一个或者多个程序模块被存储于存储器21中,并可由一个或多个处理器(本实施例为处理器22)所执行,以完成本申请。In the present embodiment, the H5 page-based social graph generation system 20 stored in the memory 21 may be divided into one or more program modules, the one or more program modules being stored in the memory 21, and It can be performed by one or more processors (the processor 22 in this embodiment) to complete the application.
例如,图2示出了所述基于H5页面的社交图谱生成系统20一实施例的程序模块示意图,该实施例中,所述基于H5页面的社交图谱生成系统20可以被分割为数据接收模块201、分类排序模块202、截取模块203、有效性判断模块204、数据分发模块205和传播图生成模块206。其中,本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段。以下描述将具体介绍所述程序模块201-206的具体功能。For example, FIG. 2 shows a schematic diagram of a program module of the H5 page-based social graph generation system 20, in which the H5 page-based social graph generation system 20 can be divided into data receiving modules 201. The sorting module 202, the intercepting module 203, the validity determining module 204, the data distributing module 205, and the propagation map generating module 206. Wherein, the program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function. The following description will specifically describe the specific functions of the program modules 201-206.
所述数据接收模块201用于接收H5页面传播产生的数据,按数据的产生时间依次暂存至临时数据表中,所述数据中至少包含活动ID和关系信息。The data receiving module 201 is configured to receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information.
所述H5页面每传播一次都会相应地产生一次数据,一旦数据产生就会发送到临时数据表中,临时数据表按接收数据的先后将数据进行暂存,即先收到的数据暂存在前,后收到的数据暂存在后,这里所述临时数据表的工作原理类似于堆栈,而由于数据是一产生就进行发送的,因而临时数据表中的数据实际是按数据的产生时间进行排序的。Each time the H5 page is transmitted, data will be generated once. Once the data is generated, it will be sent to the temporary data table. The temporary data table temporarily stores the data according to the received data, that is, before the data received first exists. After the received data is temporarily stored, the temporary data table described here works like a stack, and since the data is sent as soon as it is generated, the data in the temporary data table is actually sorted according to the data generation time. .
所述活动ID是H5页面的唯一识别码,也相当于H5页面的名称,被记录在H5页面的代码中;每个H5页面是对应不同的活动而产生的,相应地分配有各不相同的活动ID。每次H5页面被传播一次(推送一次)都会在产生的数据,这个数据由微信端自动记录下来,而作为该H5页面名称的活动ID自然也是数据中的一部分。The activity ID is a unique identifier of the H5 page, and 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 corresponding to different activities, and correspondingly allocated differently. Activity ID. Each time the H5 page is propagated once (pushed once), the data is generated. This data is automatically recorded by the WeChat, and the activity ID as the name of the H5 page is naturally part of the data.
所述关系信息是通过转发传阅关系接口获取的,这个接口是在H5页面 制作时增加在其代码中的,所述转发传阅关系接口用于记录H5页面每一次传播的传播者和分享者,以及表示从传播者推送给分享者的推送方向的标识信息,这些信息统称为关系信息。The relationship information is obtained by forwarding a circulation relationship interface, which is added in the code when the H5 page is created, and the forwarding and routing relationship interface is used to record the communicator and the sharer of each propagation of the H5 page, and The identification information indicating the direction of the push from the communicator to the sharer, which is collectively referred to as relationship information.
所述分类排序模块202用于依次将临时数据表中的数据按其包含的活动ID分类保存至相应的临时列表中,每个所述临时列表中的数据按其产生的时间进行排序。The sorting and sorting module 202 is configured to sequentially save the data in the temporary data table into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time of its generation.
由于分类的时候是按数据在临时数据表中的排列顺序从前往后依次取数据的,因此数据被保存至各相应的临时列表时,自然也是按数据的产生时间从前往后自动排列的。Since the data is sorted in the order of the data in the temporary data table, the data is saved to the corresponding temporary list, and the data is automatically arranged from the time of the arrival.
所述截取模块203用于从临时列表中按数据的排序依次获取数据中包含的关系信息。The intercepting module 203 is configured to sequentially acquire relationship information included in the data according to the sorting of data from the temporary list.
所述有效性判断模块204,用于判断获取的所述关系信息的有效性。The validity determining module 204 is configured to determine validity of the acquired relationship information.
所述数据分发模块205,用于将包含有无效的关系信息的数据从所述临时列表转移至数据log表中,将包含有有效的关系信息的数据从所述临时列表转移至相应的有效列表中。The data distribution module 205 is configured to transfer data including invalid relationship information from the temporary list to a data log table, and transfer data including valid relationship information from the temporary list to a corresponding valid list. in.
所述无效的关系信息具体指以下几方面:The invalid relationship information specifically refers to the following aspects:
1)出现了互为直接反推关系的关系信息,产生在后的数据中的关系信息为无效。举例来说就是:产生在前的数据记录了H5页面由A推送给B产生的一个关系信息(即A推B的关系信息);产生在后的数据记录了H5页面由B推送给A产生的一个关系信息(即B推A的关系信息);这里称这两个关系信息形成了直接反推关系;由于A推B的关系信息在前,因此该关系信息判断为有效后,产生在后的B推A的关系信息就会判断为无效。1) There is relationship information that is mutually direct reverse relationship, and the relationship information generated in the subsequent data is invalid. For example, the generated data records a relationship information generated by the A5 push-to-B from the A5 page (ie, the relationship information of the A push B); the generated data records the H5 page that is pushed by B to the A. A relationship information (that is, B pushes the relationship information of A); here, the two relationship information forms a direct reverse relationship; since the relationship information of A push B is in front, the relationship information is judged to be valid, and then generated. The relationship information of B push A is judged to be invalid.
2)出现了间接反推关系的关系信息,最后产生的数据中的关系信息为无效。举例来说就是:按数据的产生时间顺序出现了这样三条数据;第一条数据记录了H5页面由A推送给B产生的一个关系信息(即A推B的关系信息);第二条数据记录了H5页面由B推送给C产生的一个关系信息(即 B推C的关系信息);第三条数据记录了H5页面由C推送给A产生的一个关系信息(即C推A的关系信息);这三条数据形成了循环(这里的所指的形成循环的数据可以不止三个,但至少是三个),这里称将第一和第三条数据中的关系信息形成了间接反推关系(即循环中的首尾两个数据中的关系信息形成了间接反推关系);这种情况下,第一条数据中A推B的关系信息判断为有效,第三条数据中C推A的关系信息就判断为无效。2) The relationship information of the indirect reverse relationship occurs, and the relationship information in the last generated data is invalid. For example, three pieces of data appear in the order in which the data is generated; the first piece of data records a relationship information generated by the A page being pushed by A to B (ie, the relationship information of A push B); the second data record A relationship information generated by B to be sent to C by C (ie, B push C relationship information); the third data records a relationship information generated by C5 to be sent to A by C (ie, C push A relationship information) These three data form a loop (there are more than three, but at least three, of the data forming the loop here), which is said to form an indirect reverse relationship between the relationship information in the first and third pieces of data ( That is, the relationship information in the first two data in the loop forms an indirect reverse relationship; in this case, the relationship information of A push B in the first data is judged to be valid, and the relationship between C and A in the third data The information is judged to be invalid.
3)出现了重复的关系信息,产生在后的关系信息为无效。即出现了至少两条数据记录了H5页面由A推送给B产生的关系信息,仅产生时间不同,这种情况下,第一条数据中的A推B的关系信息判断为有效,之后的数据中的A推B的关系信息均判断为无效。3) Duplicate relationship information appears, and the resulting relationship information is invalid. That is, at least two data records have generated the relationship information generated by the H5 page being pushed by A to B, and only the time is different. In this case, the relationship information of the A push B in the first data is determined to be valid, and the subsequent data is determined. The relationship information of the A push B in the middle is judged to be invalid.
4)出现了分享者为空的关系信息,该关系信息判断为无效。这种关系信息中没有记录到分享者的信息,通常是系统出错导致的,一旦出现这种关系信息即判断为无效。4) There is a relationship information that the sharer is empty, and the relationship information is judged to be invalid. The information of the sharer is not recorded in the relationship information, and is usually caused by a system error. Once the relationship information appears, it is judged to be invalid.
以上四种判断为无效的关系信息仅为示例,不排除还有其他无效的情况;而且,各种无效情况的判断没有特定的前后顺序,可以同时判断,也可以进行先后顺序的排列,但无论采用哪种形式进行判断,结果都是一样的,若干种无效情况只要出现一种,即关系信息只要符合几种无效情况中的任意一种,该关系信息都判断为无效。The above four kinds of relationship information that are judged to be invalid are only examples, and there are other invalid cases; and the judgment of various invalid cases has no specific order, and can be judged at the same time, or sequentially arranged, but regardless of In which form is used for the judgment, the results are the same. As long as one type of invalidity occurs, the relationship information is judged to be invalid as long as it meets any of several invalid conditions.
所述传播图生成模块206用于根据有效列表中的数据生成与每个活动ID相对应的H5页面传播图。The propagation map generation module 206 is configured to generate an H5 page propagation map corresponding to each activity ID according to data in the valid list.
每个有效列表对应一个活动ID,因而每个有效列表中的数据可以生成一张对应一个活动ID的传播图。Each valid list corresponds to an activity ID, so the data in each valid list can generate a propagation map corresponding to an activity ID.
所述传播图可以采用树状链路图进行呈现,但不排除还有其他的呈现形式。通过传播图,H5页面的发布者可以直观地看到活动的进展情况,传播图包含了所有参与该H5页面传播的传播者和分享者,还呈现出了H5页面在各传播者和各分享者之间的传播方向。The propagation map can be rendered using a tree link map, but other forms of presentation are not excluded. By propagating the map, the publisher of the H5 page can visually see the progress of the activity. The communication map contains all the communicators and sharers involved in the H5 page propagation, and also presents the H5 page among the communicators and the sharers. The direction of communication between.
本实施例中所述临时数据表、临时列表、有效列表都存在于数据库中,即为数据库的一部分,通过将数据库进行分区获取,各区用于存储不同阶段的数据。The temporary data table, the temporary list, and the valid list in the embodiment are all present in the database, that is, part of the database, and each area is used to store data of different stages by partitioning the database.
其次,本申请提出一种基于H5页面的社交图谱生成方法。Secondly, the present application proposes a social graph generation method based on an H5 page.
在实施例一中,如图3所示,所述的基于H5页面的社交图谱生成方法包括如下步骤:In the first embodiment, as shown in FIG. 3, the H5 page-based social graph generation method includes the following steps:
S1、接收H5页面传播产生的数据,并按数据的产生时间依次暂存至临时数据表中,所述数据中至少包含活动ID和关系信息。S1: Receive data generated by H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information.
所述活动ID是H5页面的唯一识别码,也相当于H5页面的名称,被记录在H5页面的代码中;每个H5页面是对应不同的活动而产生的,相应地分配有各不相同的活动ID。每次H5页面被传播一次(推送一次)都会在产生的数据,这个数据由微信端自动记录下来,而作为该H5页面名称的活动ID自然也是数据中的一部分。The activity ID is a unique identifier of the H5 page, and 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 corresponding to different activities, and correspondingly allocated differently. Activity ID. Each time the H5 page is propagated once (pushed once), the data is generated. This data is automatically recorded by the WeChat, and the activity ID as the name of the H5 page is naturally part of the data.
所述关系信息是通过转发传阅关系接口获取的,这个接口是在H5页面制作时设置在其代码中的,所述转发传阅关系接口用于记录H5页面每一次传播的传播者和分享者,以及表示从传播者推送给分享者的推送方向的标识信息,这些信息统称为关系信息。The relationship information is obtained by forwarding a forwarding relationship interface, which is set in the code when the H5 page is created, and the forwarding and routing relationship interface is used to record the communicator and the sharer of each propagation of the H5 page, and The identification information indicating the direction of the push from the communicator to the sharer, which is collectively referred to as relationship information.
S2、依次将临时数据表中的数据按其包含的活动ID分类保存至相应的临时列表中,每个所述临时列表中的数据按其产生的时间进行排序。S2. The data in the temporary data table is sequentially sorted into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time of its generation.
这里数据保存至相应的临时列表中,具体是指将数据保存至以该数据包含的活动ID命名的临时列表中,即每一个活动ID都会对应有一个临时列表。Here, the data is saved to the corresponding temporary list, specifically, the data is saved to a temporary list named by the activity ID included in the data, that is, each activity ID corresponds to a temporary list.
S3、从临时列表中按数据的排序依次获取数据中包含的关系信息。S3. Acquire, according to the sorting of data in the temporary list, the relationship information included in the data.
首先按数据在临时列表中的排序从前往后依次取数据,获取数据后再进一步截取该数据中包含的关系信息。First, according to the sorting of the data in the temporary list, the data is taken in order from the going to the back, and after acquiring the data, the relationship information contained in the data is further intercepted.
S4、判断获取的所述关系信息的有效性,若有效则执行S6,若无效则 执行S5。S4. Determine the validity of the acquired relationship information. If it is valid, execute S6. If it is invalid, execute S5.
所述关系信息何为无效,已在前一电子装置的实施例中具体阐明,此处不再赘述。The relationship information is invalid, and has been specifically clarified in the embodiment of the previous electronic device, and details are not described herein again.
S5、将包含该关系信息的数据从所述临时列表转移至数据log表中。S5. Transfer data including the relationship information from the temporary list to the data log table.
所述数据log表(即数据日志表)是系统或者某些软件对已完成的某种处理的记录,以便将来作为参考,这里log表用于记录无效的数据,虽然数据被判为无效,但为保证后续可以追溯、纠错或恢复某些数据,这些无效的数据还需要留档,因此这里将无效的数据转移至数据log表中。The data log table (ie, the data log table) is a record of some processing done by the system or some software for future reference, where the log table is used to record invalid data, although the data is invalidated, but the data is invalid. In order to ensure that some data can be traced, corrected or restored in the future, these invalid data also need to be archived, so the invalid data is transferred to the data log table here.
S6、将包含该关系信息的数据从所述临时列表转移至相应的有效列表中。S6. Transfer data including the relationship information from the temporary list to a corresponding valid list.
对应每个活动ID都有一个以该活动ID命名的有效列表,这里所述将数据转移至相应的有效列表中,就是指将数据转移至以该数据中包含的活动ID命名的有效列表中。Corresponding to each activity ID, there is a valid list named after the activity ID. Transferring the data to the corresponding valid list here means transferring the data to a valid list named with the activity ID contained in the data.
S7、根据有效列表中的数据,生成与每个活动ID相对应的H5页面传播图。S7. Generate an H5 page propagation map corresponding to each activity ID according to the data in the valid list.
这里主要根据数据中的关系信息生成传播图,传播图具体可采用树状链路图进行呈现,但不排除还有其他的呈现形式。Here, the propagation map is mainly generated according to the relationship information in the data, and the propagation map can be represented by a tree link diagram, but other forms of presentation are not excluded.
传播图上显示出H5页面每次传播中涉及的传播者和分享者,这里所述传播者和分享者是相对于每一次的传播而言的,这一次中的传播者是上一次中的分享者,两个角色是在不断变化中的;具体而言,当H5页面由A推给B,在本次传播中,A是传播者,B是分享者;之后,该H5页面又由B推给了C,则在本次传播中,B是传播者,C是分享者;这里的B相对于A来说是分享者,而相对于C来说又是传播者。The propagator map shows the communicators and sharers involved in each H5 page's communication. The communicators and sharers described here are relative to each communication. The communicator in this time is the last share. The two roles are constantly changing; specifically, when the H5 page is pushed from A to B, in this communication, A is the communicator and B is the sharer; after that, the H5 page is pushed by B again. Given C, in this communication, B is the communicator, C is the sharer; here B is a sharer with respect to A, and a communicator relative to C.
H5页面是在不断由上而下进行传播的,A推给B,B推给C,B出了两次,但是在传播图上B仅显示一次,在A和B之间采用A向B的箭头连接,在B和C之间再采用B向C的箭头连接,假设C继续向其他人推送该 H5页面,则用箭头继续往下连接,由于无效数据被剔除了,因此会形成一张无循环的、自上而下的树状链路传播图。The H5 page is constantly being propagated from top to bottom. A is pushed to B, B is pushed to C, and B is played twice, but B is only displayed once on the propagation map, and A to B is used between A and B. The arrows are connected, and the arrow connecting B to C is used between B and C. If C continues to push the H5 page to other people, the arrow continues to be connected downward. Since the invalid data is removed, a form is formed. A cyclic, top-down tree link propagation map.
H5页面的发布者通过该传播图可以直观地看到活动的进展情况,更好地监控H5页面的传播效果。The publisher of the H5 page can visually see the progress of the activity through the propagation map, and better monitor the propagation effect of the H5 page.
在实施例二中,基于实施例一的基础上,如图4所示,所述步骤S2具体包括以下分步骤:In the second embodiment, based on the first embodiment, as shown in FIG. 4, the step S2 specifically includes the following sub-steps:
S21、获取临时数据表中的首个数据作为当前数据;S21. Obtain the first data in the temporary data table as current data.
S22、获取当前数据中包含的活动ID;S22. Obtain an activity ID included in current data.
S23、判断是否存在以当前数据中包含的活动ID命名的临时列表,若是则直接执行S25,若否则执行S24;S23, determining whether there is a temporary list named by the activity ID included in the current data, if yes, directly executing S25, if otherwise executing S24;
S24、创建一个以当前数据中包含的活动ID命名的临时列表;S24. Create a temporary list named with an activity ID included in the current data;
S25、将所述当前数据保存至以当前数据中包含的活动ID命名的临时列表中;S25. Save the current data to a temporary list named by an activity ID included in the current data.
S26、判断所述当前数据是否为所述临时数据表中的最后一个数据,若否则执行S21。S26. Determine whether the current data is the last data in the temporary data table, if otherwise, execute S21.
本实施例中,给出了数据根据活动ID分类保存的具体操作步骤。需要特别指出的是,对应每个活动ID的临时列表并不是事先预建在数据库中,而是根据接收到的数据涉及的活动ID进行创建的,如果没有接收到过涉及某一活动ID的数据,则不会创建相应的临时列表;此外,每个活动ID对应的临时列表仅创设一次,只有在获取到一个数据时检测到没有以该数据中包含的活动ID命名的临时列表时才会执行临时列表的创建。In this embodiment, specific operational steps for storing data according to the activity ID classification are given. It should be specially pointed out that the temporary list corresponding to each activity ID is not pre-built in the database, but is created according to the activity ID involved in the received data, if no data related to an activity ID is received. , the corresponding temporary list will not be created; in addition, the temporary list corresponding to each activity ID is only created once, and will only be executed when a temporary list named after the activity ID contained in the data is detected when a data is acquired. The creation of a temporary list.
在实施例三中,基于实施例一的基础上,在判断关系信息的有效性时,可以由多台前端应用同时执行,以提高整体的运行速度。此时,为防止数据脏读、误读,增加了锁的功能,即虽然有多台前端应用请求获取数据,但同 一时间仅允许一台前端应用获取数据。如图5所示,所述获取数据的过程包括以下分步骤:In the third embodiment, based on the first embodiment, when determining the validity of the relationship information, multiple front-end applications can be simultaneously executed to improve the overall running speed. At this time, in order to prevent data from being dirty and misread, the function of the lock is added, that is, although there are multiple front-end applications requesting data acquisition, 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:
S31、接收到多台前端应用发送的获取数据的请求进程。S31. Receive a request process for acquiring data sent by multiple front-end applications.
S32、多个所述获取数据的请求进程进入redis缓存列表中尝试设置锁键的值,设置成功的请求进程执行S33,未设置成功的请求进程重复执行S32。S32. The request process for acquiring the data enters the redis cache list and attempts to set a value of the lock key. The successful request process is executed in S33, and the unsuccessful request process is repeatedly executed in S32.
这里所述锁键的值具体为锁的超时时间,所述超时时间为设置锁键的值的当前时间加上锁的有效时间。The value of the lock key here is specifically the timeout period of the lock, and the timeout time is the current time of setting the value of the lock key plus the effective time of the lock.
S33、获取临时列表中排在首位的数据。S33. Obtain the data ranked first in the temporary list.
S34、删除锁键的值以释放锁。S34. Delete the value of the lock key to release the lock.
在本实施例中,前端应用发送的获取数据的请求进程不会直接进入到临时列表中获取数据,而是先进入redis缓存列表去设置锁键的值,由于redis缓存列表的特性,在同一时间仅会有一个请求进程设置成功,其他请求进程则继续尝试设置锁键的值。In this embodiment, the request process for acquiring data sent by the front-end application does not directly enter the temporary list to obtain data, but first enters the redis cache list to set the value of the lock key. Due to the characteristics of the redis cache list, at the same time Only one request process is set successfully, and other request processes continue to try to set the value of the lock key.
简单来说,就是当锁键的值已经存在时,任何请求进程是不可能设置锁键的值的,只有锁键被释放或者失效后才能被另一请求进程成功设置该锁键的值,因而在锁键的值已经存在的期间,每个请求进程都会去反复试图设置锁键的值,但都不会成功。In short, when the value of the lock key already exists, it is impossible for any request process to set the value of the lock key. Only when the lock key is released or expired can the value of the lock key be successfully set by another request process. While the value of the lock key already exists, each request process will repeatedly try to set the value of the lock key, but will not succeed.
所述锁键被释放是在一个请求完成数据的获取后锁键的值被删除;所述锁键失效是指锁定时间超过了设置的锁键的值时,锁键的值可以被后一个请求进程删除,进而使得后一个请求可以从临时列表中获取数据。The lock key is released after the acquisition of a request completion data is deleted; the lock key failure means that the lock time exceeds the value of the set lock key, and the value of the lock key can be requested by the latter The process is deleted, which in turn allows the latter request to retrieve data from the temporary list.
在实施例四中,基于实施例一的基础上,如图6所示,所述S4判断获取的所述关系信息的有效性具体包括以下分步骤:In the fourth embodiment, based on the first embodiment, as shown in FIG. 6, the validity of the acquired relationship information by the S4 specifically includes the following sub-steps:
S41、判断有效列表中已有的数据中是否包含有与获取的所述关系信息相同的关系信息,若是则判断获取的所述关系信息为无效,若否则执行S42;S41, determining whether the existing data in the valid list contains the same relationship information as the acquired relationship information, and if so, determining that the acquired relationship information is invalid, if otherwise, executing S42;
S42、判断有效列表中已有的数据中是否包含有与获取的所述关系信息 为直接反推关系的关系信息,若是则判断获取的所述关系信息为无效,若否则执行S43;S42, determining whether the data in the valid list contains the relationship information that is directly reversed relationship with the obtained relationship information, and if so, determining that the acquired relationship information is invalid, if otherwise, executing S43;
S43、判断有效列表中已有的数据中是否包含有与获取的所述关系信息为间接反推关系的关系信息,若是则判断获取的所述关系信息为无效,若否则执行S44;S43, determining whether the existing data in the valid list contains the relationship information of the obtained relationship information as an indirect reverse relationship, and if so, determining that the acquired relationship information is invalid, if otherwise, executing S44;
S44、判断获取的所述关系信息中包含的分享者是否为空,若是则判断获取的所述关系信息为无效,若否则判断获取的所述关系信息为有效。S44. Determine whether the sharer included in the obtained relationship information is empty. If yes, determine that the acquired relationship information is invalid, and if not, determine that the acquired relationship information is valid.
本实施例仅是根据前述列举的四种无效情况设计的一种判断步骤,该判断步骤可以根据无效情况的增加或减少做适当修改,本领域技术人员理应知道,各种类似的修改都在本申请的保护范围之内。This embodiment is only a judging step designed according to the four invalid cases listed above, and the judging step can be appropriately modified according to the increase or decrease of the invalid situation, and those skilled in the art should know that various similar modifications are in this embodiment. Within the scope of protection of the application.
本实施例中涉及的判断步骤为先后按顺序判断关系信息的有效性,本领域技术人员理应知道,各个步骤中的判断条件可以随意排列,判断条件的各种前后排列都在本申请的保护范围之内。The judging step involved in the embodiment is to determine the validity of the relationship information in sequence, and those skilled in the art should know that the judging conditions in each step can be randomly arranged, and various pre-arrangements of the judging conditions are in the protection scope of the present application. within.
本实施例中各判断步骤中涉及的判断条件也可以同时进行判断,具体为,判断有效列表中已有的数据中是否包含有与获取的所述关系信息相同、为直接反推关系或为间接反推关系的关系信息,或者判断获取的所述关系信息中包含的分享者是否为空,若满足其中任意一个判断条件(即只要出现一个是),则判断获取的所述关系信息为无效。本领域技术人员理应知道,这种判断方式也在本申请的保护范围之内。The determining conditions involved in the determining steps in this embodiment may also be determined at the same time. Specifically, it is determined whether the existing data in the valid list includes the same relationship information as the acquired relationship, and is a direct reverse relationship or an indirect relationship. The relation information of the relationship is reversed, or whether the sharer included in the acquired relationship information is empty, and if any one of the judgment conditions is satisfied (that is, as long as one is YES), the obtained relationship information is judged to be invalid. Those skilled in the art will appreciate that such a manner of judgment is also within the scope of the present application.
此外,本申请一种计算机可读存储介质,该计算机可读存储介质内存储有基于H5页面的社交图谱生成系统20,该基于H5页面的社交图谱生成系统20可被一个或多个处理器执行时,实现上述基于H5页面的社交图谱生成方法或电子装置的操作。Moreover, the present application is a computer readable storage medium having stored therein an H5 page-based social graph generation system 20 that can be executed by one or more processors The operation of the above-described H5 page-based social graph generation method or electronic device is implemented.
虽然以上描述了本申请的具体实施方式,但是本领域的技术人员应当理 解,这仅是举例说明,本申请的保护范围是由所附权利要求书限定的。本领域的技术人员在不背离本申请的原理和实质的前提下,可以对这些实施方式做出多种变更或修改,但这些变更和修改均落入本申请的保护范围。While the invention has been described with respect to the specific embodiments of the present invention, it is understood that the scope of the invention is defined by the appended claims. A person skilled in the art can make various changes or modifications to these embodiments without departing from the spirit and scope of the present application, and such changes and modifications fall within the scope of the present application.

Claims (2)

  1. 一种基于H5页面的社交图谱生成方法,其特征在于,包括如下步骤:A method for generating a social graph based on an H5 page, comprising the following steps:
    S1、接收H5页面传播产生的数据,并按数据的产生时间依次暂存至临时数据表中,所述数据中至少包含活动ID和关系信息;S1: Receive data generated by the H5 page propagation, and temporarily store the data in the temporary data table according to the data generation time, where the data includes at least an activity ID and relationship information;
    S2、依次将临时数据表中的数据按其包含的活动ID分类保存至相应的临时列表中,每个所述临时列表中的数据按其产生的时间进行排序;S2. The data in the temporary data table is sequentially classified into the corresponding temporary list according to the activity IDs it contains, and the data in each of the temporary lists is sorted according to the time when the generated data is generated;
    S3、从临时列表中按数据的排序依次获取数据中包含的关系信息;S3. Acquire, in order from the temporary list, the relationship information included in the data according to the sorting of the data;
    S4、判断获取的所述关系信息的有效性,若有效则执行S6,若无效则执行S5;S4, determining the validity of the acquired relationship information, if it is valid, executing S6; if not, executing S5;
    S5、将包含该关系信息的数据从所述临时列表转移至数据log表中;S5. Transfer data including the relationship information from the temporary list to a data log table.
    S6、将包含该关系信息的数据从所述临时列表转移至相应的有效列表中;S6. Transfer data including the relationship information from the temporary list to a corresponding valid list.
    S7、根据有效列表中的数据,生成与每个活动ID相对应的H5页面传播图。S7. Generate an H5 page propagation map corresponding to each activity ID according to the data in the valid list.
  2. 根据权利要求1所述的基于H5页面的社交图谱生成方法,其特征在于,所述S2包括以下分步骤:The H5 page-based social graph generation method according to claim 1, wherein the S2 comprises the following sub-steps:
    S21、获取临时数据表中的首个数据作为当前数据;S21. Obtain the first data in the temporary data table as current data.
    S22、获取当前数据中包含的活动ID;S22. Obtain an activity ID included in current data.
    S23、判断是否存在以当前数据中包含的活动ID命名的临时列表,若是则直接执行S25,若否则执行S24;S23, determining whether there is a temporary list named by the activity ID included in the current data, if yes, directly executing S25, if otherwise executing S24;
    S24、创建一个以当前数据中包含的活动ID命名的临时列表;S24. Create a temporary list named with an activity ID included in the current data;
    S25、将所述当前数据保存至以当前数据中包含的活动ID命名的临时列表中;S25. Save the current data to a temporary list named by an activity ID included in the current data.
    S26、判断所述当前数据是否为所述临时数据表中的最后一个数据,若否则执行S21。S26. Determine whether the current data is the last data in the temporary data table, if otherwise, execute S21.
PCT/CN2018/083078 2018-02-09 2018-04-13 H5 page-based social media map generation method, electronic device, and storage medium WO2019153493A1 (en)

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
WO2019153493A1 true WO2019153493A1 (en) 2019-08-15

Family

ID=62774040

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/083078 WO2019153493A1 (en) 2018-02-09 2018-04-13 H5 page-based social media map generation method, 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
CN101754097A (en) * 2008-11-27 2010-06-23 华为技术有限公司 Advertisement forwarding method, device and system
CN103885993A (en) * 2012-12-24 2014-06-25 北大方正集团有限公司 Public opinion monitoring method and device for microblog
CN105701100A (en) * 2014-11-26 2016-06-22 上海高研明鉴信息技术有限公司 Automatic recording method, device and system of internet information forwarding process
CN106227551A (en) * 2016-08-05 2016-12-14 互动派科技股份有限公司 A kind of marketing program design system based on H5 technology and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850549A (en) * 2014-02-13 2015-08-19 夷希数码科技(上海)有限公司 Method for monitoring public opinions on Internet
US20170286558A1 (en) * 2016-04-01 2017-10-05 Buzzfeed, Inc. Tracking Internet Sharing Using Augmented URLs
CN106533926B (en) * 2016-12-27 2020-06-12 武汉斗鱼网络科技有限公司 Webpage information spreading method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101754097A (en) * 2008-11-27 2010-06-23 华为技术有限公司 Advertisement forwarding method, device and system
CN103885993A (en) * 2012-12-24 2014-06-25 北大方正集团有限公司 Public opinion monitoring method and device for microblog
CN105701100A (en) * 2014-11-26 2016-06-22 上海高研明鉴信息技术有限公司 Automatic recording method, device and system of internet information forwarding process
CN106227551A (en) * 2016-08-05 2016-12-14 互动派科技股份有限公司 A kind of marketing program design system based on H5 technology and method

Also Published As

Publication number Publication date
CN108268662B (en) 2020-11-10
CN108268662A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
US10311230B2 (en) Anomaly detection in distributed ledger systems
CN109857737B (en) Cold and hot data storage method and device and electronic equipment
US9965364B2 (en) Fault tolerant listener registration in the presence of node crashes in a data grid
US10275347B2 (en) System, method and computer program product for managing caches
CN103458036B (en) Access device and method of cluster file system
JP2021521556A (en) Data backup methods and their computer programs and computing devices
US10606806B2 (en) Method and apparatus for storing time series data
US9367261B2 (en) Computer system, data management method and data management program
WO2020181810A1 (en) Data processing method and apparatus applied to multi-level caching in cluster
US10133775B1 (en) Run time prediction for data queries
JP5686034B2 (en) Cluster system, synchronization control method, server device, and synchronization control program
US11146624B2 (en) Real time multi-tenant workload tracking and auto throttling
CN106933843A (en) database heartbeat detecting method and device
WO2019169771A1 (en) Electronic device, access instruction information acquisition method and storage medium
CN103500108A (en) System memory access method, node processor and multi-processor system
WO2020247115A1 (en) Subscription to edits of blockchain transaction
WO2019153493A1 (en) H5 page-based social media map generation method, electronic device, and storage medium
CN108241616B (en) Message pushing method and device
EP3349416B1 (en) Relationship chain processing method and system, and storage medium
US20180253462A1 (en) Executing transactions based on success or failure of the transactions
CN116010926A (en) Login authentication method, login authentication device, computer equipment and storage medium
EP3082050A1 (en) Mass data fusion storage method and system
CN114036160A (en) Real-time data acquisition method and device, electronic equipment and storage medium
CN110363515B (en) Rights and interests card account information inquiry method, system, server and readable storage medium
CN113687921A (en) Transaction processing method and device, distributed database system and electronic equipment

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/11/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18905874

Country of ref document: EP

Kind code of ref document: A1