CN108319575B - Page component checking method, device, server and storage medium - Google Patents

Page component checking method, device, server and storage medium Download PDF

Info

Publication number
CN108319575B
CN108319575B CN201810089192.6A CN201810089192A CN108319575B CN 108319575 B CN108319575 B CN 108319575B CN 201810089192 A CN201810089192 A CN 201810089192A CN 108319575 B CN108319575 B CN 108319575B
Authority
CN
China
Prior art keywords
verification
component
page
target
host application
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
CN201810089192.6A
Other languages
Chinese (zh)
Other versions
CN108319575A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810089192.6A priority Critical patent/CN108319575B/en
Publication of CN108319575A publication Critical patent/CN108319575A/en
Application granted granted Critical
Publication of CN108319575B publication Critical patent/CN108319575B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a method, a device, a server and a storage medium for checking a page component, wherein the method comprises the following steps: matching a page component contained in the host application program with the verification configuration file; determining a target checking component and a target checking mode of the target checking component according to a matching result; when the verification opportunity determined by the host application program is reached, verifying the data of the target verification component by adopting the target verification mode; and feeding back the checking result to the host application program. The embodiment of the invention can provide configurable uniform verification rules for developers, and realizes that the front-end user verifies the data input in the page component and the back-end developer verifies the setting of the page component; and the verification configuration file is uniformly modified during later-stage updating, so that the development, updating and maintenance efficiency of the application program and the verification rule by a developer is improved.

Description

