CN108416023B - Method for simulating user operation to write back system data - Google Patents
Method for simulating user operation to write back system data Download PDFInfo
- Publication number
- CN108416023B CN108416023B CN201810189094.XA CN201810189094A CN108416023B CN 108416023 B CN108416023 B CN 108416023B CN 201810189094 A CN201810189094 A CN 201810189094A CN 108416023 B CN108416023 B CN 108416023B
- Authority
- CN
- China
- Prior art keywords
- data
- user
- simulating
- write
- original
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2372—Updates performed during offline database operations
Abstract
The application relates to the technical field of system data write-back, in particular to a method for simulating user operation to write back system data. Updating a non-main key field information unit outside the system based on original system data, assembling HTTP form submission message information by expanding a browser kernel based on an HTTP protocol according to system front and back platform interaction specifications and simulating request operation of a system login user page information submission form, and automatically realizing comparison updating operation of data in the system and external data. The invention can realize the automatic update of the system data without accessing the data interface or the database in the authority range of the system user, provides single or batch update operation of the system service operation user on the error and abnormal data in the system in a safe network environment, and avoids the integrated interface work among complex systems in the standard authority range of the user data.
Description
Technical Field
The application relates to the technical field of system data write-back, in particular to a method for simulating user operation to write back system data.
Background
With the rapid development and wide application of information technology, especially internet and mobile application technology, the informatization degree of enterprises and public institutions is greatly improved, and most of mobile applications of various business systems are put into practical application. Collaborative business, mobile field operation or offline operation have been widely applied in a plurality of industry fields, in particular to the business fields of monitoring, investigation, general investigation and the like of electric power, water affairs and the like. At present, objective reasons such as geographic environment and data security standard requirements or data updating of a system or integration among systems are not established, particularly, the integration among systems relates to coordination among a plurality of business systems (departments and manufacturers), joint debugging tests and other work, the requirements of the business systems cannot be met frequently in time, write-back updating operation outside the system (off-line data and other system data) can be realized by manual indirect participation, and if a coordination system establishing party is directly connected with a database to realize data write-back updating, the mode is limited by manufacturers and has risks such as insecurity.
The system data write-back updating operation comprises a page layer, a service layer and a database layer, the page layer adopts a user login system, and manually selects a data attachment to be written back to submit a page form to realize the data write-back operation. The data write-back of the service layer is realized through an interface, a system is required to provide a service interface, WebService integrated interface communication is commonly used, the defects that a detailed interface is required to be provided for the system, the service layer service of the system is exposed, and the integration work needs to coordinate the development interface of a system builder; the write-back operation of the data layer directly opens the user right of the database, and the write-back updating operation of the data is realized through database statements, so that the method is safe, uncontrollable and rarely used.
Disclosure of Invention
The application provides a method for simulating user operation to write back system data, which aims to solve the problems in the prior art.
Therefore, the invention provides the following technical scheme: a method for simulating user operation to write back system data is characterized by comprising the following steps:
acquiring original data of an original system, storing the original data in a corresponding database, and marking and determining key primary key values of the data;
according to the acquired data, modifying the non-primary key field of the data outside the system;
logging in an original system by a real legal user according to the function and the data authority;
simulating the modification operation of the trigger information of the user, and analyzing the page form information;
assembling HTTP message information according to page form information based on an HTTP protocol;
simulating the data updating form submission request operation of a user, acquiring the communication between the front-end page and the background system service, and realizing the system data write-back updating operation according to the main key field relation.
Further, in the step 'acquiring the function and the data authority according to the fact that the real legal user logs in the original system', the judgment standard of the real legal user is to judge whether the user name and the password pass or not.
Furthermore, the step 'obtaining original system original data and storing corresponding database, and marking and determining key primary key values of data' is carried out, and the method for obtaining original system original data is to derive target data from the database through the system.
Further, the step of acquiring the function and the data authority according to the fact that the real legal user logs in the original system includes:
and simulating the user to log in the system according to the data exported, and recording the client information of the user.
Furthermore, in the step 'simulating the modification operation of the trigger information of the user and analyzing the page form information', the page form information comprises the form information of an input box, a single selection/check box and a pull-down selection box of the page form.
Further, the step is based on an HTTP protocol, and HTTP message information is assembled according to page form information, wherein the HTTP message information consists of a request line, a request header, an empty line and request data; the request data is modified data obtained by modifying the non-primary key field of the data outside the system according to the acquired data.
Further, after the step 'modifying the non-primary key field of the data outside the system according to the acquired data', the method further comprises the following steps: HTPP connection is carried out through simulating user login operation, analyzing a page form, organizing page form information, simulating a user form submission request and an original background service to finish data write-back updating operation.
The technical scheme provided by the application comprises the following beneficial technical effects: the invention provides a method for simulating data write-back system (B/S architecture) of user operation, which is based on a universal HTTP protocol message request to establish connection, realizes data write-back operation according to the former system front and back stage interaction specification, user function and data authority, ensures safety specification, and particularly avoids the normal (such as offline data) write-back service requirement operation from being restricted by various constraints of the former system developer under the condition that the former system function is not supported.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a schematic flowchart of a method for simulating a user to operate write-back system data according to an embodiment of the present disclosure.
Fig. 2 is a logic design diagram of a data write-back method for simulating a user to operate a method for writing back system data according to an embodiment of the present disclosure.
Fig. 3 is a data write-back update operation data flow diagram of a method for simulating user operation of writing back system data according to an embodiment of the present application.
Detailed Description
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
As shown in fig. 1, this embodiment introduces a method for simulating user operation to write back system data:
And 200, modifying the non-primary key field of the data, and modifying the data systematically or manually according to actual requirements, such as finishing the acquisition and modification of the data by field operation of offline data.
And step 300, logging in the original system by a real legal user, acquiring functions and data authority, simulating the logged system by the user derived from the data, and recording information such as session and the like related to the client.
The method for simulating the user operation to write back the system data is based on a universal HTTP protocol, and establishes connection according to the interactive specification of the foreground and the background of the system; meanwhile, the system logs in the functions and data authority acquired by the system based on the real user information of the system, and the operation meets the specification; the invention aims to provide an automatic data updating method for simulating a user operation form submission request when a plurality of production business systems submit write-back updating data without interface integration and accessories, which realizes the interaction specification and user permission based on the foreground and background of the system, and has safe and convenient use and strong practicability.
FIG. 2 is a logic diagram of a data write-back method.
Specifically, the logic design of the data write-back method is mainly that after data modification is completed after original system data is acquired, HTPP connection is performed through simulating user login operation, analyzing page forms, organizing page form information, simulating user form submission requests and original background services by using the key step technology of the method to complete data write-back updating operation, and the detailed logic process is as follows:
the method comprises the steps of firstly, acquiring original system data, wherein the acquired original system data logic design is a logic description of step 100 in the figure 1, the original system data acquisition mainly comprises a table structure, constraint conditions and row data content information, the original system data is a basis of a data write-back method and an evaluation basis of an execution result, the original data acquisition can be carried out by conventional system page list data export, integration synchronization or related interception for original system external storage (recommended database storage), and the data storage follows the principle that a data relation structure is consistent with an original system, particularly the consistency of a main key and an external key relation.
And step two, modifying data, wherein the modification of the obtained original system data logic design is a logic description of the step 200 in the figure 1, and the modification of the data of the fields of the non-main key and the external key outside the original system (the operation of a non-original system client or a display layer) is carried out according to the actual (on-site) service requirement, namely, the modification operation is carried out on the obtained line data.
Step three, data write-back operation, the logic design of which is the logic description of step 300, step 400 and step 500 in fig. 1, including simulating user login, analyzing page form, assembling page form message information, simulating user form submission request:
step 1, simulating user login, analyzing key field names and data formats related to login names, passwords, verification codes and the like in a request message and analyzing whether the login succeeds in a response message by grabbing a request and response message in a login process, simulating and packaging an HTTP request message based on the key words, sending the HTTP request message to a login verification service address, analyzing the response message, and judging whether the login succeeds, thereby realizing the simulation of the user login.
And step 2, analyzing a page form, which is mainly used for analyzing the process of request response message information of a specific business service, starting HTTP message capture service, executing one or more related functions to be analyzed on the local machine, and analyzing whether the request belongs to a POST or GET mode from the message capture service, wherein the submitted form contains specific field information and the service address information of the request. The format information in the response message, especially the query service, analyzes the format of the response message and defines the analysis method of the response message.
And step 3, assembling page form message information, analyzing a data field source of a submitted form based on analyzing page form results in step 2, collecting corresponding form information for information needing to be input by a user, starting corresponding program service according to a message format, assembling HTTP request messages, assembling data one by one according to key-value, and packaging response message information.
And step 4, simulating a user form submission request, automatically judging whether the access authority exists before the simulated form submission, if the access authority does not exist, executing one-time user login simulation to ensure that the current session passes the access verification, then sending related message information to a service request address according to the structure of a page form message, analyzing, storing and displaying a response message, and simulating the whole process of user login and business service request.
As shown in fig. 3, the data flow diagram is updated for data write back.
Specifically, after exporting the target write-back data of the original system, and after updating the data item outside the system (other systems or manual work), the original system is written back by the method of the invention to realize the update operation of the target data, and the data flow reporting process is as follows:
the first process is a data export process, which follows the data structure and constraint relation of the original system, data is exported to the outside of the system in a one-way mode and stored, and the data export process is irregular and is a one-time irregular and discontinuous one-way database export process in the modes of event triggering (page export button), database commands and the like.
And a second process, namely a data item updating process, wherein the data item updating process mainly carries out content adjustment updating on the data outside the field items of the constraint conditions such as non-primary keys, external keys and the like under the condition that the data derived in the first process follows a data relation constraint structure, and the data flow direction at the moment belongs to a pause state in terms of the data flow direction flowing process.
And thirdly, writing back the original system process, wherein the data write-back process realizes the unidirectional data flow direction updating the original system database data according to the user operation write-back method simulated by the invention, and the write-back data flow direction is that the process secondary suspension state data is based on the HTTP message information data flow of the browser according to the write-back method, follows the communication rule of the front background and the background of the original system, and performs the data information write-back updating of the database after unidirectional communication with the system background service.
The invention provides a method for simulating user operation to write back B/S system architecture data, which updates a non-main key field information unit outside a system on the basis of original system data, assembles HTTP form submission message information by expanding a browser kernel based on an HTTP protocol according to the interaction specification of a front background and a background of the system and simulating the request operation of logging in a user page information submission form by the system, and automatically realizes the comparison updating operation of data in the system and external data. The invention can realize the automatic update of the system data without accessing the data interface or the database in the authority range of the system user, provides single or batch update operation of the system business operation user on the error and abnormal data in the system in a safe network environment, avoids the complex inter-system integration interface work in the standard authority range of the user data, greatly improves the application value of the write back of the system data, and can effectively improve the work efficiency on the write back system after the off-line data is processed on site particularly under the condition that the system function is not supported or the network communication is not allowed.
It is noted that 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 an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
It will be understood that the present application is not limited to what has been described above and shown in the accompanying drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (7)
1. A method for simulating user operation to write back system data is characterized by comprising the following steps:
acquiring original data of an original system, storing the original data in a corresponding database, and marking and determining key primary key values of the data;
according to the acquired data, modifying the non-primary key field of the data outside the system;
logging in an original system by a real legal user according to the function and the data authority;
simulating the modification operation of the trigger information of the user, and analyzing the page form information;
assembling HTTP message information according to page form information based on an HTTP protocol;
simulating the data updating form submission request operation of a user, acquiring the communication between the front-end page and the background system service, and realizing the system data write-back updating operation according to the main key field relation.
2. The method for simulating user operation to write back system data according to claim 1, wherein in the step of ' obtaining functions and data authority ' based on logging in an original system by a real legal user ', the judgment standard of the real legal user is to judge whether a user name and a password pass or not.
3. The method for simulating write-back system data operated by a user according to claim 1, wherein the step of obtaining original system original data and storing the original system original data in a corresponding database, and marking and determining key primary key values of the data comprises the step of deriving target data from the database through the system.
4. The method of claim 1, wherein the step of obtaining the functions and data permissions according to the login of the original system with a real legal user comprises:
and simulating the user to log in the system according to the data exported, and recording the client information of the user.
5. The method for simulating user operation of write-back system data according to claim 1, wherein the step of simulating user's trigger information modification operation, parsing page form information includes form information of input box, single check/check box and pull-down selection box of page form.
6. The method for simulating write-back system data operated by a user according to claim 1, wherein the step of assembling HTTP message information according to page form information based on HTTP protocol, wherein the HTTP message information comprises a request line, a request header, a null line and request data; the request data is modified data obtained by modifying the non-primary key field of the data outside the system according to the acquired data.
7. The method for simulating user operation of writing back system data according to claim 1, wherein after the step of modifying the non-primary key field of the data according to the acquired data and outside the system, the method further comprises the steps of: HTPP connection is carried out through simulating user login operation, analyzing a page form, organizing page form information, simulating a user form submission request and an original background service to finish data write-back updating operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810189094.XA CN108416023B (en) | 2018-03-08 | 2018-03-08 | Method for simulating user operation to write back system data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810189094.XA CN108416023B (en) | 2018-03-08 | 2018-03-08 | Method for simulating user operation to write back system data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108416023A CN108416023A (en) | 2018-08-17 |
CN108416023B true CN108416023B (en) | 2021-09-28 |
Family
ID=63130291
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810189094.XA Active CN108416023B (en) | 2018-03-08 | 2018-03-08 | Method for simulating user operation to write back system data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108416023B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110020390A (en) * | 2019-04-11 | 2019-07-16 | 重庆猪八戒知识产权服务有限公司 | Data are submitted to method, system, terminal and the medium of third party website automatically |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102917020A (en) * | 2011-09-24 | 2013-02-06 | 国网电力科学研究院 | Mobile terminal based on data packet and method for synchronizing business system data |
CN104504160A (en) * | 2015-01-20 | 2015-04-08 | 中国地质大学(武汉) | Excel document online batch write-in method based on SSH frame |
CN106960007A (en) * | 2017-02-28 | 2017-07-18 | 北京京东尚科信息技术有限公司 | A kind of data-updating method, device and electronic equipment |
CN107402981A (en) * | 2017-07-07 | 2017-11-28 | 国网浙江省电力公司信息通信分公司 | A kind of data increment processing method and system based on distributed offline database |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9813515B2 (en) * | 2013-10-04 | 2017-11-07 | Akamai Technologies, Inc. | Systems and methods for caching content with notification-based invalidation with extension to clients |
-
2018
- 2018-03-08 CN CN201810189094.XA patent/CN108416023B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102917020A (en) * | 2011-09-24 | 2013-02-06 | 国网电力科学研究院 | Mobile terminal based on data packet and method for synchronizing business system data |
CN104504160A (en) * | 2015-01-20 | 2015-04-08 | 中国地质大学(武汉) | Excel document online batch write-in method based on SSH frame |
CN106960007A (en) * | 2017-02-28 | 2017-07-18 | 北京京东尚科信息技术有限公司 | A kind of data-updating method, device and electronic equipment |
CN107402981A (en) * | 2017-07-07 | 2017-11-28 | 国网浙江省电力公司信息通信分公司 | A kind of data increment processing method and system based on distributed offline database |
Non-Patent Citations (1)
Title |
---|
基于Hadoop的电网数据质量校验方法与验证系统;张志亮等;《计算机研究与发展》;20141231;第134-144页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108416023A (en) | 2018-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10007512B2 (en) | Bug clearing house | |
WO2019100576A1 (en) | Automated test management method and apparatus, terminal device, and storage medium | |
US6708173B1 (en) | Method and apparatus for multiple application trace streams | |
US8060863B2 (en) | Conformance control module | |
US20090177926A1 (en) | Incident simulation support environment | |
US10963370B2 (en) | Default mock implementations at a server | |
WO2021129335A1 (en) | Operation monitoring method and apparatus, operation analysis method and apparatus | |
US20080091775A1 (en) | Method and apparatus for parallel operations on a plurality of network servers | |
CN112818351A (en) | Industrial control system-oriented vulnerability priority analysis method, system, equipment and storage medium | |
US20210135959A1 (en) | Support ticket platform for improving network infrastructures | |
KR102226463B1 (en) | UI/UX solution providing server linked with process automation program, process automation method using the same, and computer program executing the same | |
US10713070B2 (en) | Systems and methods for capturing and visualizing user interactions across devices | |
CN115344888A (en) | Data access method and device, electronic equipment and storage medium | |
CN112256682A (en) | Data quality detection method and device for multi-dimensional heterogeneous data | |
CN108416023B (en) | Method for simulating user operation to write back system data | |
CN114185791A (en) | Method, device and equipment for testing data mapping file and storage medium | |
JPWO2014155718A1 (en) | Information processing apparatus and information processing system | |
WO2015067171A1 (en) | Debug debug method and apparatus | |
CN112491965A (en) | Monitoring data transmission method based on Kafka and Netty framework | |
US8538414B1 (en) | Mobile interaction with software test cases | |
CN112015715A (en) | Industrial Internet data management service testing method and system | |
CN109739754B (en) | Automatic testing method and system for application program based on WeChat development | |
US20230185869A1 (en) | Screen capture hint and automated screen capture | |
US20160063119A1 (en) | Test data reservation system | |
CN114490892A (en) | Data transmission method and device based on datax |
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 |