IP Library Granted Patent US 9,727,599
Granted Patent B2
US 9,727,599 · App. 14/518,350 · Granted Aug 8, 2017

Automatically correcting invalid scripts in web applications

Inventors: Yi Kong (Beijing, CN); Zi Yan Tu (Beijing, CN); Xi Ning Wang (Beijing, CN); Zhen Yu Xing (Beijing, CN); Qi Zhang (Beijing, CN)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F17/30371G06F17/30339G06F17/30864
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,727,599
App. No.
14/518,350
Granted
Aug 8, 2017
Kind
B2
Abstract

According to an aspect, a method for correcting an invalid script in a web application includes determining an invalid reference in an invalid script. A storage location is determined in a database corresponding to the invalid reference based on a data relationship mapping, wherein the data relationship mapping indicates the correspondence between the reference and a storage location in the database. An up-to-date value at the storage location is queried and the queried up-to-date value is determined to be the correct value of the invalid reference.

Claims (47)

1. A method for correcting an invalid script in a web application, comprising:

determining an invalid reference in an invalid script;

determining a storage location in a database corresponding to the invalid reference based on a data relationship mapping, in which the data relationship mapping indicates the correspondence between the reference and a storage location in the database;

querying an up-to-date value at the storage location;

determining the queried up-to-date value to be the correct value of the invalid reference;

searching a response corresponding to the invalid reference using the determined correct value to determine the location of the correct value in the response; and

creating a data correlation for the invalid reference according to the determined location and its context and updating an invalid data correlation corresponding to the invalid reference with the created data correlation, wherein the data correlation is determined by:

in response to creating a reference, determining a correspondence between the created reference and a storage location in the database; and

generating the data relationship mapping based on the determined correspondence by determining a correspondence between the created reference and a storage location in the database according to database statements caused by a request corresponding to the created reference for performing operations in the database and the actual value of the created reference, wherein the actual value of the created reference is included in a response corresponding to the created reference;

wherein determining a correspondence between the created reference and a storage location in the database according to database statements caused by a request corresponding to the created reference for performing operations in the database and the actual value of the created reference comprises:

determining a table related with the created reference in the database according to the database statements by:

filtering out all tables which non-insert statements involve from tables which the database statements involve in;

based on attribute of the created reference, filtering out tables unrelated with the created reference from the remaining tables; and

determining the finally remaining table as the table related with the created reference; and

traversing the table using the actual value of the created reference to determine a matched column.

2. An apparatus for correcting an invalid script in a web application comprising:

a memory having computer readable instructions; and

a processor for executing the computer readable instructions, the computer readable instructions including:

determining an invalid reference in an invalid script;

determining a storage location in a database corresponding to the invalid reference based on a data relationship mapping, in which the data relationship mapping indicates the correspondence between the reference and a storage location in the database;

querying an up-to-date value at the storage location;

determining the queried up-to-date value to be the correct value of the invalid reference

searching a response corresponding to the invalid reference using the determined correct value to determine the location of the correct value in the response; and

creating a data correlation for the invalid reference according to the determined location and its context and updating an invalid data correlation corresponding to the invalid reference with the created data correlation, wherein the data correlation is determined by:

in response to creating a reference, determining a correspondence between the created reference and a storage location in the database; and

generating the data relationship mapping based on the determined correspondence by determining a correspondence between the created reference and a storage location in the database according to database statements caused by a request corresponding to the created reference for performing operations in the database and the actual value of the created reference, wherein the actual value of the created reference is included in a response corresponding to the created reference;

wherein determining a correspondence between the created reference and a storage location in the database according to database statements caused by a request corresponding to the created reference for performing operations in the database and the actual value of the created reference comprises:

determining a table related with the created reference in the database according to the database statements by:

filtering out all tables which non-insert statements involve from tables which the database statements involve in;

based on attribute of the created reference, filtering out tables unrelated with the created reference from the remaining tables; and

determining the finally remaining table as the table related with the created reference; and

traversing the table using the actual value of the created reference to determine a matched column.

3. A computer program product for correcting an invalid script in a web application, the computer program product comprising computer readable storage medium having program instructions embodied therewith, wherein the computer readable storage medium is not a transitory signal per se, the program instructions executable by a computer to cause the computer to perform a method comprising:

determining an invalid reference in an invalid script;

determining a storage location in a database corresponding to the invalid reference based on a data relationship mapping, wherein the data relationship mapping indicates the correspondence between the reference and a storage location in the database;

querying an up-to-date value at the storage location;

determining the queried up-to-date value to be the correct value of the invalid reference;

searching a response corresponding to the invalid reference using the determined correct value to determine the location of the correct value in the response; and

creating a data correlation for the invalid reference according to the determined location and its context and updating an invalid data correlation corresponding to the invalid reference with the created data correlation, wherein the data correlation is determined by:

in response to creating a reference, determining a correspondence between the created reference and a storage location in the database; and

generating the data relationship mapping based on the determined correspondence by determining a correspondence between the created reference and a storage location in the database according to database statements caused by a request corresponding to the created reference for performing operations in the database and the actual value of the created reference, wherein the actual value of the created reference is included in a response corresponding to the created reference;

wherein determining a correspondence between the created reference and a storage location in the database according to database statements caused by a request corresponding to the created reference for performing operations in the database and the actual value of the created reference comprises:

determining a table related with the created reference in the database according to the database statements by:

filtering out all tables which non-insert statements involve from tables which the database statements involve in;

based on attribute of the created reference, filtering out tables unrelated with the created reference from the remaining tables; and

determining the finally remaining table as the table related with the created reference; and

traversing the table using the actual value of the created reference to determine a matched column.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 20, 2014
From: KONG, YI; TU, ZI YAN; WANG, XI NING; XING, ZHEN YU; ZHANG, QI
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 033984/0274 →
Priority Claims (1)
CN 2013 1 0532298 · Oct 30, 2013 · national
Continuity (1)
Related Publication 20150120678A1 · Apr 30, 2015