CN115544969B - Page comparison method, equipment and medium based on hypertext markup language - Google Patents

Page comparison method, equipment and medium based on hypertext markup language Download PDF

Info

Publication number
CN115544969B
CN115544969B CN202211504592.1A CN202211504592A CN115544969B CN 115544969 B CN115544969 B CN 115544969B CN 202211504592 A CN202211504592 A CN 202211504592A CN 115544969 B CN115544969 B CN 115544969B
Authority
CN
China
Prior art keywords
version page
page
data
version
interface module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211504592.1A
Other languages
Chinese (zh)
Other versions
CN115544969A (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.)
Mingdu Zhiyun Zhejiang Technology Co Ltd
Original Assignee
Mingdu Zhiyun Zhejiang 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 Mingdu Zhiyun Zhejiang Technology Co Ltd filed Critical Mingdu Zhiyun Zhejiang Technology Co Ltd
Priority to CN202211504592.1A priority Critical patent/CN115544969B/en
Publication of CN115544969A publication Critical patent/CN115544969A/en
Application granted granted Critical
Publication of CN115544969B publication Critical patent/CN115544969B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a page comparison method, equipment and medium based on a hypertext markup language, and relates to the technical field of computers. The method comprises the following steps: respectively acquiring a first electronic experiment record of a first version page and a second electronic experiment record of a second version page; respectively acquiring first cache data of each first interface module in a first version page and second cache data of each second interface module in a second version page according to the first electronic experiment record and the second electronic experiment record; determining the changed content of the second version page relative to the first version page according to the first cache data and the second cache data; according to the method and the device for comparing the version pages, the comparison page of the first version page and the second version page is obtained according to the change content, automatic comparison of the first version page and the second version page can be achieved without manual comparison, and comparison efficiency and comparison accuracy of the version pages can be effectively improved.

Description