Page component checking method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of software development, in particular to a method and a device for verifying a page component, a server and a storage medium.
Background
With the development of internet technology, the interaction between the application software installed in the mobile terminal and the user is increasing, and up to this point, the user needs to input corresponding data content to obtain the related services provided in the application software.
Therefore, when scenes such as user input are involved, a large number of page components need to check the legality of an input data format, only legal data can be transmitted to a system background, and data processing and user feedback are achieved. At present, developers set verification modes of different components on different pages according to service requirements of different page components so as to meet requirements of users or services.
However, in the interaction between the application software and the user, since there are a large number of user interfaces and a large number of page components, and the application software provides a large number of business methods, these result in a large amount of development workload when the developer individually designs the verification rules of each component. The current verification rule can only verify data input by a front-end user, and a back-end developer cannot obtain corresponding verification in the development process of the component. Therefore, the existing page component checking mode not only reduces the development and maintenance efficiency of developers; moreover, the verification modes of the application programs are inconsistent, and development, updating and maintenance of the back end of a developer are not facilitated.
Disclosure of Invention
The embodiment of the invention provides a method and a device for checking a page component, a server and a storage medium, which can provide a configurable uniform check rule for a developer, realize that a front-end user checks data input in the page component and the setting of the page component by a back-end developer, and improve the efficiency of the developer in developing, updating and maintaining the check rule.
In a first aspect, an embodiment of the present invention provides a method for checking a page component, including:
matching a page component contained in the host application program with the verification configuration file;
determining a target checking component and a target checking mode of the target checking component according to a matching result;
when the verification opportunity determined by the host application program is reached, verifying the data of the target verification component by adopting the target verification mode;
and feeding back the checking result to the host application program.
In a second aspect, an embodiment of the present invention provides a device for checking a page component, including:
the configuration matching module is used for matching the page components contained in the host application program with the verification configuration file;
the verification determining module is used for determining a target verification component and a target verification mode of the target verification component according to a matching result;
the verification module is used for verifying the related data of the target verification component by adopting the target verification mode when the verification opportunity determined by the host application program is reached;
and the result feedback module is used for feeding back the verification result to the host application program.
In a third aspect, an embodiment of the present invention provides a server, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for checking a page component according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for checking a page component according to any embodiment of the present invention.
The embodiment of the invention provides the configurable page component checking configuration file, matches the page component contained in the host application program configured with the checking configuration file to obtain the target checking component needing to be checked and the target checking mode associated with the target checking component, thereby checking the target checking component by using the target checking mode and feeding the checking result back to the host application program so as to enable a user or a developer to know the checking result of the page component. The embodiment of the invention can provide configurable uniform verification rules for developers, and realizes that the front-end user verifies the data input in the page component and the back-end developer verifies the setting of the page component; and when updating or modifying in the later period, the verification configuration file can be modified uniformly, the verification rules of all the components do not need to be modified one by one, and the development, updating and maintenance efficiency of the application program and the verification rules by a developer is improved.
Drawings
Fig. 1 is a flowchart of a method for checking a page component according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for checking a page component according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a verification apparatus for a page component according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad invention. It should be further noted that, for convenience of description, only some structures, not all structures, relating to the embodiments of the present invention are shown in the drawings.
Example one
Fig. 1 is a flowchart of a method for checking a page component according to an embodiment of the present invention, where the embodiment is applicable to a case where data check is performed on the page component during program debugging or running, and the method can be executed by a checking device of the page component. The method specifically comprises the following steps:
and S110, matching the page components contained in the host application program with the verification configuration file.
In an embodiment of the present invention, the host application refers to an application configured with a verification configuration file. In order to obtain the user's needs and provide the user with services meeting the user's needs, the host application program usually sets corresponding page components in the page, i.e. visual graphical elements placed on the forms, having functions of executing or triggering code execution by triggering events and completing responses, such as page components like text edit boxes, buttons, and pull-down menus. The user can directly select or click in the selectable items provided in the component without manually adding any data content. However, for a page component such as a text edit box, the user needs to manually input corresponding data content to submit to the background in exchange for the service required by the user. For such page components, when a developer debugs an application program, the attribute of the page component and the data input by the user are required to be limited in format; when the program runs, the user can submit the data and exchange the service only when inputting legal data. Therefore, whether in the program debugging stage or the program running stage, the validity check of the related data related to the page component is very important.
In the embodiment, a verification configuration file which can be configured in the host application program is designed for the host application program, and relevant data of the page component related to the data manually input by the user is verified by using the verification configuration file. The verification configuration file may include types of the page components and verification rules associated with the various page components, where the verification rules may specify format restrictions and specific verification methods of input data in the various page components. In the verification configuration file, a general component verification rule can be set, and a developer can also set a self-defined verification rule according to the actual requirement of a host application program, wherein the priority of the self-defined verification rule is higher than that of the general verification rule. For example, in a certain host application program, a general check rule is set for the cipher text edit box, however, for the transaction cipher text edit box in a certain page, in order to improve the security of the transaction, a developer customizes the check rule of the transaction cipher text edit box, and then when the component is checked, the check rule customized by the developer is preferentially adopted to check the transaction cipher text edit box.
The verification configuration file can be configured in the application program being debugged, and can also be configured in the application program which can be normally used after debugging. In the program debugging stage, the page components contained in the codes of the host application program are matched with the verification configuration file so as to check whether the codes of the host application program contain the error setting of the attributes or the data formats of the page components, and simultaneously, the attributes of the same type of page components or the styles of the data formats in the page components in the host application program can be unified; and in the later program updating or maintaining process, the unified modification of the related programs of the page components is facilitated, and the development efficiency of developers is improved. In the program running stage, the page components contained in the current running page of the host application program are matched with the verification configuration file, so that whether the data input by the user has format errors is checked, and the user is prompted to modify the data.
And S120, determining a target verification component and a target verification mode of the target verification component according to the matching result.
In the embodiment of the invention, the target verification component is a page component needing to be verified. It will be appreciated that the components of the page involved in requiring the user to enter data may all be the target verification components that need to be verified. The target verification mode refers to a specific implementation mode for verifying the target verification component, and it can be understood that the same type of page component is associated with the same verification mode. The page component type is not limited to the type limitation of the page component itself, such as a text edit box, and the page component type may also be limited from the specific type of data input by the user, such as a specific numerical type of time representation or RMB numerical representation.
Since the verification configuration file may include the types of the page components and verification modes associated with various page components, when the page components included in the host application are matched with the verification configuration file, first, for each page component included in the host application, if the verification configuration file also includes the page component at the same time, it indicates that the page component needs to be verified, the page component is used as a target verification component to be verified, and the type of the target verification component is determined. And secondly, matching the target verification component type with the association relationship between the component type and the verification mode stored in the verification configuration file to determine the target verification mode.
Illustratively, in a page of a host application, a text edit box, referred to herein as a date type text edit box, is provided that requires a user to enter date information. Meanwhile, the verification configuration file comprises a date type text edit box and a verification mode related to the date type text edit box. Therefore, when the page component is verified, if the page component is in a program debugging stage, the text editing box in the host application program code is matched with the verification configuration file, the text editing box is determined to be the target verification component and the type of the text editing box is determined to be the date type text editing box, a target verification mode is determined according to the type of the text editing box, namely the date type, and then a developer sets corresponding attributes and a date data format for the text editing box to verify; similarly, if the text editing box in the current running page of the host application program is matched with the verification configuration file in the program running stage, the text editing box is also determined to be the target verification component and the type of the text editing box is determined to be the date type text editing box, a target verification mode is determined according to the type of the text editing box, namely the date type, and then the data input by the user is verified.
S130, when the checking time determined by the host application program is reached, checking the data of the target checking component by adopting the target checking mode.
In the specific embodiment of the present invention, in the process of executing the program code or running the page, the page component in the program code or the page is not checked all the time, but only when the program code needs to execute the program related to the page component or the page runs until the user input data is obtained, the checking timing is reached, at this time, the target checking component needing to be checked and the target checking mode associated with the component type of the target checking component are determined through the checking configuration file, and the related data of the target checking component is checked by using the determined target checking mode. For example, the data input by the user or the data fed back by the server in the page component is checked according to the life cycle of the page.
And S140, feeding back the verification result to the host application program.
In the specific embodiment of the invention, the aim of checking the page component is to feed back the error in the program debugging stage to the developer so as to improve the development efficiency of the developer and facilitate the unification of the page component style in the host application program; or the error of the data input by the user in the page component is fed back to the user, so that the user can modify the input of the data. In the program debugging stage, the verification result can be prompted to a developer in an interface callback mode, and the developer obtains the verification result by checking a specific variable; or, corresponding prompt information is output through the console, so that a developer can more intuitively check the verification result. In the program running stage, the check result may be prompted to the User through a User Interface (UI), for example, a prompt window pops up.
S150, updating the verification components stored in the verification configuration file and the verification mode of the verification components.
In the embodiment of the present invention, the verification configuration file may be updated with the upgrade or update of the host application, where the verification component stored in the verification configuration file, that is, the target verification component that needs to be verified in the host application, and the verification manner associated with the verification component may be updated. Since the verification configuration file in the embodiment is configurable, only the verification configuration file needs to be updated, and the verification mode of each page component in the host application program does not need to be modified independently, so that the development efficiency of a developer is improved.
According to the technical scheme, the configurable page component verification configuration file is provided, the page component contained in the host application program configured with the verification configuration file is matched with the verification configuration file, the target verification component needing to be verified and the target verification mode associated with the target verification component are obtained, the target verification component is verified in the target verification mode, and the verification result is fed back to the host application program, so that a user or a developer can know the verification result of the page component. The embodiment of the invention can provide configurable uniform verification rules for developers, and realizes that the front-end user verifies the data input in the page component and the back-end developer verifies the setting of the page component; and when updating or modifying in the later period, the verification configuration file can be modified uniformly, the verification rules of all the components do not need to be modified one by one, and the development, updating and maintenance efficiency of the application program and the verification rules by a developer is improved.
Example two
On the basis of the first embodiment, the present embodiment provides a preferred implementation of a verification method for a page component, which can verify the page component according to a lifecycle of page operation. Fig. 2 is a flowchart of a verification method for a page component according to a second embodiment of the present invention, and as shown in fig. 2, the method includes the following specific steps:
s210, matching the page components contained in the host application program with the verification configuration file.
Preferably, in the program debugging stage, the page components contained in the code of the host application program are matched with the verification configuration file; or, in the program running stage, matching the page components contained in the current running page of the host application program with the verification configuration file.
In the embodiment of the present invention, the verification configuration file may be configured in the application program being debugged, or may be configured in the application program that can be normally used after debugging. In the program debugging stage, the page components contained in the codes of the host application program are matched with the verification configuration file so as to check whether the codes of the host application program contain the error setting of the attributes or the data formats of the page components, and simultaneously, the attributes of the same type of page components or the styles of the data formats in the page components in the host application program can be unified; and in the later program updating or maintaining process, the unified modification of the related programs of the page components is facilitated, and the development efficiency of developers is improved. In the program running stage, the page components contained in the current running page of the host application program are matched with the verification configuration file, so that whether the data input by the user has format errors is checked, and the user is prompted to modify the data.
S220, aiming at each page component contained in the host application program, if the page component is contained in the verification configuration file, the page component is used as the target verification component, and the type of the target verification component is determined.
In the embodiment of the present invention, the verification configuration file may include the type of the page component to be verified, so that each page component included in the host application program is matched with the page component in the verification configuration file one by one, so as to clarify the target verification component to be verified in the host application program. And determining the type of the target verification component according to the attribute information of the target verification component or the limitation of the input data.
S230, matching the target verification component type with the association relationship between the component type and the verification mode stored in the verification configuration file, and determining the target verification mode.
In the specific embodiment of the present invention, the verification configuration file may include verification modes associated with various page components, where the verification modes specify a class of page components or a verification rule of a certain page component. Therefore, after the target verification component and the type thereof in the host application program are determined, the target verification mode of the target verification component is obtained through matching according to the incidence relation between the page component type and the verification mode stored in the verification configuration file.
And S240, monitoring the life cycle of the current running page of the host application program.
In the specific embodiment of the present invention, in the execution of the program code or the running process of the page, the page component in the program code is not checked all the time, but only when the program code needs to execute the program related to the page component or when the page runs until the user input data is acquired, the checking time is reached. Thus, there is a need to snoop the lifecycle of the currently running page of the host application to trigger component checking operations at the appropriate time.
The life cycle of a page refers to the whole process from birth to death of the page. When a new page is entered through the operation of the website or the existing page, the server receives the page request of the new page, and the life cycle of the new page starts to monitor the new page. The server creates an independent and brand-new page according to the page request, performs appropriate processing, returns the finally generated page to the browser, then releases the newly generated page, and ends the life cycle of the new page.
And S250, according to the life cycle of the current running page, when the verification opportunity determined by the host application program is reached, verifying the data input by the user in the target verification component by adopting the target verification mode.
In the specific embodiment of the invention, the page which only contains the website information of the new page in the page request does not generally relate to the scene input by the user, so the lightweight page access does not need the verification process of the page component. However, for a page containing additional information in the page request, a jump to a new page is usually made on the basis of the previous page, and therefore, the generation of such a page may need to be combined with processing the additional information to feed back to the browser a new page. In such a page, whether a scene input by a user is involved in the life cycle of the page needs to be monitored, and if the scene input by the user is involved, a page component involved in the user input is verified according to a verification configuration file.
Preferably, the data input by the user in the target verification component is verified in the target verification mode; or, the data acquired by the target verification component from the server is verified in the target verification mode.
In the embodiment of the invention, not only the data input by the front-end user can be verified, but also the data returned by the background server can be verified. Illustratively, for a date type text edit box, the host application and verification configuration file have a data format setting of 2018-1-1. When the user inputs the date 2018/1/15 in the page component or the date acquired by the page component from the server is 2018/1/15, the verification configuration file verifies the data input by the user or the data acquired by the page component from the server according to the monitored specific time of the life cycle of the page, and the verification result of the data format error can be obtained because the two date formats are not matched. In addition, codes related to page components in program debugging can be checked in the same way, and whether the settings of the developer are correct or not can be verified.
And S260, feeding back the verification result to the host application program.
In the specific embodiment of the present invention, in the program debugging phase, preferably, the check result is fed back to the host application program through the interface callback prompt; or, the check result is fed back to the host application program through the information prompt output by the console. In the program running stage, preferably, the checking result is fed back to the host application program through a UI (user interface) prompt.
According to the technical scheme, the configurable page component verification configuration file is provided, firstly, the page components contained in the host application program are matched with the page components stored in the verification configuration file one by one, and the target verification component needing to be verified is obtained; secondly, determining a target verification mode according to the type of the target verification component; then, according to the monitored page period, when the verification time is reached, a target verification mode is utilized to verify the target verification component; and finally, feeding back the verification result to the host application program so that the user or the developer can know the verification result of the page component. The embodiment of the invention can provide configurable uniform verification rules for developers, and realizes the verification of the data input by a front-end user in the page component and the setting of the page component by a back-end developer according to the monitored life cycle of the page. By configuring the uniform verification configuration file for the application program, the development efficiency of the application program by a developer is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a checking apparatus for a page component according to a third embodiment of the present invention, where this embodiment is applicable to a case where data checking is performed on a page component during program debugging or running, and the apparatus can implement the checking method for a page component according to any embodiment of the present invention. The device specifically includes:
a configuration matching module 310, configured to match a page component included in the host application with the verification configuration file;
a verification determining module 320, configured to determine a target verification component and a target verification manner of the target verification component according to a matching result;
the verification module 330 is configured to verify, in the case of reaching a verification opportunity determined by the host application, the relevant data of the target verification component in the target verification manner;
and a result feedback module 340, configured to feed back the verification result to the host application.
The configuration matching module 310 is specifically configured to:
in the program debugging stage, matching a page component contained in a code of a host application program with a verification configuration file; or, in the program running stage, matching the page components contained in the current running page of the host application program with the verification configuration file.
Further, the verification determining module 320 includes:
a target verification component determining unit, configured to, for each page component included in the host application, if the page component is included in the verification configuration file, use the page component as the target verification component, and determine the type of the target verification component;
and the target verification mode determining unit is used for matching the target verification component type with the association relationship between the component type and the verification mode stored in the verification configuration file to determine the target verification mode.
Further, the verification module 330 includes:
the monitoring unit is used for monitoring the life cycle of the current running page of the host application program;
and the verification unit is used for verifying the data input by the user in the target verification component by adopting the target verification mode when the verification time determined by the host application program is reached according to the life cycle of the current running page.
Preferably, the verification module 330 is specifically configured to:
verifying the data input by the user in the target verification component by adopting the target verification mode; or, the data acquired by the target verification component from the server is verified in the target verification mode.
Further, the result feedback module 340 is specifically configured to:
feeding back the checking result to the host application program through an interface callback prompt; or
And outputting information prompt through the console to feed back the verification result to the host application program.
Further, the result feedback module 340 is specifically configured to:
and feeding back the verification result to the host application program through a UI (user interface) prompt.
Further, the apparatus further comprises:
an updating module 350, configured to update the verification component stored in the verification configuration file and the verification manner of the verification component.
According to the technical scheme of the embodiment, through the mutual cooperation of the functional modules, the functions of determining the target verification component to be verified, determining the target verification mode, monitoring the life cycle of the page, verifying the component, feeding back the verification result, updating the verification configuration file and the like are realized. The embodiment of the invention can provide configurable uniform verification rules for developers, and realizes that the front-end user verifies the data input in the page component and the back-end developer verifies the setting of the page component; and when updating or modifying in the later period, the verification configuration file can be modified uniformly, the verification rules of all the components do not need to be modified one by one, and the development, updating and maintenance efficiency of the application program and the verification rules by a developer is improved.
Example four
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention, and fig. 4 shows a block diagram of an exemplary server suitable for implementing the embodiments of the present invention. The server shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
The server 12 shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 4, the server 12 is in the form of a general purpose computing device. The components of the server 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The server 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by server 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The server 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of embodiments described herein.
The server 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the server 12, and/or with any devices (e.g., network card, modem, etc.) that enable the server 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the server 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the server 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the server 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, such as implementing a verification method for page components provided by embodiments of the present invention, by running a program stored in the system memory 28.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program (or referred to as a computer-executable instruction) is stored, where the computer program is used to execute a method for checking a page component when executed by a processor, and the method includes:
matching a page component contained in the host application program with the verification configuration file;
determining a target checking component and a target checking mode of the target checking component according to a matching result;
when the verification opportunity determined by the host application program is reached, verifying the data of the target verification component by adopting the target verification mode;
and feeding back the checking result to the host application program.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It should be noted that the foregoing is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will appreciate that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, adaptations, and substitutions are possible, without departing from the scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention have been described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and many other equivalent embodiments may be included without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.

