CN105426308A - Offline data construction method and device - Google Patents

Offline data construction method and device Download PDF

Info

Publication number
CN105426308A
CN105426308A CN201510765251.3A CN201510765251A CN105426308A CN 105426308 A CN105426308 A CN 105426308A CN 201510765251 A CN201510765251 A CN 201510765251A CN 105426308 A CN105426308 A CN 105426308A
Authority
CN
China
Prior art keywords
entity
forest
simple relation
relation
complex relationship
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.)
Pending
Application number
CN201510765251.3A
Other languages
Chinese (zh)
Inventor
王国强
陈宇哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510765251.3A priority Critical patent/CN105426308A/en
Publication of CN105426308A publication Critical patent/CN105426308A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention provides an offline data construction method and device. The method comprises the following steps: determining entities, a simple relationship and a complicated relationship in predetermined resources, wherein the simple relationship is relation between two entities and the complicated relationship is relation between at least two entities and at least one entity; constructing a directed acyclic simple relationship forest according to the simple relationship and the related entities; constructing a complicated relationship forest with a predetermined height according to the complicated relationship and related entities; and reading online data through the simple relationship forest and the complicated relationship forest to construct offline data. According to the method, the simple relationship forest and the complicated relationship forest are constructed to form a framework same as the online data, and the online data is read through the framework to ensure that the offline data and the online data are consistent, so that the comprehensiveness of the offline test is ensured and the test efficiency is enhanced.

Description