Page comparison method, equipment and medium based on hypertext markup language
Technical Field
The present application relates to the field of computer technologies, and in particular, to a page comparison method, device, and medium based on hypertext markup language.
Background
HTML, known as hypertext markup language, is a markup language. The document format on the network can be unified through the labels, so that the scattered Internet resources are connected into a logic whole. HTML text is descriptive text consisting of HTML commands that can specify words, graphics, animations, sounds, tables, links, etc.
At present, when pages written by hypertext markup language are compared, the comparison is usually realized by a manual comparison mode.
It can be seen that, if there are many contents to be compared in a page, the existing page comparison method has a problem of low comparison efficiency.
Disclosure of Invention
An object of the present application is to provide a page comparison method, device and medium based on hypertext markup language, which can improve the comparison efficiency of version pages, in view of the above-mentioned deficiencies in the prior art.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, the present invention provides a page comparison method based on a hypertext markup language, including:
respectively acquiring a first electronic experiment record of a first version page and a second electronic experiment record of a second version page;
respectively acquiring first cache data of each first interface module in the first edition page and second cache data of each second interface module in the second edition page according to the first electronic experiment record and the second electronic experiment record;
determining the changed content of the second version page relative to the first version page according to the first cache data and the second cache data;
and acquiring a comparison page of the first version page and the second version page according to the change content.
In an optional embodiment, the obtaining a comparison page of the first version page and the second version page according to the changed content includes:
determining a change identifier of the changed content according to a change type of the changed content, wherein the change type of the changed content comprises at least one of the following types: adding, modifying and deleting;
and distinguishing and identifying the changed content in the comparison page according to the changed identification of the changed content.
In an optional embodiment, the obtaining, according to the first electronic experiment record, first cache data of each first interface module in the first version page includes:
acquiring interface addresses of all first interface modules in a first version page according to the first electronic experiment record;
acquiring electronic experiment records corresponding to the first interface modules according to the interface addresses of the first interface modules;
determining a key name of each first interface module according to an interface address of each first interface module and a first random number generation algorithm, and determining a key value of each first interface module according to an electronic experiment record corresponding to each first interface module;
and storing and obtaining first cache data of each first interface module in the first version page according to the key name of each first interface module and the key value of each first interface module.
In an optional embodiment, the determining, according to the first cache data and the second cache data, the changed content of the second version page relative to the first version page includes:
acquiring a plurality of target interface modules with the same interface module type in the first cache data and the second cache data;
and determining the changed content of the second version page relative to the first version page based on the cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type.
In an optional embodiment, the determining, based on cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type, changed content of the second version page relative to the first version page includes:
acquiring data association identification of each piece of data in cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type;
determining intersection data and cross set data of the second version page relative to the first version page according to the data association identification of each piece of data, wherein the intersection data is data of the second version page modified relative to the first version page; the cross set data is data which is newly added or deleted in the second version page relative to the first version page.
In an optional embodiment, the determining intersection data of the second version page relative to the first version page according to the data association identifier of each piece of data includes:
determining first target data and second target data with the same data association identification according to the data association identification of each piece of data;
and determining intersection data of the second version page relative to the first version page according to the first target data and the second target data.
In an optional embodiment, before the obtaining the first electronic experiment record of the first version page and the second electronic experiment record of the second version page respectively, the method further includes:
and in response to the selection operation of any two version pages in the plurality of version pages, respectively determining the first version page and the second version page, wherein each version page is obtained based on the update operation of the previous version page.
In a second aspect, the present invention provides a page comparison apparatus based on hypertext markup language, including:
the first obtaining module is used for respectively obtaining a first electronic experiment record of a first edition page and a second electronic experiment record of a second edition page;
the second obtaining module is used for respectively obtaining first cache data of each first interface module in the first edition page and second cache data of each second interface module in the second edition page according to the first electronic experiment record and the second electronic experiment record;
a determining module, configured to determine, according to the first cache data and the second cache data, changed content of the second version page relative to the first version page;
and the third obtaining module is used for obtaining a comparison page of the first version page and the second version page according to the change content.
In an optional embodiment, the third obtaining module is specifically configured to determine a change identifier of the changed content according to a change category of the changed content, where the change category of the changed content includes at least one of: adding, modifying and deleting;
and distinguishing and identifying the changed content in the comparison page according to the changed identification of the changed content.
In an optional embodiment, the second obtaining module is specifically configured to obtain, according to the first electronic experiment record, an interface address of each first interface module in a first version page;
acquiring electronic experiment records corresponding to the first interface modules according to the interface addresses of the first interface modules;
determining a key name of each first interface module according to an interface address of each first interface module and a first random number generation algorithm, and determining a key value of each first interface module according to an electronic experiment record corresponding to each first interface module;
and storing and obtaining first cache data of each first interface module in the first version page according to the key name of each first interface module and the key value of each first interface module.
In an optional embodiment, the determining module is specifically configured to obtain a plurality of target interface modules in the first cache data and the second cache data, where the types of the interface modules are the same;
and determining the change content of the second version page relative to the first version page based on the cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type.
In an optional embodiment, the determining module is specifically configured to obtain a data association identifier of each piece of data in the cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type;
determining intersection data and cross set data of the second version page relative to the first version page according to the data association identification of each piece of data, wherein the intersection data is data of the second version page modified relative to the first version page; and the cross set data is data which is newly added or deleted in the second version page relative to the first version page.
In an optional embodiment, the determining module is specifically configured to determine, according to the data association identifier of each piece of data, first target data and second target data having the same data association identifier;
and determining intersection data of the second version page relative to the first version page according to the first target data and the second target data.
In an optional implementation manner, the first obtaining module is further configured to respectively determine the first version page and the second version page in response to a selection operation on any two version pages in the multiple version pages, where each version page is obtained based on an update operation on a previous version page.
In a third aspect, the present invention provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the page comparison method based on the html according to any one of the preceding embodiments.
In a fourth aspect, the present invention provides a computer-readable storage medium, having a computer program stored thereon, where the computer program is executed by a processor to perform the steps of the page comparison method based on html according to any one of the preceding embodiments.
The beneficial effect of this application is:
the page comparison method, device and medium based on hypertext markup language provided by the embodiment of the application comprise the following steps: respectively acquiring a first electronic experiment record of a first version page and a second electronic experiment record of a second version page; respectively acquiring first cache data of each first interface module in a first version page and second cache data of each second interface module in a second version page according to the first electronic experiment record and the second electronic experiment record; determining the changed content of the second version page relative to the first version page according to the first cache data and the second cache data; according to the method and the device for comparing the version pages, the comparison page of the first version page and the second version page is obtained according to the change content, automatic comparison of the first version page and the second version page can be achieved without manual comparison, and comparison efficiency and comparison accuracy of the version pages can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart of a page comparison method based on hypertext markup language according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another page comparison method based on HTML according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a page comparison method based on hypertext markup language according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating another page comparison method based on HTML according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a page comparison method based on hypertext markup language according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating another page comparison method based on HTML according to an embodiment of the present application;
FIG. 7 is a functional block diagram of a page comparison apparatus based on HTML according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Fig. 1 is a schematic flowchart of a page comparison method based on a hypertext markup language according to an embodiment of the present application, where an execution subject of the method may be an electronic device with a data processing function, such as a computer, a server, and a processor, and as shown in fig. 1, the method may include:
s101, respectively obtaining a first electronic experiment record of a first version page and a second electronic experiment record of a second version page.
The first version page and the second version page can be generated based on hypertext markup language editing. Optionally, the second version page may be generated by updating the first version page, or the first version page may be generated by updating the second version page, and the application does not limit the sequential generation relationship between the first version page and the second version page.
Taking the first version page as an example for explanation, specifically when the first version page is generated, the first version page may be obtained by combining a plurality of first interface modules, where each first interface module may be used to edit different page modules, for example, in a certain chemical experiment application scenario, optionally, the first interface module corresponding to the first version page may include: the interface module comprises a basic information interface module, a basic sample and reagent information interface module, a detection report interface module, an experiment conclusion interface module, an experiment accessory summary interface module and the like, which are not limited herein and can be different according to actual application scenarios.
Based on the above description, optionally, the first Electronic experiment record of the first version page may be obtained by Electronic experiment record software, for example, the first Electronic experiment record of the first version page may be obtained by an Electronic Lab Notebook (ELN), and in some embodiments, the obtained first Electronic experiment record may include: the first interface module identifiers and the interface data corresponding to the first interface modules in the first version page are described by taking the basic information interface modules as an example, that is, the first electronic experiment record may include the basic information data corresponding to the basic information interface modules (for example, the basic information data may include an experiment number, experiment creation time, experiment participants, review time, review people, and the like, which is not limited herein).
It should be noted that the obtaining manner of the second electronic experiment record of the second version page may refer to the obtaining manner of the first electronic experiment record, and is not described herein again. Based on the above example, further explaining, if the second version page is generated by updating the first version page, optionally, the second interface module in the second version page may partially coincide with the first interface module, for example, the second interface module in the second version page may further include an instrument device interface module in addition to the plurality of first interface modules. Of course, it should be noted that the number and the type of each second interface module in the second version page are not limited thereto, and may be different according to the actual application scenario.
S102, respectively obtaining first cache data of each first interface module in the first version page and second cache data of each second interface module in the second version page according to the first electronic experiment record and the second electronic experiment record.
Based on the above description, taking the first electronic experiment record as an example for description, according to the obtained first electronic experiment record, the first cache data of each first interface module in the first version page may be extracted, and optionally, the first cache data of each first interface module may include: the interface address of each interface module, the identifier of each interface module, the interface data corresponding to each interface module, and the like, which are not limited herein.
The second cache data of each second interface module in the second version page may refer to the description of the first cache data, and is not described herein again.
S103, determining the changed content of the second version page relative to the first version page according to the first cache data and the second cache data.
It is understood that, by comparing the first cache data with the second cache data, the changed content of the second version page relative to the first version page may be determined, and optionally, the changed content may include: the identifier of each changed interface module, the interface data corresponding to each changed interface module, the change time, and the like are not limited herein.
And S104, acquiring a comparison page of the first version page and the second version page according to the changed content.
Based on the determined change content, a comparison page of the first version page and the second version page can be generated accordingly, wherein through the comparison page, a user can visually know the changed interface modules and the interface data corresponding to the changed interface modules.
In summary, an embodiment of the present application provides a page comparison method based on a hypertext markup language, including: respectively acquiring a first electronic experiment record of a first version page and a second electronic experiment record of a second version page; respectively acquiring first cache data of each first interface module in a first version page and second cache data of each second interface module in a second version page according to the first electronic experiment record and the second electronic experiment record; determining the changed content of the second version page relative to the first version page according to the first cache data and the second cache data; according to the method and the device for comparing the version pages, the comparison page of the first version page and the second version page is obtained according to the change content, automatic comparison of the first version page and the second version page can be achieved without manual comparison, and comparison efficiency and comparison accuracy of the version pages can be effectively improved.
Fig. 2 is a schematic flowchart of another page comparison method based on the hypertext markup language according to an embodiment of the present application. Optionally, as shown in fig. 2, the step of obtaining a comparison page between the first version page and the second version page according to the changed content may include:
s201, according to the change type of the change content, the change mark of the change content is determined.
Optionally, the electronic device may be pre-stored with a mapping relationship between a change category and a change identifier, where different change categories may correspond to different change identifiers, and the change identifier may specifically be a change style such as a highlighted change content, a bolded change content, and an italic change content, and is not limited herein. Of course, the mapping relationship may also be customized by the user according to the actual application scenario.
Based on the above description, after determining the changed content of the second version page relative to the first version page, the changed category may be further determined, that is, the changed content is caused by what kind of changing operation, and the changed category may include at least one of adding, modifying, and deleting. According to the change type and the mapping relation, a change identifier of the changed content can be further determined.
S202, distinguishing and identifying the changed content in the comparison page according to the changed identification of the changed content.
Based on the determined change identifier of the changed content, the changed content can be displayed in the comparison page in a differentiated manner, for example, the newly added changed content can be highlighted, the deleted changed content can be displayed with a deletion line, and the modified changed content can be displayed in an italic manner, so that different indications of the first version page and the second version page can be clearly known through the differentiated identifier, the version designer can conveniently check the defects and make up the omission, and the applicability of the method is improved.
Fig. 3 is a schematic flowchart of another page comparison method based on hypertext markup language according to an embodiment of the present application. Optionally, as shown in fig. 3, the step of obtaining the first cache data of each first interface module in the first version page according to the first electronic experiment record may include:
s301, according to the first electronic experiment record, obtaining the interface address of each first interface module in the first version page.
In some embodiments, the interface data corresponding to each first interface module may be stored in different locations according to the design requirement of each first interface module, for example, the first interface module in the first version page includes an interface module a and an interface module B, where the interface data corresponding to the interface module a is stored in the first storage location, and the interface data corresponding to the interface module B is stored in the second storage location.
Based on the above description, it can be seen that the interface address of each first interface module may indicate a storage address or a saving address of the interface data corresponding to each first interface module. Therefore, the interface address of each first interface module in the first version page can be obtained according to the first electronic experiment record.
S302, obtaining electronic experiment records corresponding to the first interface modules according to the interface addresses of the first interface modules.
After the interface address of each first interface module is obtained, the electronic experiment record corresponding to each first interface module can be further obtained from the first electronic experiment record. It will be appreciated that for different first interface modules, the corresponding electronic test records will also be different.
S303, determining the key name of each first interface module according to the interface address of each first interface module and a first random number generation algorithm, and determining the key value of each first interface module according to the electronic experiment record corresponding to each first interface module.
In some embodiments, considering that the interface address of each first interface module may be relatively long and inconvenient to cache, optionally, the first random number may be generated based on a first random number generation algorithm; and transforming the interface address of each first interface module according to the first random number to obtain the transformed interface address of each first interface module, and then, taking the transformed interface address of each first interface module as the key name of each first interface module.
Optionally, when the interface address of each first interface module is transformed according to the first random number, the first random number may be added to a preset position in the interface address, for example, may be added to the end of the interface address, and of course, the specific transformation manner is not limited thereto.
Further, based on the determined key name of each first interface module, the electronic experiment record corresponding to each first interface module may be used as the key value of each first interface module.
S304, storing and obtaining first cache data of each first interface module in the first version page according to the key name of each first interface module and the key value of each first interface module.
When the first cache data of each first interface module is saved, the key name of each first interface module and the key value of each first interface module can be saved correspondingly, so that the first cache data of each first interface module can be obtained. Certainly, the storage location is not limited in the application, local storage can be selected, or cloud storage can be selected, and the storage can be different according to actual application scenarios.
Based on the above description, optionally, for the first cache data, it may include an interface address of each first interface module, a key name of each first interface module, and a key value of each first interface module.
It should be noted that the process of acquiring the second cache data of each second interface module in the second version page may refer to the process of acquiring the first cache data, and is not described herein again. It should be noted that, for each second interface module, the generation manner of the key name of each second interface module is consistent with the generation manner of the key name of each first interface module, so that the comparison of the same type of interface modules can be performed in the later period.
In summary, it can be seen that, because the first cache data of each first interface module in the first version page can be flexibly generated according to different page structures in the first version page, and the second cache data of each second interface module in the second version page can be flexibly generated according to different page structures in the second version page, the method provided in the embodiment of the present application can be applied to a dynamically generated page, can implement accurate comparison, and has a wider application scope.
Fig. 4 is a flowchart illustrating another page comparison method based on the hypertext markup language according to an embodiment of the present application. Optionally, as shown in fig. 4, the step of determining, according to the first cache data and the second cache data, the changed content of the second version page relative to the first version page may include:
s401, a plurality of target interface modules with the same interface module type in the first cache data and the second cache data are obtained.
In some embodiments, for each first interface module, the interface address of each first interface module may indicate the interface module type of each first interface module, and therefore, the interface address of each first interface module in the first cache data and the interface address of each second interface module in the second cache data may be obtained, and according to the interface address of each first interface module and the interface address of each second interface module, a plurality of target interface modules with the same interface module type may be screened out.
It should be noted that, if the types of the interface modules of a certain first interface module and a certain second interface module are the same, it is indicated that the two module interfaces are the same interface module, for example, both of the two interface modules may be basic information interface modules.
S402, based on the cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type, determining the change content of the second version page relative to the first version page.
Based on the plurality of target interface modules with the same interface module type, the cache data corresponding to the plurality of target interface modules in the first cache data and the second cache data can be respectively obtained according to the first cache data and the second cache data, and accordingly, the change content of the second version page relative to the first version page can be determined through comparison.
Fig. 5 is a flowchart illustrating a page comparison method based on a hypertext markup language according to an embodiment of the present application. Optionally, as shown in fig. 5, the step of determining, based on the cache data corresponding to each target interface module in the multiple target interface modules with the same interface module type, the changed content of the second version page relative to the first version page may include:
s501, obtaining data association identification of each piece of data in cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type.
For each target interface module, first target cache data corresponding to each target interface module may be obtained from the first cache data, and a data association identifier of each piece of data may be obtained according to the first target cache data, where the data association identifier of each piece of data may represent a data source of the data. Optionally, a certain piece of data of the first target interface module in the second version page is originated from the second target interface module in the first version page, and then the data identifier of the certain piece of data of the first target interface module in the second version page should be consistent with the data identifier of the certain piece of data in the first version page; optionally, if a certain piece of data of the first target interface module in the second version page is newly added data, the data identifier of the piece of data may be generated according to a random algorithm.
For example, if a first piece of data in a certain target interface module in a first version page is newly added data, optionally, the data identifier of the first piece of data may be randomly generated according to a random algorithm, for example, the data identifier of the first piece of data N1 may be M1; if the second version page is newly added on the basis of the first version page, specifically, the added content is that a piece of data, for example, a second piece of data N2, is newly added in the target interface module, that is, the target interface module includes two pieces of data at this time, where it needs to be noted that, because the first piece of data N1 is from the first version page and the data is unchanged, the data identifier of the first piece of data N1 is still M1, and for the second piece of data N2, because it is newly added, optionally, the data identifier of the second piece of data N2 may be randomly generated according to a random algorithm, for example, the data identifier of the second piece of data N2 may be M2. Of course, the manner of generating the data association flag of each piece of data is not limited to this.
S502, according to the data association identification of each piece of data, intersection data and cross data of the second version page relative to the first version page are determined.
The intersection data is data of the second version page which is modified relative to the first version page; and the cross-set data is data which is newly added or deleted in the second version page relative to the first version page.
As can be seen from the above description, the data association identifier of each piece of data may represent a data source of the data, that is, the data association identifier of each piece of data may represent a data change relationship between a version page where the piece of data is located and other version pages. Therefore, according to the data association identification of each piece of data, the data of the second version page, which is modified relative to the first version page, and the data of the second version page, which is newly added or deleted relative to the first version page, can be further determined.
Fig. 6 is a flowchart illustrating another page comparison method based on the hypertext markup language according to an embodiment of the present application. Optionally, as shown in fig. 6, the step of determining intersection data of the second version page with respect to the first version page according to the data association identifier of each piece of data may include:
s601, according to the data association identification of each piece of data, determining first target data and second target data with the same data association identification.
S602, according to the first target data and the second target data, intersection data of the second version page relative to the first version page is determined.
After the data association identifier of each piece of data is obtained, first target data and second target data with the same data association identifier may be obtained, data difference between the second target data and the first target data is compared, and intersection data of the second version page relative to the first version page, that is, data modified in the second version page relative to the first version page, is determined according to the data difference.
It should be noted that, specifically, when cross set data of a second version page relative to a first version page is obtained, after intersection data is determined, data that is newly added or deleted in the second version page relative to the first version page may be determined according to data with different data association identifiers.
Optionally, before the first electronic experiment record of the first version page and the second electronic experiment record of the second version page are respectively obtained, the method further includes:
and responding to the selection operation of any two version pages in the multiple version pages, and respectively determining a first version page and a second version page, wherein each version page is obtained based on the update operation of the previous version page.
The first version page and the second version page can be determined by selecting from a plurality of version pages, the plurality of version pages can comprise an initial version page and a plurality of other version pages, and the plurality of other version pages can be generated on the basis of the initial version page.
Based on the description, optionally, the first version page may be an initial version page, and the second version page may be any one of multiple other version pages, and of course, the selection manner of the first version page and the second version page is not limited thereto.
In summary, by applying the embodiment of the application, the comparison between two version pages in a plurality of version pages can be arbitrarily selected, and the applicability of the method can be improved.
Fig. 7 is a functional module schematic diagram of a page comparison apparatus based on the html according to an embodiment of the present application, the basic principle and the generated technical effect of the apparatus are the same as those of the corresponding method embodiment, and for brief description, the corresponding contents in the method embodiment may be referred to for parts not mentioned in this embodiment. As shown in fig. 7, the page comparison apparatus 100 includes:
a first obtaining module 110, configured to obtain a first electronic experiment record of a first version page and a second electronic experiment record of a second version page respectively;
a second obtaining module 120, configured to obtain, according to the first electronic experiment record and the second electronic experiment record, first cache data of each first interface module in the first version page and second cache data of each second interface module in the second version page respectively;
a determining module 130, configured to determine, according to the first cache data and the second cache data, modified content of the second version page relative to the first version page;
the third obtaining module 140 obtains a comparison page between the first version page and the second version page according to the changed content.
In an optional embodiment, the third obtaining module 140 is specifically configured to determine a change identifier of the changed content according to a change category of the changed content, where the change category of the changed content includes at least one of: adding, modifying and deleting;
and distinguishing and identifying the changed content in the comparison page according to the changed identification of the changed content.
In an optional embodiment, the second obtaining module 120 is specifically configured to obtain, according to the first electronic experiment record, an interface address of each first interface module in the first version page;
acquiring electronic experiment records corresponding to the first interface modules according to the interface addresses of the first interface modules;
determining the key name of each first interface module according to the interface address of each first interface module and a first random number generation algorithm, and determining the key value of each first interface module according to the electronic experiment record corresponding to each first interface module;
and storing and obtaining the first cache data of each first interface module in the first version page according to the key name of each first interface module and the key value of each first interface module.
In an optional embodiment, the determining module 130 is specifically configured to obtain a plurality of target interface modules in the first cache data and the second cache data, where the types of the interface modules are the same;
and determining the changed content of the second version page relative to the first version page based on the cache data corresponding to each target interface module in the plurality of target interface modules with the same interface module type.
In an optional embodiment, the determining module 130 is specifically configured to obtain a data association identifier of each piece of data in the cache data corresponding to each target interface module in multiple target interface modules with the same interface module type;
determining intersection data and cross set data of the second version page relative to the first version page according to the data association identification of each piece of data, wherein the intersection data is data modified in the second version page relative to the first version page; and the cross-set data is data which is newly added or deleted in the second version page relative to the first version page.
In an optional embodiment, the determining module 130 is specifically configured to determine, according to the data association identifier of each piece of data, first target data and second target data having the same data association identifier;
and determining intersection data of the second version page relative to the first version page according to the first target data and the second target data.
In an optional embodiment, the first obtaining module 110 is further configured to respectively determine a first version page and a second version page in response to a selection operation on any two version pages of the multiple version pages, where each version page is obtained based on an update operation on a previous version page.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device may be integrated in the page comparison apparatus. As shown in fig. 8, the electronic device may include: a processor 210, a storage medium 220, and a bus 230, wherein the storage medium 220 stores machine-readable instructions executable by the processor 210, and when the electronic device is operated, the processor 210 communicates with the storage medium 220 via the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above-mentioned method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program performs the steps of the above method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (in english: processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (9)

1. A page comparison method based on hypertext markup language is characterized by comprising the following steps:
respectively acquiring a first electronic experiment record of a first version page and a second electronic experiment record of a second version page;
respectively acquiring first cache data of each first interface module in the first version page and second cache data of each second interface module in the second version page according to the first electronic experiment record and the second electronic experiment record;
determining the changed content of the second version page relative to the first version page according to the first cache data and the second cache data;
acquiring a comparison page of the first version page and the second version page according to the change content;
the determining, according to the first cache data and the second cache data, changed content of the second version page relative to the first version page includes:
acquiring a plurality of target interface modules with the same interface module type in the first cache data and the second cache data;
and determining the changed content of the second version page relative to the first version page based on the cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type.
2. The method according to claim 1, wherein the obtaining a comparison page of the first version page and the second version page according to the changed content comprises:
determining a change identifier of the changed content according to a change type of the changed content, wherein the change type of the changed content comprises at least one of the following types: adding, modifying and deleting;
and distinguishing and identifying the changed content in the comparison page according to the changed identification of the changed content.
3. The method of claim 1, wherein the obtaining first cache data of each first interface module in the first version page according to the first electronic experiment record comprises:
acquiring interface addresses of all first interface modules in a first version page according to the first electronic experiment record;
acquiring electronic experiment records corresponding to the first interface modules according to the interface addresses of the first interface modules;
determining a key name of each first interface module according to an interface address of each first interface module and a first random number generation algorithm, and determining a key value of each first interface module according to an electronic experiment record corresponding to each first interface module;
and storing and obtaining first cache data of each first interface module in the first version page according to the key name of each first interface module and the key value of each first interface module.
4. The method according to claim 1, wherein the determining, based on the cache data corresponding to each target interface module in the plurality of target interface modules with the same interface module type, the changed content of the second version page relative to the first version page includes:
acquiring data association identifiers of each piece of data in cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type;
determining intersection data and cross set data of the second version page relative to the first version page according to the data association identification of each piece of data, wherein the intersection data is data of the second version page modified relative to the first version page; the cross set data is data which is newly added or deleted in the second version page relative to the first version page.
5. The method according to claim 4, wherein the determining intersection data of the second version page with respect to the first version page according to the data association identifier of each piece of data comprises:
determining first target data and second target data with the same data association identification according to the data association identification of each piece of data;
and determining intersection data of the second version page relative to the first version page according to the first target data and the second target data.
6. The method of any of claims 1-5, wherein prior to obtaining the first electronic experiment record of the first version page and the second electronic experiment record of the second version page, respectively, the method further comprises:
and in response to selection operation on any two version pages in the plurality of version pages, respectively determining the first version page and the second version page, wherein each version page is obtained based on update operation on the last version page.
7. A page comparison apparatus based on hypertext markup language, comprising:
the first obtaining module is used for respectively obtaining a first electronic experiment record of a first edition page and a second electronic experiment record of a second edition page;
the second obtaining module is used for respectively obtaining first cache data of each first interface module in the first version page and second cache data of each second interface module in the second version page according to the first electronic experiment record and the second electronic experiment record;
a determining module, configured to determine, according to the first cache data and the second cache data, changed content of the second version page relative to the first version page;
the third obtaining module is used for obtaining a comparison page of the first version page and the second version page according to the change content;
the determining module is specifically configured to obtain a plurality of target interface modules of the same interface module type in the first cache data and the second cache data;
and determining the change content of the second version page relative to the first version page based on the cache data corresponding to each target interface module in a plurality of target interface modules with the same interface module type.
8. An electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the steps of the page comparison method based on the hypertext markup language according to any one of claims 1 to 6.
9. A computer-readable storage medium, having stored thereon a computer program for performing, when being executed by a processor, the steps of the method for page comparison according to any one of claims 1 to 6.
CN202211504592.1A 2022-11-29 2022-11-29 Page comparison method, equipment and medium based on hypertext markup language Active CN115544969B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211504592.1A CN115544969B (en) 2022-11-29 2022-11-29 Page comparison method, equipment and medium based on hypertext markup language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211504592.1A CN115544969B (en) 2022-11-29 2022-11-29 Page comparison method, equipment and medium based on hypertext markup language

Publications (2)

Publication Number Publication Date
CN115544969A CN115544969A (en) 2022-12-30
CN115544969B true CN115544969B (en) 2023-03-21

Family

ID=84721640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211504592.1A Active CN115544969B (en) 2022-11-29 2022-11-29 Page comparison method, equipment and medium based on hypertext markup language

Country Status (1)

Country Link
CN (1) CN115544969B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916255A (en) * 2010-07-02 2010-12-15 互动在线(北京)科技有限公司 HTML (Hypertext Markup Language) content contrast device and method
WO2016078479A1 (en) * 2014-11-17 2016-05-26 广州市动景计算机科技有限公司 Method and device for monitoring web page changes
CN107609042A (en) * 2017-08-16 2018-01-19 阿里巴巴集团控股有限公司 A kind of method for updating pages and device
WO2018019241A1 (en) * 2016-07-29 2018-02-01 腾讯科技(深圳)有限公司 Update processing method and device for terminal application, and computer storage medium
CN108255925A (en) * 2017-11-10 2018-07-06 平安普惠企业管理有限公司 A kind of display methods and its terminal of data list structure alteration
CN110427215A (en) * 2019-07-30 2019-11-08 阿里巴巴集团控股有限公司 A kind of program version mRNA differential display mRNA method and device applied to front end exploitation
CN111831819A (en) * 2019-06-06 2020-10-27 北京嘀嘀无限科技发展有限公司 Text updating method and device
CN114218235A (en) * 2021-11-10 2022-03-22 中国建设银行股份有限公司 Page text updating method and device, electronic equipment and storage medium
CN115237398A (en) * 2022-06-17 2022-10-25 平安科技(深圳)有限公司 Method, device and equipment for acquiring interactive behavior experiment data and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6366933B1 (en) * 1995-10-27 2002-04-02 At&T Corp. Method and apparatus for tracking and viewing changes on the web

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916255A (en) * 2010-07-02 2010-12-15 互动在线(北京)科技有限公司 HTML (Hypertext Markup Language) content contrast device and method
WO2016078479A1 (en) * 2014-11-17 2016-05-26 广州市动景计算机科技有限公司 Method and device for monitoring web page changes
WO2018019241A1 (en) * 2016-07-29 2018-02-01 腾讯科技(深圳)有限公司 Update processing method and device for terminal application, and computer storage medium
CN107609042A (en) * 2017-08-16 2018-01-19 阿里巴巴集团控股有限公司 A kind of method for updating pages and device
CN108255925A (en) * 2017-11-10 2018-07-06 平安普惠企业管理有限公司 A kind of display methods and its terminal of data list structure alteration
CN111831819A (en) * 2019-06-06 2020-10-27 北京嘀嘀无限科技发展有限公司 Text updating method and device
CN110427215A (en) * 2019-07-30 2019-11-08 阿里巴巴集团控股有限公司 A kind of program version mRNA differential display mRNA method and device applied to front end exploitation
CN114218235A (en) * 2021-11-10 2022-03-22 中国建设银行股份有限公司 Page text updating method and device, electronic equipment and storage medium
CN115237398A (en) * 2022-06-17 2022-10-25 平安科技(深圳)有限公司 Method, device and equipment for acquiring interactive behavior experiment data and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HTML页面中的文献记录分析算法;曾庆涛等;《北京邮电大学学报》;20170615;第88-91页 *
基于用户体验的差异化网页布局应用研究;康琪等;《农村经济与科技》;20191230(第24期);第245-246页 *

Also Published As

Publication number Publication date
CN115544969A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
CN108427731B (en) Page code processing method and device, terminal equipment and medium
CN106293675B (en) System static resource loading method and device
CN109902073B (en) Log processing method and device, computer equipment and computer readable storage medium
US7720814B2 (en) Repopulating a database with document content
US11468223B2 (en) Model documentation generation system
CN113127347B (en) Interface testing method, device, equipment and readable storage medium
CN113448862B (en) Software version testing method and device and computer equipment
CN115576828A (en) Test case generation method, device, equipment and storage medium
CN113342692B (en) Automatic test case generation method and device, electronic equipment and storage medium
CN114266539A (en) File flow processing method, system, device and computer readable storage medium
CN112783494A (en) Automatic skeleton screen generation method and device and application page updating method and device
CN115544969B (en) Page comparison method, equipment and medium based on hypertext markup language
US20080071593A1 (en) Business process editor, business process editing method, and computer product
JP4215255B2 (en) Degradation confirmation inspection method, degradation confirmation inspection system, and program therefor
CN111414404A (en) Data visualization device and method
JP5151412B2 (en) Notation fluctuation analyzer
CN115146581A (en) Project management method, defect analysis method, related device and readable storage medium
JP2016057715A (en) Graphic type program analyzer
CN109697141B (en) Method and device for visual testing
JP4835791B2 (en) GUI evaluation system, GUI evaluation method, and GUI evaluation program
KR20070014219A (en) Automatic web source creation system
CN115543227B (en) Cross-system data migration method, system, electronic device and storage medium
CN116755684B (en) OAS Schema generation method, device, equipment and medium
WO2023189440A1 (en) Information processing device and information processing method
WO2021084763A1 (en) Management device, management method, and management program

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