Claims (18)

1. A method for checking a page component, comprising:
matching a page component contained in the host application program with the verification configuration file; the verification configuration file comprises the types of the page components and verification rules associated with the various page components;
determining a target checking component and a target checking mode of the target checking component according to a matching result;
when the verification opportunity determined by the host application program is reached, verifying the data of the target verification component by adopting the target verification mode;
and feeding back the checking result to the host application program.
2. The method of claim 1, wherein matching the page components contained by the host application with the verification configuration file comprises:
in the program debugging stage, matching a page component contained in a code of a host application program with a verification configuration file; alternatively, the first and second electrodes may be,
and in the program running stage, matching the page components contained in the current running page of the host application program with the verification configuration file.
3. The method of claim 1, wherein the determining the target verification component and the target verification manner of the target verification component comprises:
for each page component contained in the host application program, if the page component is contained in the verification configuration file, taking the page component as the target verification component, and determining the type of the target verification component;
and matching the target verification component type with the association relationship between the component type and the verification mode stored in the verification configuration file to determine the target verification mode.
4. The method according to claim 1 or 2, wherein the verifying the relevant data of the target verification component by using the target verification manner includes:
monitoring the life cycle of the current running page of the host application program;
and according to the life cycle of the current running page, when the verification opportunity determined by the host application program is reached, verifying the data input by the user in the target verification component by adopting the target verification mode.
5. The method of claim 1, wherein the verifying the data of the target verification component in the target verification manner comprises:
verifying the data input by the user in the target verification component by adopting the target verification mode; alternatively, the first and second electrodes may be,
and verifying the data acquired by the target verification component from the server by adopting the target verification mode.
6. The method of claim 1 or 2, wherein the feeding back the verification result to the host application comprises:
feeding back the checking result to the host application program through an interface callback prompt; alternatively, the first and second electrodes may be,
and outputting information prompt through the console to feed back the verification result to the host application program.
7. The method of claim 1 or 2, wherein the feeding back the verification result to the host application comprises:
and feeding back the verification result to the host application program through a UI (user interface) prompt.
8. The method of claim 1, further comprising:
and updating the verification components stored in the verification configuration file and the verification mode of the verification components.
9. A verification apparatus for a page component, comprising:
the configuration matching module is used for matching the page components contained in the host application program with the verification configuration file; the verification configuration file comprises the types of the page components and verification rules associated with the various page components;
the verification determining module is used for determining a target verification component and a target verification mode of the target verification component according to a matching result;
the verification module is used for verifying the related data of the target verification component by adopting the target verification mode when the verification opportunity determined by the host application program is reached;
and the result feedback module is used for feeding back the verification result to the host application program.
10. The apparatus of claim 9, wherein the configuration matching module is specifically configured to:
in the program debugging stage, matching a page component contained in a code of a host application program with a verification configuration file; alternatively, the first and second electrodes may be,
and in the program running stage, matching the page components contained in the current running page of the host application program with the verification configuration file.
11. The apparatus of claim 9, wherein the verification determination module comprises:
a target verification component determining unit, configured to, for each page component included in the host application, if the page component is included in the verification configuration file, use the page component as the target verification component, and determine the type of the target verification component;
and the target verification mode determining unit is used for matching the target verification component type with the association relationship between the component type and the verification mode stored in the verification configuration file to determine the target verification mode.
12. The apparatus of claim 9 or 10, wherein the verification module comprises:
the monitoring unit is used for monitoring the life cycle of the current running page of the host application program;
and the verification unit is used for verifying the data input by the user in the target verification component by adopting the target verification mode when the verification time determined by the host application program is reached according to the life cycle of the current running page.
13. The apparatus of claim 9, wherein the verification module is specifically configured to:
verifying the data input by the user in the target verification component by adopting the target verification mode; alternatively, the first and second electrodes may be,
and verifying the data acquired by the target verification component from the server by adopting the target verification mode.
14. The apparatus according to claim 9 or 10, wherein the result feedback module is specifically configured to:
feeding back the checking result to the host application program through an interface callback prompt; alternatively, the first and second electrodes may be,
and outputting information prompt through the console to feed back the verification result to the host application program.
15. The apparatus according to claim 9 or 10, wherein the result feedback module is specifically configured to:
and feeding back the verification result to the host application program through a UI (user interface) prompt.
16. The apparatus of claim 9, further comprising:
and the updating module is used for updating the checking components stored in the checking configuration file and the checking mode of the checking components.
17. A server, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method of checking a page assembly as claimed in any one of claims 1 to 8.
18. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of checking a page component according to any one of claims 1 to 8.
CN201810089192.6A 2018-01-30 2018-01-30 Page component checking method, device, server and storage medium Active CN108319575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810089192.6A CN108319575B (en) 2018-01-30 2018-01-30 Page component checking method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810089192.6A CN108319575B (en) 2018-01-30 2018-01-30 Page component checking method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN108319575A CN108319575A (en) 2018-07-24
CN108319575B true CN108319575B (en) 2021-06-29