The construction method of data and device under a kind of line
Technical field
The present invention relates to computer realm, particularly relate to construction method and the device of data under a kind of line.
Background technology
Under current line, mostly data are to have a set of relatively independent data system, for internet product, data on line are abundanter than data under the line in this independently data system, therefore when data are tested under by line, cause testing comprehensively or product goes wrong time the problem that cannot reappear in time, and along with the increase of time-to-live, under line, data also can increase always, cause the accounting of really available data in whole data system very low, cause the waste of resource.
Summary of the invention
One of technical matters that the present invention solves is that existing method can not data and the data consistent on line under retention wire, causes testing comprehensively, reappears and be difficult to and the problem of the wasting of resources.
According to an aspect of the present invention, provide the construction method of data under a kind of line, comprising:
Determine the entity in predetermined resource, simple relation and complex relationship, described simple relation is the contact of two inter-entity, and described complex relationship is contacting of at least two entities and at least one inter-entity;
According to the simple relation forest of the entity structure directed acyclic that described simple relation and its contact;
According to the complex relationship forest of the entity structure predetermined altitude that described complex relationship and its contact;
Read data construct on line by described simple relation forest and complex relationship forest and become data under line.
According to another aspect of the present invention, provide the construction device of data under a kind of line, comprising:
For determining the device of the complex relationship that the entity in predetermined resource, the simple relation representing the contact of two inter-entity and expression at least two entities and at least one inter-entity contact;
Entity for contacting according to described simple relation and its builds the device of the simple relation forest of directed acyclic;
Entity for contacting according to described complex relationship and its builds the device of the complex relationship forest of predetermined altitude;
The device of data under become line by data construct on described simple relation forest and complex relationship forest reading line.
Due to construction method and the device of data under the line of the present embodiment, the framework identical with data on line is formed with complex relationship forest by building simple relation forest, and read data on line by this framework and to make under line data in data and line be consistent, that tests under ensure that line is comprehensive, improves testing efficiency.
Those of ordinary skill in the art will understand, although detailed description is below carried out with reference to illustrated embodiment, accompanying drawing, the present invention is not limited in these embodiments.But scope of the present invention is widely, and be intended to limit scope of the present invention by means of only accompanying claim.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 shows the process flow diagram according to the construction method of data under the embodiment of the present invention one line.
Fig. 2 shows the particular flow sheet of step S120 in the construction method according to data under the embodiment of the present invention one line.
Fig. 3 shows a particular flow sheet of step S140 in the construction method according to data under the embodiment of the present invention one line.
Fig. 4 shows the another particular flow sheet of step S140 in the construction method according to data under the embodiment of the present invention one line.
Fig. 5 shows the process flow diagram building simple relation forest in the construction method according to data under the embodiment of the present invention one line.
Fig. 6 shows the schematic diagram that the step S510 that builds simple relation forest in the construction method according to data under the embodiment of the present invention one line determines.
Fig. 7 shows the schematic diagram that the step S520 that builds simple relation forest in the construction method according to data under the embodiment of the present invention one line determines.
Fig. 8 shows the schematic diagram that the step S530 that builds simple relation forest in the construction method according to data under the embodiment of the present invention one line determines.
Fig. 9 shows the process flow diagram building complex relationship forest in the construction method according to data under the embodiment of the present invention one line.
Figure 10 shows the schematic diagram that the step S920 that builds complex relationship forest in the construction method according to data under the embodiment of the present invention one line determines.
Figure 11 shows the block diagram according to the construction device of data under the embodiment of the present invention one line.
Figure 12 shows the block diagram according to the construction device of data under the another line of the embodiment of the present invention.
"-" in accompanying drawing below word represents embedded link form, and in accompanying drawing, same or analogous Reference numeral represents same or analogous parts.
Embodiment
Before in further detail exemplary embodiment being discussed, it should be mentioned that some exemplary embodiments are described as the process or method described as process flow diagram.Although operations is described as the process of order by process flow diagram, many operations wherein can be implemented concurrently, concomitantly or simultaneously.In addition, the order of operations can be rearranged.Described process can be terminated when its operations are completed, but can also have the additional step do not comprised in the accompanying drawings.Described process can correspond to method, function, code, subroutine, subroutine etc.
Within a context alleged " terminal ", also referred to as " computer ", refer to the smart electronics terminal that can be performed the predetermined process such as numerical evaluation and/or logical calculated process by operation preset program or instruction, it can comprise processor and storer, the survival instruction that prestores in memory is performed to perform predetermined process process by processor, or perform predetermined process process by the hardware such as ASIC, FPGA, DSP, or combined by said two devices and realize.Terminal includes but not limited to server, PC, notebook computer, panel computer, smart mobile phone etc.
Described terminal comprises user terminal and the network terminal.Wherein, described user terminal includes but not limited to computer, smart mobile phone, PDA etc.; The described network terminal includes but not limited to the server group that single network server, multiple webserver form or the cloud be made up of a large amount of computing machine or the webserver based on cloud computing (CloudComputing), wherein, cloud computing is the one of Distributed Calculation, the super virtual machine be made up of a group loosely-coupled computing machine collection.Wherein, described terminal isolated operation can realize the present invention, also accessible network by realizing the present invention with the interactive operation of other terminals in network.Wherein, the network residing for described terminal includes but not limited to internet, wide area network, Metropolitan Area Network (MAN), LAN (Local Area Network), VPN etc.
It should be noted that; described user terminal, the network terminal and network etc. are only citing; other terminals that are existing or that may occur from now on or network, as being applicable to the present invention, within also should being included in scope, and are contained in this with way of reference.
Method (some of them are illustrated by process flow diagram) discussed below can be implemented by hardware, software, firmware, middleware, microcode, hardware description language or its combination in any.When implementing by software, firmware, middleware or microcode, program code or code segment in order to implement necessary task can be stored in machine or computer-readable medium (such as storage medium).(one or more) processor can implement necessary task.
Concrete structure disclosed herein and function detail are only representational, and are the objects for describing exemplary embodiment of the present invention.But the present invention can carry out specific implementation by many replacement forms, and should not be construed as only being limited to the embodiments set forth herein.
Should be understood that, although may have been used term " first ", " second " etc. here to describe unit, these unit should not limit by these terms.These terms are used to be only used to a unit and another unit to distinguish.For example, when not deviating from the scope of exemplary embodiment, first module can be called as second unit, and second unit can be called as first module similarly.Here used term "and/or" comprise one of them or more any and all combinations of listed associated item.
Should be understood that, when a unit is called as " connection " or " coupling " to another unit, it can directly connect or be coupled to another unit described, or can there is temporary location.On the other hand, " when being directly connected " or " directly coupled " to another unit, then there is not temporary location when a unit is called as.Should explain in a comparable manner the relation be used between description unit other words (such as " and be in ... between " compared to " and be directly in ... between ", " with ... contiguous " compared to " and with ... be directly close to " etc.).
Here used term is only used to describe specific embodiment and be not intended to limit exemplary embodiment.Unless context refers else clearly, otherwise singulative used here " ", " one " are also intended to comprise plural number.It is to be further understood that, the existence of the feature that term used here " comprises " and/or " comprising " specifies to state, integer, step, operation, unit and/or assembly, and do not get rid of and there is or add other features one or more, integer, step, operation, unit, assembly and/or its combination.
Also it should be mentioned that and to replace in implementation at some, the function/action mentioned can according to being different from occurring in sequence of indicating in accompanying drawing.For example, depend on involved function/action, in fact the two width figure in succession illustrated can perform simultaneously or sometimes can perform according to contrary order substantially.
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Fig. 1 is the process flow diagram of the construction method of data under line according to an embodiment of the invention.
Shown in composition graphs 1, under the line described in the present embodiment, the construction method of data, comprises the steps:
S110, the entity determined in predetermined resource, simple relation and complex relationship, described simple relation is the contact of two inter-entity, and described complex relationship is contacting of at least two entities and at least one inter-entity;
S120, the entity contacted according to described simple relation and its build the simple relation forest of directed acyclic;
S130, the entity contacted according to described complex relationship and its build the complex relationship forest of predetermined altitude;
S140, to be read data construct on line by described simple relation forest and complex relationship forest and become data under line.
Below each step is described in further detail.
In step S110, the resource information of the environmental data configuration management that predetermined resource can be configured by configuration platform also can be the resource information drawn by log analysis.Entity is generally do not rely on other resource and independently there is (such as: screen, CPU, video card, internal memory, mainboard, power supply or hard disk etc.) in predetermined resource.Simple relation is the contact of two inter-entity, and such as: video driver screen display, video card connects mainboard, and so the simple relation of video card just comprises and the driving of screen and the connection with mainboard.Complex relationship is contacting of at least two entities and at least one inter-entity, such as: CPU is by mainboard and internal memory reading of content, and so complex relationship contacts with regard to the reading comprising mainboard and internal memory and CPU.
Shown in composition graphs 2, in step S120, the simple relation forest building directed acyclic according to described simple relation and its entity of contacting can comprise the steps:
S1201, the entity described simple relation and its contacted according to the significance level of described entity carry out orientedization process.Specifically can comprise any one situation following:
If the associate field in 1 described simple relation has specify in-degree field, then using the in-degree of entity corresponding for described appointment in-degree field as described relation, with other entity of described relationship out-degree as described relation.
Particularly, simple relation is expressed as contacting of an entity and at least one inter-entity by associate field, such as: if the identity information of entity 1 is A, the identity information of entity 2 is B, the contact of two inter-entity is C, then entity 1 is ACB with the associate field of the simple relation of other entity, if specify A to be in-degree field, then entity 1 is as the in-degree of simple relation, and entity 2 is as the out-degree of simple relation.
Again such as: if the identity information of entity 1 is A, the identity information of entity 2 is B, the identity information of entity 3 is C, contact between entity 1 and entity 2 is D, the contact of entity 1 and entity 3 is E, and entity 1 is ADB and AEC with the associate field of the simple relation of other entity, if specify B to be in-degree field, then entity 2 is as the in-degree of simple relation, and entity 1 and entity 3 are as the out-degree of simple relation.
If the associate field in 2 described simple relations does not specify in-degree field, then using the in-degree of entity corresponding for associate field the highest for priority as described relation, with other entity of described relationship out-degree as described relation.
Such as: if the identity information of entity 1 is A, the identity information of entity 2 is B, the contact of two inter-entity is C, then entity 1 is ACB with the associate field of the simple relation of other entity, if A and B does not all refer to degree of being incorporated into field, but the priority ratio A of B is high, then entity 2 is as the in-degree of simple relation, and entity 1 is as the out-degree of simple relation.
Again such as: if the identity information of entity 1 is A, the identity information of entity 2 is B, the identity information of entity 3 is C, contact between entity 1 and entity 2 is D, and the contact of entity 1 and entity 3 is E, and entity 1 is ADB and AEC with the associate field of the simple relation of other entity, if A, B and C all do not refer to degree of being incorporated into field, priority is respectively B, A and C from high to low, then entity 2 is as the in-degree of simple relation, and entity 1 and entity 3 are as the out-degree of simple relation.
S1202, by orientedization process after described simple relation and its entity contacted carry out decyclization process according to the associate field in described simple relation after form simple relation forest.Specifically can comprise the following steps:
If there is appointment in-degree field priority corresponding to first instance in one first simple relation higher than the priority of the associate field corresponding with described first instance corresponding relationship second instance, then detect described first instance and whether there is the first path to described second instance.
If two described first instances exist the first path connecting described second instance, then ignore in described first path that last is connected to the path of described second instance.
Such as: the identity information of entity 1 is A, the identity information of entity 2 is B, the identity information of entity 3 is C, then entity 1 is ADB with the associate field of the simple relation of other entity, entity 2 is BEC with the associate field of the simple relation of other entity, entity 3 is CFA with the simple relation of other entity, if the B in associate field ADB is for specifying in-degree field, the priority of associate field is B from high to low, C and A, because B in associate field ADB specifies in-degree field and the priority of B higher than A, then detect from entity 2 to there is path BECFA to entity 1, then ignore the path of entity 3 to entity 1.
In step S130, take complex relationship as root node, the entity that described complex relationship contacts to be the structure height of leaf node be 2 at least one array become complex relationship forest.
Particularly, complex relationship represents contacting of at least two entities and at least one inter-entity, such as: the identity information of entity 1 is A, the identity information of entity 2 is B, the identity information of entity 3 is C, complex relationship presentation-entity 1 and contacting between entity 2 and entity 3, it need ensure that entity 1 and entity 2 integrally and between entity 3 contact.
Shown in composition graphs 3, in step S140, described simple relation forest can be traveled through according to the predetermined request on the line read in data and build and form data under line.Specifically can comprise the following steps:
S1401, according to described predetermined request determination starting point entity.
Particularly, the predetermined request on line in data can be URL(uniform resource locator) (URL, UniformResourceLocator) request, also can be the request of resource class.
S1402, the simple relation traversal downstream entities corresponding according to starting point entity, until do not have downstream entities or downstream entities not to have corresponding simple relation to stop traversal, the process of traversal completes the structure of data under line.
Shown in composition graphs 4, in step S140, described complex relationship forest can be traveled through according to the predetermined request on the line read in data and build and form data under line.Specifically can comprise the following steps:
S1403, according to complex relationships all in described predetermined request determination complex relationship forest.
S1404, to realize with data on the line of described reading by the associate field in described complex relationship according to pre-defined algorithm synchronous.
Particularly, on the line value of the associate field in complex relationship being realized to described reading by cartesian product, data is synchronous, owing to being highly 2, therefore without the need to further resolving result again.
Shown in composition graphs 5, the construction method of data under the another line described in the embodiment of the present invention, generally can determine the dimension that user specifies, and the step setting up corresponding simple relation forest for each dimension comprises:
S510, the entity A determined in predetermined resource, entity B, entity C and entity D, simple relation a, simple relation b, simple relation c and simple relation d.
Specifically can as shown in Figure 6, simple relation a is entity A and entity B and contacting between entity A and entity C; Simple relation b is contacting between entity A and entity B; Simple relation c is contacting between entity B and entity C; Simple relation d is contacting between entity C and entity D.
S520, the entity described simple relation and its contacted according to the significance level of described entity carry out orientedization process.
Particularly, the associate field of simple relation a is AaB and AaC, and the associate field of simple relation b is AbB, and the associate field of simple relation c is BcC, and the associate field of simple relation d is CdD.If associate field B and C is for specifying in-degree in associate field simple relation a, the priority of associate field is respectively C, B, A and D from high to low, appointment in-degree is had owing to only having in the associate field in simple relation a, therefore all from entity corresponding to the associate field that priority is high to entity corresponding to the associate field that priority is low in simple relation b, c and d, after concrete oriented process as shown in Figure 7.
S530, by orientedization process after described simple relation and its entity contacted carry out decyclization process according to the associate field in described simple relation after form simple relation forest.
Particularly, because B in associate field AaB specifies in-degree field and the priority of B higher than A, therefore the path BbA of entity B to entity A detected, then ignore the path of entity B to entity A; Because C in associate field AaC specifies in-degree field and the priority of C higher than A, therefore the path CcBbA of entity C to entity A detected, then ignore the path of entity B to entity A.The simple relation forest formed after concrete decyclization process as shown in Figure 8.
S540, be starting point entity according to a described URL request determination starting point entity A.
S550, the simple relation traversal downstream entities corresponding according to starting point entity, until do not have downstream entities or downstream entities not to have corresponding simple relation to stop traversal, the process of traversal completes the structure of data under line.
Particularly, the simple relation a corresponding according to starting point entity A travels through downstream entities B and entity C, and the simple relation b corresponding by entity B can not find downstream entities, therefore stops traversal; The simple relation c corresponding by entity C finds downstream entities B, and the simple relation b corresponding by entity B can not find downstream entities, therefore stops traversal, completes the structure of data under line.
Shown in composition graphs 9, the construction method of data under the another line described in the embodiment of the present invention, generally can determine the dimension that user specifies, and the step setting up corresponding complex relationship forest for each dimension comprises:
S910, the entity A determined in predetermined resource, entity B, entity C and entity D, complex relationship e and complex relationship f.
Particularly, complex relationship e is entity A and contacting between entity B and entity C; Complex relationship f is entity A and entity B and contacting between entity C and entity D.
S920, be root node with complex relationship, the entity that described complex relationship contacts to be the structure height of leaf node be 2 at least one array become complex relationship forest.
Particularly, the complex relationship forest of entity A, entity B, entity C, entity D, complex relationship e and complex relationship f composition can be as shown in Figure 10.
Shown in Figure 11, the construction device of data under the line described in the present embodiment, comprises as lower device:
For determining the device (hereinafter referred to as " determining unit ") 110 of the complex relationship that the entity in predetermined resource, the simple relation representing the contact of two inter-entity and expression at least two entities and at least one inter-entity contact.
Entity for contacting according to described simple relation and its builds the device (hereinafter referred to as " simple relation forest construction unit ") 120 of the simple relation forest of directed acyclic.
Entity for contacting according to described complex relationship and its builds the device (hereinafter referred to as " complex relationship forest construction unit ") 130 of the complex relationship forest of predetermined altitude.
For read by described simple relation forest and complex relationship forest data construct on line become line under data device (hereinafter referred to as " and data stuffing unit) 140.
Below each step is described in further detail.
In determining unit 110, the resource information of the environmental data configuration management that predetermined resource can be configured by configuration platform also can be the resource information drawn by log analysis.Entity is generally do not rely on other resource and independently there is (such as: screen, CPU, video card, internal memory, mainboard, power supply or hard disk etc.) in predetermined resource.Simple relation is the contact of two inter-entity, and such as: video driver screen display, video card connects mainboard, and so the simple relation of video card just comprises and the driving of screen and the connection with mainboard.Complex relationship is contacting of at least two entities and at least one inter-entity, such as: CPU is by mainboard and internal memory reading of content, and so complex relationship contacts with regard to the reading comprising mainboard and internal memory and CPU.
Shown in Figure 12, simple relation forest construction unit 120 can comprise as lower device:
For described simple relation and its entity contacted being carried out according to the significance level of described entity the device (hereinafter referred to as " oriented process subelement ") 1201 of orientedization process.
In oriented process subelement 1201, specifically can comprise following arbitrary device:
If have for the associate field in described simple relation and specify in-degree field, then using the in-degree of entity corresponding for described appointment in-degree field as described relation, with other entity of described relationship device (hereinafter referred to as " specifying in-degree subelement ") 12011 as the out-degree of described relation.
Specify in in-degree subelement 12011, simple relation is expressed as contacting of an entity and at least one inter-entity by associate field, such as: if the identity information of entity 1 is A, the identity information of entity 2 is B, the contact of two inter-entity is C, then entity 1 is ACB with the associate field of the simple relation of other entity, if specify A to be in-degree field, then entity 1 is as the in-degree of simple relation, and entity 2 is as the out-degree of simple relation.
Again such as: if the identity information of entity 1 is A, the identity information of entity 2 is B, the identity information of entity 3 is C, contact between entity 1 and entity 2 is D, the contact of entity 1 and entity 3 is E, and entity 1 is ADB and AEC with the associate field of the simple relation of other entity, if specify B to be in-degree field, then entity 2 is as the in-degree of simple relation, and entity 1 and entity 3 are as the out-degree of simple relation.
If do not specify in-degree field for the associate field in described simple relation, then using the in-degree of entity corresponding for associate field the highest for priority as described relation, with other entity of described relationship device (hereinafter referred to as " priority in-degree subelement ") 12012 as the out-degree of described relation.
Such as: if the identity information of entity 1 is A, the identity information of entity 2 is B, the contact of two inter-entity is C, then entity 1 is ACB with the associate field of the simple relation of other entity, if A and B does not all refer to degree of being incorporated into field, but the priority ratio A of B is high, then entity 2 is as the in-degree of simple relation, and entity 1 is as the out-degree of simple relation.
Again such as: if the identity information of entity 1 is A, the identity information of entity 2 is B, the identity information of entity 3 is C, contact between entity 1 and entity 2 is D, and the contact of entity 1 and entity 3 is E, and entity 1 is ADB and AEC with the associate field of the simple relation of other entity, if A, B and C all do not refer to degree of being incorporated into field, priority is respectively B, A and C from high to low, then entity 2 is as the in-degree of simple relation, and entity 1 and entity 3 are as the out-degree of simple relation.
The device (hereinafter referred to as " decyclization process subelement ") 1202 of simple relation forest is formed after carrying out decyclization process for the described simple relation after orientedization being processed and its entity contacted according to the associate field in described simple relation.
In decyclization process subelement 1202, specifically can comprise with lower device:
If for there is the priority of appointment in-degree field priority corresponding to first instance higher than the associate field corresponding with described first instance corresponding relationship second instance in the first simple relation, then detect described first instance and whether there is the device (hereinafter referred to as " ring detection sub-unit ") 12021 of the first path to described second instance.
If there is the first path to described second instance for described first instance, then to ignore in described first path last entity to the device (hereinafter referred to as " ignoring subelement ") 12022 in the path of described second instance.
Such as: the identity information of entity 1 is A, the identity information of entity 2 is B, the identity information of entity 3 is C, then entity 1 is ADB with the associate field of the simple relation of other entity, entity 2 is BEC with the associate field of the simple relation of other entity, entity 3 is CFA with the simple relation of other entity, if the B in associate field ADB is for specifying in-degree field, the priority of associate field is B from high to low, C and A, because B in associate field ADB specifies in-degree field and the priority of B higher than A, then detect from entity 2 to there is path BECFA to entity 1, then ignore the path of entity 3 to entity 1.
The construction unit 130 of complex relationship forest, specifically can comprise:
For taking complex relationship as root node, the entity that described complex relationship contacts to be the structure height of leaf node be 2 at least one array become complex relationship forest (hereinafter referred to as " forest builds subelement ") 1301.
Particularly, complex relationship represents contacting of at least two entities and at least one inter-entity, such as: the identity information of entity 1 is A, the identity information of entity 2 is B, the identity information of entity 3 is C, complex relationship presentation-entity 1 and contacting between entity 2 and entity 3, it need ensure that entity 1 and entity 2 integrally and between entity 3 contact.
Shown in Figure 12, data stuffing unit 140, can comprise: the device (hereinafter referred to as " simple relation forest fills subelement ") 1401 of data under travel through described simple relation forest structure formation line according to the predetermined request in data on the line read.Specifically can comprise with lower device:
For the device (hereinafter referred to as " starting point entity determination subelement ") 14011 according to described predetermined request determination starting point entity.
Particularly, the predetermined request on line in data can be URL request, also can be the request of resource class.
For the simple relation traversal downstream entities corresponding according to starting point entity, until do not have downstream entities or downstream entities not to have corresponding simple relation to stop traversal, the process of traversal completes the device (hereinafter referred to as " traversal subelement ") 14012 of the structure of data under line.
Shown in Figure 12, in data stuffing unit 140, can comprise: the device (hereinafter referred to as " complex relationship forest fills subelement ") 1402 of data under travel through described complex relationship forest structure formation line according to the predetermined request in data on the line read.Specifically can comprise with lower device:
For the device (hereinafter referred to as " complex relationship set subelement ") 14021 according to complex relationships all in described predetermined request determination complex relationship forest.
For the associate field in described complex relationship is realized the synchronous device (hereinafter referred to as " synchronous subelement ") 14022 with data on the line of described reading according to pre-defined algorithm.
Particularly, on the line value of the associate field in complex relationship being realized to described reading by cartesian product, data is synchronous, owing to being highly 2, therefore without the need to further resolving result again.
The construction method of data and device under line described in the embodiment of the present invention, the framework identical with data on line is formed with complex relationship forest by building simple relation forest, and read data on line by this framework and to make under line data in data and line be consistent, that tests under ensure that line is comprehensive, test under making line and line is tested and there is identical stability and identical test result, thus improve testing efficiency.
It should be noted that the present invention can be implemented in the assembly of software and/or software restraint, such as, each device of the present invention can adopt special IC (ASIC) or any other similar hardware terminal to realize.In one embodiment, software program of the present invention can perform to realize step mentioned above or function by processor.Similarly, software program of the present invention (comprising relevant data structure) can be stored in computer readable recording medium storing program for performing, such as, and RAM storer, magnetic or CD-ROM driver or flexible plastic disc and similar terminal.In addition, steps more of the present invention or function can adopt hardware to realize, such as, as coordinating with processor thus performing the circuit of each step or function.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of other unit or step, odd number does not get rid of plural number.Multiple unit of stating in system claims or device also can be realized by software or hardware by a unit or device.First, second word such as grade is used for representing title, and does not represent any specific order.
Although show and describe exemplary embodiment especially above, it will be appreciated by those skilled in the art that when not deviating from the spirit and scope of claims, can change to some extent in its form and details.Here sought protection is set forth in the dependent claims.

Claims (16)

1. the construction method of data under line, comprising:
Determine the entity in predetermined resource, simple relation and complex relationship, described simple relation is contacting of an entity and at least one inter-entity, and described complex relationship is contacting of at least two entities and at least one inter-entity;
According to the simple relation forest of the entity structure directed acyclic that described simple relation and its contact;
According to the complex relationship forest of the entity structure predetermined altitude that described complex relationship and its contact;
Read data construct on line by described simple relation forest and complex relationship forest and become data under line.
2. construction method according to claim 1, the step that the described entity contacted according to described simple relation and its builds the simple relation forest of directed acyclic comprises:
Described simple relation and its entity contacted are carried out orientedization process by the significance level according to described entity;
Simple relation forest is formed after described simple relation after orientedization being processed and its entity contacted carry out decyclization process according to the associate field in described simple relation.
3. construction method according to claim 2, the step that described simple relation and its entity contacted are carried out orientedization process by the shown significance level according to described entity comprises:
If the associate field in described simple relation has specify in-degree field, then using the in-degree of entity corresponding for described appointment in-degree field as described relation, with other entity of described relationship out-degree as described relation;
If the associate field in described simple relation does not specify in-degree field, then using the in-degree of entity corresponding for associate field the highest for priority as described relation, with other entity of described relationship out-degree as described relation.
4. construction method according to claim 3, described orientedization is processed after described simple relation and its entity contacted carry out decyclization process according to the associate field in described simple relation after form simple relation forest step comprise:
If there is appointment in-degree field priority corresponding to first instance in the first simple relation higher than the priority of the associate field corresponding with described first instance corresponding relationship second instance, then detect described first instance and whether there is the first path to described second instance;
If described first instance exists the first path connecting described second instance, then ignore in described first path that last is connected to the path of described second instance.
5. construction method according to claim 1, the step that the described entity contacted according to described complex relationship and its builds the complex relationship forest of predetermined altitude comprises:
Take complex relationship as root node, the entity that described complex relationship contacts to be the structure height of leaf node be 2 at least one array become complex relationship forest.
6. construction method according to claim 1, describedly reads data construct on line by described simple relation forest and complex relationship forest and becomes the step of data under line to comprise:
Travel through described simple relation forest and complex relationship forest according to the predetermined request on the line read in data to build and form data under line.
7. construction method according to claim 6, the predetermined request on the described line according to reading in data travels through described simple relation forest and builds and form the step of data under line and comprise:
According to described predetermined request determination starting point entity;
The simple relation traversal downstream entities corresponding according to starting point entity, until do not have downstream entities or downstream entities not to have corresponding simple relation to stop traversal, the process of traversal completes the structure of data under line.
8. construction method according to claim 6, the predetermined request on the described line according to reading in data travels through described complex relationship forest and builds and form the step of data under line and comprise:
According to complex relationships all in described predetermined request determination complex relationship forest;
Associate field in described complex relationship is realized with data on the line of described reading according to pre-defined algorithm synchronous.
9. the construction device of data under line, comprising:
For determining the device of the complex relationship that the entity in predetermined resource, the simple relation representing the contact of two inter-entity and expression at least two entities and at least one inter-entity contact;
Entity for contacting according to described simple relation and its builds the device of the simple relation forest of directed acyclic;
Entity for contacting according to described complex relationship and its builds the device of the complex relationship forest of predetermined altitude;
The device of data under become line by data construct on described simple relation forest and complex relationship forest reading line.
10. construction device according to claim 9, the device that the described entity contacted according to described simple relation and its builds the simple relation forest of directed acyclic comprises:
For described simple relation and its entity contacted being carried out according to the significance level of described entity the device of orientedization process;
The device of simple relation forest is formed after carrying out decyclization process for the described simple relation after orientedization being processed and its entity contacted according to the associate field in described simple relation.
11. construction devices according to claim 10, the device that described simple relation and its entity contacted are carried out orientedization process by the shown significance level according to described entity comprises:
In-degree field is specified, then using the in-degree of entity corresponding for described appointment in-degree field as described relation, with other entity of described relationship device as the out-degree of described relation if having for the associate field in described simple relation;
If do not specify in-degree field for the associate field in described simple relation, then using the in-degree of entity corresponding for associate field the highest for priority as described relation, with other entity of described relationship device as the out-degree of described relation.
12. construction devices according to claim 11, described orientedization is processed after described simple relation and its entity contacted carry out decyclization process according to the associate field in described simple relation after form simple relation forest device comprise:
If for there is appointment in-degree field priority corresponding to first instance in the first simple relation higher than the priority of the associate field corresponding with described first instance corresponding relationship second instance, then detect described first instance and whether there is the device of the first path to described second instance;
If there is the first path connecting described second instance for described first instance, then ignore in described first path that last is connected to the device in the path of described second instance.
13. construction devices according to claim 9, the device that the described entity contacted according to described complex relationship and its builds the complex relationship forest of predetermined altitude comprises:
For taking complex relationship as root node, the entity that described complex relationship contacts to be the structure height of leaf node be 2 at least one array become the device of complex relationship forest.
14. construction devices according to claim 9, describedly read data construct on line by described simple relation forest and complex relationship forest and become the device of data under line to comprise:
The device of data under travel through described simple relation forest and complex relationship forest structure formation line according to the predetermined request in data on the line read.
15. construction devices according to claim 14, the predetermined request on the described line according to reading in data travels through described simple relation forest and builds and form the device of data under line and comprise:
For the device according to described predetermined request determination starting point entity;
For the simple relation traversal downstream entities corresponding according to starting point entity, until do not have downstream entities or downstream entities not to have corresponding simple relation to stop traversal, the process of traversal completes the device of the structure of data under line.
16. construction devices according to claim 14, the predetermined request on the described line according to reading in data travels through described complex relationship forest and builds and form the device of data under line and comprise:
For the device according to complex relationships all in described predetermined request determination complex relationship forest;
For the associate field in described complex relationship is realized the synchronous device with data on the line of described reading according to pre-defined algorithm.
CN201510765251.3A 2015-11-11 2015-11-11 Offline data construction method and device Pending CN105426308A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510765251.3A CN105426308A (en) 2015-11-11 2015-11-11 Offline data construction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510765251.3A CN105426308A (en) 2015-11-11 2015-11-11 Offline data construction method and device

Publications (1)

Publication Number Publication Date
CN105426308A true CN105426308A (en) 2016-03-23

Family

ID=55504526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510765251.3A Pending CN105426308A (en) 2015-11-11 2015-11-11 Offline data construction method and device

Country Status (1)

Country Link
CN (1) CN105426308A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967204A (en) * 2017-11-21 2018-04-27 百度在线网络技术(北京)有限公司 Line pushes method, system and the terminal device surveyed
CN108427638A (en) * 2018-01-19 2018-08-21 口碑(上海)信息技术有限公司 Region network of relation marketing activity test method and device
CN111290948A (en) * 2020-01-19 2020-06-16 腾讯科技(深圳)有限公司 Test data acquisition method and device, computer equipment and readable storage medium
CN112989137A (en) * 2021-04-21 2021-06-18 军事科学院系统工程研究院网络信息研究所 Entity relationship analysis method for complex network information system construction

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101452462A (en) * 2007-11-28 2009-06-10 日电(中国)有限公司 Method and system for auto establishing hierarchy between information objects on network
CN101625685A (en) * 2008-07-08 2010-01-13 鈊象电子股份有限公司 System and method for processing data with on-line data and webpage data
CN102073706A (en) * 2010-12-30 2011-05-25 北京锐安科技有限公司 Combined application method of distributed file storage system and relation database
US20110313844A1 (en) * 2010-06-17 2011-12-22 Microsoft Corporation Real-time-ready behavioral targeting in a large-scale advertisement system
US20140101186A1 (en) * 2012-10-08 2014-04-10 Linkedln Corporation Methods and systems for identifying similar schools
CN103902542A (en) * 2012-12-25 2014-07-02 百度在线网络技术(北京)有限公司 Operating and maintaining method and system of database in testing environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101452462A (en) * 2007-11-28 2009-06-10 日电(中国)有限公司 Method and system for auto establishing hierarchy between information objects on network
CN101625685A (en) * 2008-07-08 2010-01-13 鈊象电子股份有限公司 System and method for processing data with on-line data and webpage data
US20110313844A1 (en) * 2010-06-17 2011-12-22 Microsoft Corporation Real-time-ready behavioral targeting in a large-scale advertisement system
CN102073706A (en) * 2010-12-30 2011-05-25 北京锐安科技有限公司 Combined application method of distributed file storage system and relation database
US20140101186A1 (en) * 2012-10-08 2014-04-10 Linkedln Corporation Methods and systems for identifying similar schools
CN103902542A (en) * 2012-12-25 2014-07-02 百度在线网络技术(北京)有限公司 Operating and maintaining method and system of database in testing environment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967204A (en) * 2017-11-21 2018-04-27 百度在线网络技术(北京)有限公司 Line pushes method, system and the terminal device surveyed
CN107967204B (en) * 2017-11-21 2020-12-25 百度在线网络技术(北京)有限公司 Method and system for measuring line down pressure and terminal equipment
CN108427638A (en) * 2018-01-19 2018-08-21 口碑(上海)信息技术有限公司 Region network of relation marketing activity test method and device
CN111290948A (en) * 2020-01-19 2020-06-16 腾讯科技(深圳)有限公司 Test data acquisition method and device, computer equipment and readable storage medium
CN112989137A (en) * 2021-04-21 2021-06-18 军事科学院系统工程研究院网络信息研究所 Entity relationship analysis method for complex network information system construction

Similar Documents

Publication Publication Date Title
US10387292B2 (en) Determining application test results using screenshot metadata
CN105426308A (en) Offline data construction method and device
CN106657192B (en) Method and equipment for presenting service calling information
CN111125555B (en) Enterprise information acquisition method and device
CN105183882A (en) Application software recommending method and device
CN108170832B (en) Monitoring system and monitoring method for heterogeneous database of industrial big data
EP3828722A2 (en) Method and apparatus of constructing a fused relationship network, electronic device and medium
EP3179370A1 (en) Webpage automatic test method and apparatus
CN112905441A (en) Test case generation method, test method, device and equipment
CN105446818B (en) A kind of method of business processing, relevant apparatus and system
KR20210040310A (en) Method, apparatus, device and storage medium for map retrieval test
CN103152212B (en) A kind of alarm correlation analysis method, device and network management system
CN104615737A (en) Search box based computing method and device
CN104808995A (en) Method and device for storing application contents over applications
CN110059122B (en) Wild animal resource data storage method based on cloud Web
CN116225690A (en) Memory multidimensional database calculation load balancing method and system based on docker
CN105224394A (en) A kind of sorting technique of application program and device
CN105843826A (en) Search method and device
CN113255769A (en) Compound attribute prediction model training method and compound attribute prediction method
CN114115908A (en) Instruction set generation method, program analysis method, device and storage medium
CN113869989A (en) Information processing method and device
CN113255770A (en) Compound attribute prediction model training method and compound attribute prediction method
CN113691403A (en) Topological node configuration method, related device and computer program product
CN113051510A (en) Interactive processing method and device, front-end equipment, back-end equipment and storage medium
CN109697167A (en) Management method, system, electronic equipment and the storage medium of test variable

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160323