CN110928527A - Sorting method and device - Google Patents

Sorting method and device Download PDF

Info

Publication number
CN110928527A
CN110928527A CN201811098445.2A CN201811098445A CN110928527A CN 110928527 A CN110928527 A CN 110928527A CN 201811098445 A CN201811098445 A CN 201811098445A CN 110928527 A CN110928527 A CN 110928527A
Authority
CN
China
Prior art keywords
heat value
schema
target schema
target
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811098445.2A
Other languages
Chinese (zh)
Other versions
CN110928527B (en
Inventor
何熠皓
方朝增
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811098445.2A priority Critical patent/CN110928527B/en
Publication of CN110928527A publication Critical patent/CN110928527A/en
Application granted granted Critical
Publication of CN110928527B publication Critical patent/CN110928527B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Investigating Or Analyzing Materials Using Thermal Means (AREA)

Abstract

The invention discloses a sorting method and a sorting device, and relates to the technical field of data processing. The method and the device mainly solve the problem that the ranking mechanism in the prior art cannot sort the schemas according to the useful degree. The method of the invention comprises the following steps: acquiring a target Schema; calculating a basic heat value of each target Schema, wherein the basic heat value is the number of times that the target Schema is directly applied; calculating a contribution heat value of each target Schema, wherein the contribution heat value is the number of times the target Schema is referred; and sequencing the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema. The method can be widely applied to scenes for sequencing schemas.

Description

Sorting method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a sorting method and apparatus.
Background
The web crawler is a program or script for automatically capturing web information according to a certain rule, and can quickly and accurately acquire information required by a user from a web page. Before crawling a web page using a crawler, a user needs to create a crawling framework (Schema). However, since it takes much time and effort to create a complete Schema, many users may choose a Schema-based sharing mechanism to use schemas shared by other users.
When the schemas shared by other users are displayed, the schemas are sorted and displayed according to a ranking mechanism. In the ranking mechanism in the prior art, shared schemas are ranked according to parameters such as click rate and download rate, and although some schemas have low click rate or download rate, the click rate or download rate of other schemas referring to the schemas is very high, which actually shows that the schemas have wide application range and high useful degree. However, the ranking of the schemas in the overall ranking is very low, and the usefulness of the schemas cannot be reflected.
Disclosure of Invention
In view of this, the sorting method and apparatus provided by the present invention mainly aim to solve the problem that the ranking mechanism in the prior art cannot sort schemas according to the degree of usefulness.
In order to solve the above problems, the present invention mainly provides the following technical solutions:
in a first aspect, the present invention provides a sorting method, including:
acquiring a target crawling architecture Schema;
calculating a basic heat value of each target Schema, wherein the basic heat value is the number of times that the target Schema is directly applied;
calculating a contribution heat value of each target Schema, wherein the contribution heat value is the number of times the target Schema is referred;
and sequencing the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
Optionally, calculating the contribution heat value of each target Schema includes:
acquiring an inherited Schema of each target Schema, wherein the inherited Schema is a Schema for directly or indirectly guiding the target Schema;
calculating a base heat value and a contribution heat value of each inheritance Schema;
and calculating the contribution heat value of each target Schema according to the basic heat value and the contribution heat value of all the inheritance schemas of each target Schema.
Optionally, sorting the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema, including:
superposing and calculating the basic heat value of each target Schema and the contribution heat value of each target Schema;
and sequencing the target Schema according to the calculation result.
Optionally, calculating a base calorific value of each target Schema includes:
acquiring the number of tasks created according to each target Schema and the number of account numbers of the created tasks;
and calculating the basic heat value of each target Schema according to the task number and the account number.
Optionally, calculating a basic heat value of each target Schema according to the number of tasks and the number of account numbers includes:
performing evolution calculation on the task quantity;
and multiplying the calculated numerical value and the number of the account numbers to obtain a basic heat value of each target Schema.
Optionally, before calculating the basic heat value of each target Schema according to the number of tasks and the number of account numbers, the method further includes:
respectively setting a weight corresponding to each time period, wherein the time period is obtained by dividing a time interval between the earliest time for creating the task or the account and the latest time for creating the task or the account according to a preset time interval dividing method;
calculating a basic heat value of each target Schema according to the number of tasks and the number of account numbers, including:
calculating a basic heat value of each target Schema in a corresponding time period according to the number of tasks and the number of accounts in each time period;
carrying out weighted calculation on the basic heat value of each target Schema in each time period according to the corresponding weight;
and performing superposition calculation on the calculated basic heat values of all the time periods to obtain the basic heat value of the target Schema.
In a second aspect, the present invention also provides a sorting apparatus, comprising:
the acquisition unit is used for acquiring a target crawling architecture Schema;
the first calculation unit is used for calculating a basic heat value of each target Schema, and the basic heat value is the number of times that the target Schema is directly applied;
a second calculating unit, configured to calculate a contribution heat value of each target Schema, where the contribution heat value is the number of times that the target Schema is referred to;
and the ordering unit is used for ordering the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
Optionally, the second calculating unit includes:
the acquisition module is used for acquiring the inherited Schema of each target Schema, wherein the inherited Schema is the Schema which directly or indirectly guides the target Schema;
the calculation module is used for calculating a basic heat value and a contribution heat value of each inheritance Schema;
the calculation module is further configured to calculate the contribution heat value of each target Schema according to the basic heat value and the contribution heat value of all the inheritance schemas.
Optionally, the sorting unit includes:
the calculation module is used for carrying out superposition calculation on the basic heat value and the contribution heat value of each target Schema;
and the sequencing module is used for sequencing the target Schema according to the calculation result.
Optionally, the first computing unit includes:
the acquisition module is used for acquiring the number of tasks created according to each target Schema and the number of account numbers of the created tasks;
and the calculation module is used for calculating the basic heat value of each target Schema according to the task number and the account number.
Optionally, the computing module of the first computing unit is further configured to perform an evolution computation on the number of tasks; and the calculation module is also used for multiplying the calculated numerical value and the number of the account number to obtain a basic heat value of each target Schema.
Optionally, the first computing unit further includes:
a setting module, configured to set a weight corresponding to each time period before calculating a basic heat value of each target Schema according to the number of tasks and the number of accounts, where the time period is obtained by dividing a time interval between a time when the task or the account is created at the earliest and a time when the task or the account is created at the latest according to a preset time division method; (ii) a
The calculation module of the first calculation unit is further configured to calculate a basic heat value of each target Schema in a corresponding time period according to the number of tasks and the number of accounts in each time period; the system is also used for carrying out weighted calculation on the basic heat value of each target Schema in each time period according to the corresponding weight; and the basic heat value of the target Schema is obtained by performing superposition calculation on the calculated basic heat values of all the time periods.
In a third aspect, to achieve the above object, the present invention further provides a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the sorting method according to the first aspect.
In a fourth aspect, to achieve the above object, the present invention further provides a processor, where the processor is configured to execute a program, where the program executes the sorting method according to the first aspect.
By the technical scheme, the technical scheme provided by the invention at least has the following advantages:
the sorting method and the sorting device provided by the invention are based on the influence factor capable of truly reflecting the useful degree of one Schema, namely the basic heat value of the Schema is obtained according to the times of directly applying the Schema, the contribution heat value of the Schema is obtained according to the times of quoting the Schema, and then the Schema is sorted according to the basic heat value and the contribution heat value. The sorting mode comprehensively considers the number of times of directly using the shared Schema and the number of times of being referred, and the Schema can be sorted according to the real useful degree.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating a sorting method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of another sorting method provided by an embodiment of the invention;
FIG. 3 is a block diagram of a sorting apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of another sorting apparatus provided in the embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The more times a Schema is applied, the wider the application range and the higher the degree of usefulness. Therefore, the heat value of the target Schema needs to be calculated according to the number of times the target Schema is applied. The times of the target Schema being applied are divided into times of being directly applied and times of being quoted, the target Schema being directly applied means that a user directly uses a target Schema shared by other users to crawl a webpage, the target Schema is quoted and divided into direct quote and indirect quote, the target Schema being directly quoted means that the user establishes a Schema by himself, and the target Schema shared by other users is quoted in the Schema established by himself (or a part of the target Schema shared by other users is quoted). The indirect reference of the target Schema refers to that the user establishes the Schema by himself and references other schemas (or parts of other schemas) in the Schema established by himself, and the target Schema is referenced in the other schemas. The number of times of direct application represents the heat brought by the target Schema to the target Schema itself, and the number of times of indirect application represents the heat brought by other schemas which refer to the target Schema.
Referring to fig. 1, an embodiment of the present invention provides a sorting method, which mainly includes:
101. and acquiring a target Schema.
And acquiring all schemas needing to be sorted to a useful degree as target schemas. For example, when a user inputs keywords to search schemas shared by other users, all schemas in the search results obtained by the search engine are used as target schemas. The keywords comprise names, labels, descriptions, field names, URLs needing to be crawled and configured with rules and the like of schemas, and the keywords are used as retrieval ranges to perform text matching retrieval.
102. A base heat value for each target Schema is calculated.
The base heat value of each Schema is calculated according to the number of times the Schema is directly applied. Specifically, the heat or influence generated when the Schema is directly applied is determined by two values, one is the number of tasks created by the Schema, and the other is the number of accounts (i.e., the number of users) for creating the tasks by the Schema. The number of the created tasks reflects the frequency of crawling data by a Schema, reflects the importance degree of the tasks created by the Schema, and further reflects the created value of the tasks. The number of the account numbers for creating the tasks represents the applicable scope of a Schema, and reflects how many items actually use the Schema. Thus, the number of tasks created by a target Schema and the number of account numbers to create the tasks may be used to calculate a base heat value for the target Schema.
103. The contribution heat value of each target Schema is calculated.
Because a reference mechanism exists when the Schema is used, namely the shared Schema can be referred by other schemas besides being directly used and can be used as a part of other schemas; therefore, although some schemas are not used for creating tasks per se or fewer users using the schemas to create tasks, other schemas referring to the schemas may be used for creating a large number of tasks or used by a large number of users, and this reflects the degree of usefulness of the schemas, so that the heat value generated by other schemas referring to the schemas needs to be superimposed on the schemas as the contribution heat value of the schemas. Specifically, when calculating the contribution heat value of a target Schema, the number of times that all other schemas referring to the target Schema are directly applied and the number of times that all other schemas are indirectly applied are superposed together to serve as the contribution heat value of the target Schema.
104. And sorting the target schemas according to the basic heat value of the target schemas and the contribution heat value of the target schemas.
And superposing the basic heat value and the contribution heat value according to a target Schema to obtain an adjusted heat value of the target Schema, wherein the adjusted heat value can reflect the actual heat of the target Schema. After the adjustment heat values of all the target schemas are obtained through calculation, all the target schemas are sorted according to the adjustment heat values, so that the target schemas with the highest real heat, namely the highest useful degree, can be displayed at the top end, and a user can conveniently obtain the schemas with the highest useful degree according to the sorting.
The sorting method provided by the embodiment of the invention is based on the influence factor capable of truly reflecting the useful degree of one Schema, namely, the basic heat value of the Schema is obtained according to the times of directly applying the Schema, the contribution heat value of the Schema is obtained according to the times of quoting the Schema, and then the Schema is sorted according to the basic heat value and the contribution heat value. The sorting mode comprehensively considers the number of times of directly using the shared Schema and the number of times of being referred, and the Schema can be sorted according to the real useful degree.
Based on the sorting method shown in fig. 1, another sorting method is further provided in another embodiment of the present invention, which is shown with reference to fig. 2 and mainly includes:
201. and acquiring a target Schema.
The implementation manner of step 201 is the same as that of step 101, and is not described herein again.
202. And acquiring the number of tasks created according to each target Schema and the number of account numbers of the created tasks.
Because the basic heat value of the Schema is calculated by the number of created tasks and the number of account numbers for creating the tasks, the number of tasks created according to the Schema and the number of account numbers for creating the tasks need to be acquired before calculating the basic heat value of a target Schema.
203. And respectively setting the weight corresponding to each time period.
The time period is obtained by dividing a time interval between the earliest time of creating the task or the account and the latest time of creating the task or the account according to a preset time period dividing method.
Since the heat of a Schema has a time effect, when a Schema is no longer used by any task after a period of time, its heat will gradually drop to a lowest point. Therefore, the heat value generated in each time period needs to be distinguished, and the heat generated in the time period far away from the current time is subjected to weight reduction processing, so that the heat value of the Schema is decreased along with the time. When distinguishing the heat value of each time period of a target Schema, the weight corresponding to each different time period needs to be set first, and specifically, the weight of each time period may be the same, or the weight corresponding to a part of the time periods may be different from the weight corresponding to other time periods, or the weights corresponding to each time period are all different. For example, with 3 months as a distinguishing boundary, two time periods T1 and T2 are set, where T1 is within the first three months of the current time, and T2 is three months before, so as to subsequently acquire the number of tasks created in the time period T1 and the number of accounts for creating the tasks, and the number of tasks created in the time period T2 and the number of accounts for creating the tasks, respectively.
Further, a weight may be set for each time period in advance, and after the number of tasks and the number of accounts are obtained, a weight may be set for each time period according to actual needs.
204. And calculating a basic heat value of each target Schema according to the number of tasks and the number of account numbers.
The step is specifically to calculate a basic heat value of each target Schema in a corresponding time period according to the number of tasks and the number of accounts in each time period.
The specific steps of calculating the base calorific value of each target Schema at each time period are as follows:
(1) and performing evolution calculation on the number of tasks created in a preset time period.
In terms of importance, the number of creating tasks cannot intuitively embody that the Schema has wide applicability, namely, is useful for most crawling tasks. For example, a task created according to a Schema can be automatically executed by a program, and the setting program automatically creates the same task according to the Schema every 1 hour to perform web page crawling to obtain data, in this case, although the number of created tasks is large, all the created tasks are the same, that is, the scope of applicability of the Schema is substantially small, and the degree of usefulness is low. Therefore, the creation task brings the popularity of the Schema and needs to perform a marginal profit decrement calculation so as to avoid the Schema which is smaller in application range and less in useful degree and is arranged at the front position although the Schema is used frequently. The account number of the Schema creation task represents how many different users use the Schema, and the application range and the useful degree of the Schema can be really reflected, so that the acquired account number is not processed.
Specifically, after the number of created tasks in each preset time period is obtained, the number of the tasks may be respectively calculated to reduce the influence of the number of the tasks on the heat value of the Schema. The root index of the evolution calculation is set in advance, for example, the root index may be set to 2, that is, the number of tasks is quadratically evolved. After calculation, 10000 tasks created by 1 account and 100 tasks created by 10 accounts respectively contribute equally to the basic heat value of the same Schema.
(2) And multiplying the calculated value by the number of the account numbers of the created tasks in the preset time period to obtain the basic heat value of each target Schema.
Because the dimensionalities of the two numerical values, namely the task number and the account number, are different, numerical value addition calculation cannot be directly carried out to obtain a result, and accurate data results can be obtained only by multiplying the data of the two dimensionalities. For example, the base calorific value of a target Schema for a time period T is:
Figure BDA0001806093510000091
(3) and carrying out weighted calculation on the basic heat value of each time period according to the corresponding weight.
After the basic heat of each time period of a target Schema is obtained through calculation according to the steps, the basic heat value of each time period is subjected to weighted calculation according to the corresponding weight of each time period. For example, the weight value for time period T1 is 0.75, and the weight value for time period T2 is 0.25, i.e. the weight of the base calorific value generated within three months is 0.75, calculated as: basic heat valueT10.75, the weight of the three previously generated base heat value is 0.25, calculated as: basic heat valueT2*0.25。
(4) And performing superposition calculation on the calculated basic heat value of each target Schema in all the time periods to obtain the basic heat value of the target Schema.
And superposing the basic heat value weighted and calculated in each time period to obtain the basic heat value of the target Schema. For example, the base calorific value S of one target Schema is the base calorific valueT10.75+ base heat valueT2*0.25。
205. And acquiring the inheritance Schema of each target Schema.
The present embodiment sets the Schema directly or indirectly referring to the target Schema to the inheritance Schema. And searching the inheritance Schema directly referring to the target Schema, then searching the new inheritance Schema directly referring to the target Schema according to the inheritance Schema, then searching the new inheritance Schema directly referring to the target Schema according to the new inheritance Schema, and repeating the steps to search all the inheritance schemas directly and indirectly referring to the target Schema. For example, the object Schema is Schema 0, schemas directly referring to the object Schema include Schema 1 and Schema 2, schemas directly referring to Schema 1 (i.e., indirectly referring to the object Schema) include Schema 3, schemas directly referring to Schema 3 (i.e., indirectly referring to the object Schema) include Schema 4; the inherited schemas of the finally obtained object Sch0 include Sch1, Sch2, Sch3 and Sch 4.
206. And calculating the contribution heat value of each target Schema according to the basic heat value and the contribution heat value of all the inheritance schemas.
After all inherited schemas of a target Schema are obtained, calculating a basic heat value of each inherited Schema, then obtaining a coefficient to be multiplied by the basic heat value of each inherited Schema according to the reference relation between the target Schema and each inherited Schema, and then superposing the values obtained after multiplication to finally obtain the contribution heat value of the target Schema. For example, when the preset coefficient is w, in calculating the contribution heat value of Sch0, the basic heat values of Sch1, Sch2, Sch3 and Sch4, S1, S2, S3 and S4, respectively, are first calculated; then calculating the contribution heat value C3 of Sch3 to S4 w, and calculating the adjustment heat value H3 of Sch3 to S3+ C3; then, the heat contribution value C1 ═ H3 × w of Sch1 was calculated, and then Sch1 was calculatedH1 ═ S1+ C1; the heat contribution value C0 of Sch0 was then calculated (H1+ S2) w. Wherein C0 ═ (S1+ (S3+ S4 ═ w + S2) ═ w ═ S1 × w + S2 ═ w + S3 ═ w2+S4*w3Σ C '× w, C' is the base calorific value of the Schema cited in Sch 0. Therefore, the inheritance Schema determines an index of a power according to the number of layers of the inheritance Schema from the target Schema in the reference relationship, then performs power calculation on a preset coefficient, then multiplies the basic heat value of the inheritance Schema, and finally superposes the calculation results of all the inheritance schemas to obtain the contribution heat value corresponding to the target Schema.
207. And performing superposition calculation on the basic heat value and the contribution heat value of each target Schema.
For example, after the heat contribution value C0 of Sch0 is calculated, the base heat contribution value S0 and the heat contribution value C0 of Sch0 are superimposed to obtain the adjusted heat contribution value H0 of Sch0, which is S0+ C0. By analogy, an adjusted heat value of each target Schema is calculated.
208. And sequencing the target Schema according to the calculation result.
And sorting the calculated adjustment heat value from high to low, and sorting the corresponding target schemas according to the sequence. For example, when a user searches for schemas shared by other users, after obtaining the search results, the search engine calculates the basic heat value and the contribution heat value of each target Schema in the search results one by one, then obtains the adjusted heat value of each target Schema, finally sorts the corresponding target schemas in the search results according to the adjusted heat values from large to small, and displays the sorted search results to the user.
According to the ordering method provided by the embodiment of the invention, the contribution heat value of the target Schema is calculated according to the basic heat value and the contribution heat value of the inheritance Schema which directly or indirectly refers to the target Schema. And calculating the basic heat value of the Schema according to the number of tasks and the number of account numbers for determining the useful degree of the Schema so as to ensure the accuracy of calculation of the basic heat value of the Schema, and calculating the basic heat value of the Schema in different time periods so as to meet the time effect of the heat degree of the Schema. And the number of tasks is calculated in an evolution mode during calculation so as to weaken the heat value of the Schema with high use frequency and narrow application range and further enable the calculation result to be more approximate to the actual useful degree of the Schema.
Further, as an implementation of the method in the foregoing embodiment, a further embodiment of the present invention further provides a sorting apparatus. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method.
Referring to fig. 3, the sorting apparatus includes:
the obtaining unit 31 is configured to obtain a target Schema.
A first calculating unit 32, configured to calculate a base heat value of each target Schema, where the base heat value is a number of times that the target Schema is directly applied.
A second calculating unit 33, configured to calculate a contribution heat value of each target Schema, where the contribution heat value is the number of times the target Schema is referred to.
And the sorting unit 34 is configured to sort the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
Alternatively, as shown in fig. 4, the second calculation unit 33 includes:
the obtaining module 331 is configured to obtain an inherited Schema of each target Schema, where the inherited Schema is a Schema directly or indirectly referring to the target Schema.
A calculating module 332, configured to calculate a base heat value and a contribution heat value of each inheritance Schema;
the calculating module 332 is further configured to calculate the contribution heat value of each target Schema according to the basic heat value and the contribution heat value of all the inheritance schemas.
Optionally, as shown in fig. 4, the sorting unit 34 includes:
the calculating module 341 is configured to perform superposition calculation on the basic heat value and the contribution heat value of each target Schema.
And the sorting module 342 is configured to sort the target Schema according to the calculation result.
Alternatively, as shown in fig. 4, the first calculation unit 32 includes:
the obtaining module 321 is configured to obtain the number of tasks created according to each target Schema and the number of account numbers of the created tasks.
And the calculating module 322 is configured to calculate a basic heat value of each target Schema according to the number of tasks and the number of account numbers.
Optionally, the calculating module 322 is further configured to perform an evolution calculation on the number of tasks; and the calculation module is also used for multiplying the calculated numerical value and the number of the account number to obtain a basic heat value of each target Schema.
Optionally, as shown in fig. 4, the first calculating unit 32 further includes:
a setting module 323, configured to set a weight corresponding to each time period before calculating a basic heat value of each target Schema according to the number of tasks and the number of accounts, where the time period is obtained by dividing a time interval between a time when the task or the account is created at the earliest and a time when the task or the account is created at the latest according to a preset time division method.
The calculating module 322 is further configured to calculate a basic heat value of each target Schema in a corresponding time period according to the number of tasks and the number of accounts in each time period; the system is also used for carrying out weighted calculation on the basic heat value of each target Schema in each time period according to the corresponding weight; and the basic heat value of the target Schema is obtained by performing superposition calculation on the calculated basic heat values of all the time periods.
The sorting device provided by the embodiment of the invention is based on the influence factor capable of truly reflecting the useful degree of one Schema, namely, the first calculating unit obtains the basic heat value of the Schema according to the number of times that the Schema is directly applied, the second calculating unit obtains the contribution heat value of the Schema according to the number of times that the Schema is quoted, and then the sorting unit sorts the corresponding Schema according to the basic heat value and the contribution heat value. The sorting mode comprehensively considers the number of times of directly using the shared Schema and the number of times of being referred, and the Schema can be sorted according to the real useful degree. And the second calculating unit is used for calculating the contribution heat value of the target Schema according to the basic heat value and the contribution heat value of the inheritance Schema which directly or indirectly refers to the target Schema. The first calculating unit is used for calculating the basic heat value of the Schema according to the number of tasks and the number of account numbers for determining the useful degree of the Schema so as to ensure the accuracy of calculation of the basic heat value of the Schema. The first calculation unit is also capable of calculating the base heat value of the Schema in different time periods so that the calculation result conforms to the time effect of the heat of the Schema. And the first calculation unit also performs an extraction calculation on the task quantity so as to weaken the heat value of the Schema which is frequently used but has a narrow application range. Further making the calculation result more likely to be useful for Schema practice.
The sorting device comprises a processor and a memory, the acquisition unit, the first calculation unit, the second calculation unit, the sorting unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem that schemas cannot be ordered according to the useful degree in the prior art is solved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, where the program, when executed by a processor, implements the following sorting method:
and acquiring a target Schema.
And calculating a basic heat value of each target Schema, wherein the basic heat value is the number of times the target Schema is directly applied.
And calculating a contribution heat value of each target Schema, wherein the contribution heat value is the number of times the target Schema is referred to.
And sequencing the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes the following sorting method during running:
and acquiring a target Schema.
And calculating a basic heat value of each target Schema, wherein the basic heat value is the number of times the target Schema is directly applied.
And calculating a contribution heat value of each target Schema, wherein the contribution heat value is the number of times the target Schema is referred to.
And sequencing the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps:
acquiring a target Schema;
calculating a basic heat value of each target Schema, wherein the basic heat value is the number of times that the target Schema is directly applied;
calculating a contribution heat value of each target Schema, wherein the contribution heat value is the number of times the target Schema is referred;
and sequencing the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
Optionally, calculating the contribution heat value of each target Schema includes:
acquiring an inherited Schema of each target Schema, wherein the inherited Schema is a Schema which directly or indirectly refers to the target Schema;
calculating a base heat value and a contribution heat value of each inheritance Schema;
and calculating the contribution heat value of each target Schema according to the basic heat value and the contribution heat value of all the inheritance schemas.
Optionally, sorting the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema, including:
performing superposition calculation on the basic heat value and the contribution heat value of each target Schema;
and sequencing the target Schema according to the calculation result.
Optionally, calculating a base calorific value of each target Schema includes:
acquiring the number of tasks created according to each target Schema and the number of account numbers of the created tasks;
and calculating the basic heat value of each target Schema according to the task number and the account number.
Optionally, calculating a basic heat value of each target Schema according to the number of tasks and the number of account numbers includes:
performing evolution calculation on the task quantity according to a preset root index;
and multiplying the calculated numerical value and the number of the account numbers to obtain a basic heat value of each target Schema.
Optionally, before calculating the basic heat value of each target Schema according to the number of tasks and the number of account numbers, the method further includes:
respectively setting weights corresponding to time periods, wherein the time periods are obtained by dividing time intervals between the earliest time for creating the task or the account and the latest time for creating the task or the account according to a preset time period dividing method;
calculating a basic heat value of each target Schema according to the number of tasks and the number of account numbers, including:
calculating a basic heat value of each target Schema in a corresponding time period according to the number of tasks and the number of accounts in each time period;
carrying out weighted calculation on the basic heat value of each target Schema in each time period according to the corresponding weight;
and performing superposition calculation on the calculated basic heat values of all the time periods to obtain the basic heat value of the target Schema.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform program code for initializing the following method steps when executed on a data processing device:
and acquiring a target Schema.
And calculating a basic heat value of each target Schema, wherein the basic heat value is the number of times the target Schema is directly applied.
And calculating a contribution heat value of each target Schema, wherein the contribution heat value is the number of times the target Schema is referred to.
And sequencing the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of sorting, the method comprising:
acquiring a target Schema;
calculating a basic heat value of each target Schema, wherein the basic heat value is the number of times that the target Schema is directly applied;
calculating a contribution heat value of each target Schema, wherein the contribution heat value is the number of times the target Schema is referred;
and sequencing the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
2. The method of claim 1, wherein calculating the contribution heat value for each target Schema comprises:
acquiring an inherited Schema of each target Schema, wherein the inherited Schema is a Schema which directly or indirectly refers to the target Schema;
calculating a base heat value and a contribution heat value of each inheritance Schema;
and calculating the contribution heat value of each target Schema according to the basic heat value and the contribution heat value of all the inheritance schemas of each target Schema.
3. The method according to claim 2, wherein sorting the target Schema according to the base heat value of the target Schema and the contribution heat value of the target Schema comprises:
superposing and calculating the basic heat value of each target Schema and the contribution heat value of each target Schema;
and sequencing the target Schema according to the calculation result.
4. The method of claim 1 or 2, wherein calculating the base calorific value for each target Schema comprises:
acquiring the number of tasks created according to each target Schema and the number of account numbers of the created tasks;
and calculating the basic heat value of each target Schema according to the task number and the account number.
5. The method of claim 4, wherein calculating the base heat value for each destination Schema based on the number of tasks and the number of account numbers comprises:
performing evolution calculation on the task quantity;
and multiplying the calculated numerical value and the number of the account numbers to obtain a basic heat value of each target Schema.
6. The method of claim 4, wherein prior to calculating the base heat value for each destination Schema based on the number of tasks and the number of account numbers, the method further comprises:
respectively setting a weight corresponding to each time period, wherein the time period is obtained by dividing a time interval between the earliest time for creating the task or the account and the latest time for creating the task or the account according to a preset time interval dividing method;
calculating a basic heat value of each target Schema according to the number of tasks and the number of account numbers, including:
calculating a basic heat value of each target Schema in a corresponding time period according to the number of tasks and the number of accounts in each time period;
carrying out weighted calculation on the basic heat value of each target Schema in each time period according to the corresponding weight;
and performing superposition calculation on the calculated basic heat value of each target Schema in all the time periods to obtain the basic heat value of the target Schema.
7. A sequencing apparatus, the apparatus comprising:
the acquisition unit is used for acquiring a target Schema;
the first calculation unit is used for calculating a basic heat value of each target Schema, and the basic heat value is the number of times that the target Schema is directly applied;
a second calculating unit, configured to calculate a contribution heat value of each target Schema, where the contribution heat value is the number of times that the target Schema is referred to;
and the ordering unit is used for ordering the target Schema according to the basic heat value of the target Schema and the contribution heat value of the target Schema.
8. The apparatus of claim 7, wherein the second computing unit comprises:
the acquisition module is used for acquiring the inherited Schema of each target Schema, wherein the inherited Schema refers to the Schema of the target Schema directly or indirectly;
the calculation module is used for calculating a basic heat value and a contribution heat value of each inheritance Schema;
the calculation module is further configured to calculate a contribution heat value of each target Schema according to the basic heat value and the contribution heat value of all the inheritance schemas of each target Schema.
9. A storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus in which the storage medium is located to perform the sorting method according to any one of claims 1 to 6.
10. A processor configured to run a program, wherein the program when running performs the method of sorting of any one of claims 1 to 6.
CN201811098445.2A 2018-09-20 2018-09-20 Sequencing method and device Active CN110928527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811098445.2A CN110928527B (en) 2018-09-20 2018-09-20 Sequencing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811098445.2A CN110928527B (en) 2018-09-20 2018-09-20 Sequencing method and device

Publications (2)

Publication Number Publication Date
CN110928527A true CN110928527A (en) 2020-03-27
CN110928527B CN110928527B (en) 2023-05-09

Family

ID=69855377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811098445.2A Active CN110928527B (en) 2018-09-20 2018-09-20 Sequencing method and device

Country Status (1)

Country Link
CN (1) CN110928527B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732766A (en) * 2020-12-30 2021-04-30 绿盟科技集团股份有限公司 Data sorting method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050262039A1 (en) * 2004-05-20 2005-11-24 International Business Machines Corporation Method and system for analyzing unstructured text in data warehouse
US20100274813A1 (en) * 2009-04-23 2010-10-28 Microsoft Corporation Extensible framework for data import and export
US20110125732A1 (en) * 2009-11-25 2011-05-26 c/o Microsoft Corporation Internal ranking model representation schema
US20110137893A1 (en) * 2009-12-04 2011-06-09 Microsoft Corporation Custom ranking model schema
CN102129469A (en) * 2011-03-23 2011-07-20 华中科技大学 Virtual experiment-oriented unstructured data accessing method
CN103955538A (en) * 2014-05-19 2014-07-30 携程计算机技术(上海)有限公司 HBase data persistence and query methods and HBase system
CN107577752A (en) * 2017-08-31 2018-01-12 北京印刷学院 A kind of XML retrieval orderings processing system and method based on keyword

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050262039A1 (en) * 2004-05-20 2005-11-24 International Business Machines Corporation Method and system for analyzing unstructured text in data warehouse
US20100274813A1 (en) * 2009-04-23 2010-10-28 Microsoft Corporation Extensible framework for data import and export
US20110125732A1 (en) * 2009-11-25 2011-05-26 c/o Microsoft Corporation Internal ranking model representation schema
US20110137893A1 (en) * 2009-12-04 2011-06-09 Microsoft Corporation Custom ranking model schema
CN102129469A (en) * 2011-03-23 2011-07-20 华中科技大学 Virtual experiment-oriented unstructured data accessing method
CN103955538A (en) * 2014-05-19 2014-07-30 携程计算机技术(上海)有限公司 HBase data persistence and query methods and HBase system
CN107577752A (en) * 2017-08-31 2018-01-12 北京印刷学院 A kind of XML retrieval orderings processing system and method based on keyword

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732766A (en) * 2020-12-30 2021-04-30 绿盟科技集团股份有限公司 Data sorting method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110928527B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
JP6676167B2 (en) Information recommendation method and device
CN111506849B (en) Page generation method and device
US10102287B2 (en) System and method for graphically building weighted search queries
JP5984917B2 (en) Method and apparatus for providing suggested words
CN108829808B (en) Page personalized sorting method and device and electronic equipment
CN110532479A (en) A kind of information recommendation method, device and equipment
US20130339350A1 (en) Ranking Search Results Based on Click Through Rates
US20180308152A1 (en) Data Processing Method and Apparatus
JP2019512809A (en) Method and apparatus for time division recommendation for service target
CN105989004A (en) Information releasing pretreatment method and device
JP2015525418A (en) Search method and apparatus
CN111639255B (en) Recommendation method and device for search keywords, storage medium and electronic equipment
CN107423430B (en) Data processing method, device and computer readable storage medium
CN111061954B (en) Search result sorting method and device and storage medium
CN107391535A (en) The method and device of document is searched in document application
CN110928527B (en) Sequencing method and device
CN108733694B (en) Retrieval recommendation method and device
CN116680494A (en) Method and device for generating application recommendation page, storage medium and electronic equipment
CN108764021B (en) Cheating video identification method and device
CN114154064A (en) Commodity keyword optimization method and device
CN108304407B (en) Method and system for sequencing objects
CN111914165B (en) Target object recommendation method, device, equipment and storage medium
CN114677176A (en) Method and device for recommending interest content, electronic equipment and storage medium
EP2636014A2 (en) Product information search
CN110969019A (en) Method and device for disambiguating name

Legal Events

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