Family

ID=62890265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810089192.6A Active CN108319575B (en) 2018-01-30 2018-01-30 Page component checking method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN108319575B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111399806B (en) * 2019-01-03 2023-09-01 百度在线网络技术(北京)有限公司 Component management method and device, electronic equipment and storage medium
CN110083530A (en) * 2019-03-21 2019-08-02 平安普惠企业管理有限公司 Data verification method, device and computer equipment based on automatic Verification tool
CN110597712B (en) * 2019-08-27 2023-09-05 北京奇艺世纪科技有限公司 Component attribute verification method, device, terminal and storage medium
CN111444224B (en) * 2020-03-24 2023-08-15 政采云有限公司 Service data verification method and device
CN112769802B (en) * 2020-12-31 2022-09-30 微医云(杭州)控股有限公司 Access verification method and device based on server, electronic equipment and storage medium
CN113407460B (en) * 2021-07-16 2023-04-11 抖音视界有限公司 Page testing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0982930A2 (en) * 1998-08-28 2000-03-01 Hitachi, Ltd. Method for embedding information and device for the same
CN101021890A (en) * 2007-03-20 2007-08-22 华为技术有限公司 Method, system and server for checking page data
CN101105750A (en) * 2007-08-16 2008-01-16 金蝶软件(中国)有限公司 Numerical value input device and method for numerical value input using the device
CN103810421A (en) * 2014-02-19 2014-05-21 北京视博数字电视科技有限公司 Application program verification method and device and terminal device
CN106484374A (en) * 2015-08-26 2017-03-08 北京奇虎科技有限公司 Method and transfer server that a kind of control APK reaches the standard grade

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007257308A (en) * 2006-03-23 2007-10-04 Canon Inc Document management device, document management system, control method, program and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0982930A2 (en) * 1998-08-28 2000-03-01 Hitachi, Ltd. Method for embedding information and device for the same
CN101021890A (en) * 2007-03-20 2007-08-22 华为技术有限公司 Method, system and server for checking page data
CN101105750A (en) * 2007-08-16 2008-01-16 金蝶软件(中国)有限公司 Numerical value input device and method for numerical value input using the device
CN103810421A (en) * 2014-02-19 2014-05-21 北京视博数字电视科技有限公司 Application program verification method and device and terminal device
CN106484374A (en) * 2015-08-26 2017-03-08 北京奇虎科技有限公司 Method and transfer server that a kind of control APK reaches the standard grade

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Model-based system configuration approach for Internetware";LI Ying 等;《Science China(Information Sciences)》;20130801;第56卷(第8期);第21-40页 *
"基于Hadoop的电网数据质量校验方法与验证系统";张志亮 等;《计算机研究与发展》;20141215;第51卷(第S2期);第134-144页 *

Also Published As

Publication number Publication date
CN108319575A (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN108319575B (en) Page component checking method, device, server and storage medium
US9848277B2 (en) High-speed application for installation on mobile devices for permitting remote configuration of such mobile devices
US20180329813A1 (en) System and method for automated intelligent mobile application testing
CN112765023B (en) Test case generation method and device
CN106951248B (en) Method and device for adding codes, readable storage medium and computing equipment
CN104067276A (en) Client-side minimal download and simulated page navigation features
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN112558967A (en) Page automatic generation method and device, electronic equipment and storage medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN111782207A (en) Method, device and equipment for generating task stream code and storage medium
CN111459504A (en) Intelligent contract processing method, device, equipment and storage medium
CN114461223A (en) Code generation method and device and terminal equipment
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN113238739A (en) Plug-in development and data acquisition method, device, electronic equipment and medium
CN111061522B (en) Method, device, equipment and storage medium for generating front-end card assembly based on back end
CN112988578A (en) Automatic testing method and device
US11288114B2 (en) Remote diagnostic of computing devices
US11182272B2 (en) Application state monitoring
CN115269285A (en) Test method and device, equipment and computer readable storage medium
CN115544950A (en) Constraint file importing method, device, equipment and storage medium
CN114253642B (en) System information processing method, device, electronic equipment and medium
CN110327626B (en) Virtual server creation method and device
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN111078570A (en) Parameter format detection method, device, equipment and medium based on interface framework
CN111176718A (en) Script online method and device, storage medium and electronic equipment

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