CN108664341B - Data processing method, data processing device, computer equipment and storage medium - Google Patents

Data processing method, data processing device, computer equipment and storage medium Download PDF

Info

Publication number
CN108664341B
CN108664341B CN201810355481.6A CN201810355481A CN108664341B CN 108664341 B CN108664341 B CN 108664341B CN 201810355481 A CN201810355481 A CN 201810355481A CN 108664341 B CN108664341 B CN 108664341B
Authority
CN
China
Prior art keywords
data
item
terminal
session
server
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
CN201810355481.6A
Other languages
Chinese (zh)
Other versions
CN108664341A (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201810355481.6A priority Critical patent/CN108664341B/en
Publication of CN108664341A publication Critical patent/CN108664341A/en
Application granted granted Critical
Publication of CN108664341B publication Critical patent/CN108664341B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application relates to a data processing method, a data processing device, computer equipment and a computer readable storage medium. The method comprises the following steps: the method comprises the steps of obtaining a data request, obtaining third-party data from a third-party server according to the data request, obtaining candidate data from the third-party data and local data of the server according to the data request, saving the candidate data in a session, sending the candidate data to a terminal, receiving an item identifier and a corresponding numerical value submitted by the candidate data, obtaining item content corresponding to the item identifier and the numerical value from the session by the terminal, and saving the item identifier and the corresponding item content. Because the project content corresponding to the numerical value can be obtained from the candidate data saved in the session and saved, the saved project content can be directly obtained when the project is checked again, and the consistency of the data is ensured.

Description

Data processing method, data processing device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a data processing method, an apparatus, a computer device, and a computer-readable storage medium.
Background
With the development of internet technology, the phenomenon of collecting user information through internet web pages is more and more common. The form in the webpage can be used for collecting data, the data can be from a server corresponding to the webpage or from a third-party server, when the form data comes from the third-party server, the data can be pulled to the third-party server through programming by the browser, and the data can also be pulled from the third-party server by the server and then returned to the browser. And after the user fills in the form, the browser sends the form data to the server through the Internet for processing and storing.
However, data submitted by the browser and content presented are often inconsistent, and usually the data actually submitted is a form value corresponding to the content presented. For example, when the presentation of the form is a month, the data submitted by the browser may be the form value 1. When a user needs to check the third-party data of the form, the server needs to acquire the data from the third-party server again, the data contents corresponding to the form value in the two requests of the server are inconsistent, and the problem that the submitted and checked data are inconsistent exists.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data processing method, an apparatus, a computer device and a computer readable storage medium capable of achieving data consistency.
A method of data processing, the method comprising:
the server acquires a data request and acquires third-party data from a third-party server according to the data request;
the server acquires candidate data from the third-party data and the local data of the server according to the data request, stores the candidate data in a session, and sends the candidate data to a terminal;
the server receives the item identification submitted by the terminal according to the candidate data and the corresponding numerical value;
and the server acquires the project content corresponding to the project identification and the numerical value from the session and stores the project identification and the corresponding project content.
In one embodiment, the method further comprises:
acquiring a viewing request containing a project identifier sent by the terminal;
and acquiring the item content corresponding to the item identifier from the session according to the viewing request, and returning the item content to the terminal.
In one embodiment, the method further comprises:
receiving a data acquisition request of a terminal;
searching local data of the server according to the item identifier in the data acquisition request;
and when the server does not have the project data corresponding to the project identification, executing the step of acquiring the third-party data from the third-party server according to the data request.
In one embodiment, the method further comprises:
acquiring a session invalidation instruction;
and clearing the session corresponding to the session identifier according to the session identifier in the session invalidation command.
In one embodiment, the obtaining the session deactivation instruction includes:
and if the message corresponding to the session identifier is not received after the preset time length is detected, generating a session invalidation instruction containing the session identifier.
A method of data processing, the method comprising:
the method comprises the steps that a terminal sends a data request to a server, wherein the data request is used for indicating that local data are obtained from the server, third-party data are obtained from a third-party server through the server, candidate data are obtained from the third-party data and the local data of the server according to the data request, and the candidate data are stored in a conversation between the server and the terminal;
the terminal receives candidate data returned by the server;
and the terminal submits an item identifier and a corresponding numerical value to the server according to the candidate data, wherein the item identifier and the corresponding numerical value are used for indicating to acquire item content corresponding to the item identifier and the numerical value from the session and storing the item identifier and the corresponding item content.
A method of data processing, the method comprising:
the terminal acquires a data request, acquires third-party data from a third-party server according to the data request, and acquires local data from the server;
the terminal acquires corresponding numerical values according to the item marks and the item contents selected by the third-party data and the local data and according to the item marks and the item contents;
and the terminal uploads the project identification, the project content and the corresponding numerical value to the server and stores the project identification, the project content and the corresponding numerical value.
A data processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring a data request and acquiring third-party data from a third-party server according to the data request;
the sending module is used for acquiring candidate data from the third-party data and the local data of the server according to the data request, storing the candidate data in a session and sending the candidate data to the terminal;
the receiving module is used for receiving the item identification submitted by the terminal according to the candidate data and the corresponding numerical value;
and the storage module is used for acquiring the item content corresponding to the item identifier and the numerical value from the session and storing the item identifier and the corresponding item content.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a data request, and acquiring third-party data from a third-party server according to the data request;
acquiring candidate data from the third-party data and local data of the server according to the data request, storing the candidate data in a session, and sending the candidate data to the terminal;
receiving the item identification submitted by the terminal according to the candidate data and the corresponding numerical value;
and acquiring the project content corresponding to the project identification and the numerical value from the session, and storing the project identification and the corresponding project content.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a data request, and acquiring third-party data from a third-party server according to the data request;
acquiring candidate data from the third-party data and local data of the server according to the data request, storing the candidate data in a session, and sending the candidate data to the terminal;
receiving the item identification submitted by the terminal according to the candidate data and the corresponding numerical value;
and acquiring the project content corresponding to the project identification and the numerical value from the session, and storing the project identification and the corresponding project content.
According to the data processing method, the data processing device, the computer equipment and the computer readable storage medium, third party data are obtained from a third party server through the obtained data request, candidate data are obtained from the third party data and local data according to the data request, the candidate data are stored in a session and are sent to the terminal, the item identification submitted by the terminal and the corresponding numerical value are received, item content corresponding to the item identification and the numerical value is obtained from the session, and the item content corresponding to the item identification and the numerical value can be stored. Because the project content corresponding to the numerical value can be obtained from the candidate data saved in the session and saved, the saved project content can be directly obtained when the project is checked again, and the consistency of the data is ensured.
Drawings
FIG. 1 is a diagram of an application environment of a data processing method in one embodiment;
FIG. 2 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 3 is a schematic flow diagram that illustrates the steps of viewing the content of an item in one embodiment;
FIG. 4 is a schematic diagram illustrating a process for obtaining data according to a data request in one embodiment;
FIG. 5 is a flow diagram that illustrates the steps of clearing a session, in one embodiment;
FIG. 6 is a flow chart of steps of a data processing method in another embodiment;
FIG. 7 is a timing diagram of a data processing method in one embodiment;
FIG. 8 is a block diagram showing the structure of a data processing apparatus according to an embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The data processing method provided by the application can be applied to the application environment shown in fig. 1. Wherein the server 104 communicates with the terminal 102 and the third party server 106 over a network. The server 104 may provide computing services to the terminal 102 in response to server requests by the terminal 102. The server 104 acquires a data request of the terminal 102, acquires third-party data from the third-party server 106 according to the data request, the server 104 acquires candidate data according to the third-party data and the local data, stores the stored data in a session and sends the stored data to the terminal 102, receives an item identifier and a corresponding numerical value submitted by the terminal 102 according to the candidate data, acquires item content corresponding to the item identifier and the numerical value from the session, and stores the item identifier and the corresponding content. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 and the third-party server 106 may be implemented by independent servers or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a data processing method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
step 202, acquiring a data request, and acquiring third-party data from a third-party server according to the data request.
The data request may be initiated by the terminal through a web browser, or may be initiated by the terminal through an APP (Application) client. A web browser is an application for displaying files in a server or a file system, and enabling an end user to interact with the files, and quickly and easily browse various information, and is used to display text, images, and other information in the world wide web, a local area network, or the like. These words and images can be hyperlinks connecting other web sites. Specifically, the data required to be acquired in the data request initiated by the terminal may exist in the server or may exist in the third-party server. The data request may contain information such as the type of data that the terminal needs to obtain, the item to which the data belongs, and the like. The third-party data refers to data acquired by the server from a third-party server according to a data request initiated by the terminal. The third party server may be a database server, a file server, an application server, a web server, or the like.
After the terminal sends a data request to the server according to the requirement, the server searches corresponding data according to the acquired data request, and when the data required to be acquired in the data request does not exist in the data of the server, the server acquires third-party data from a third-party server according to the data request.
And step 204, acquiring candidate data from the third-party data and the local data of the server according to the data request, storing the candidate data in a session, and sending the candidate data to the terminal.
The local data refers to corresponding data which is searched by the server from the server according to the data request when the data required in the data request has data stored in the server. The third-party data acquired by the server from the three-party server according to the data request may include data required to be acquired by the terminal, and may also include other additional data besides the data required to be acquired by the terminal. For example, when the data request initiated by the terminal is the gender of the person, the third-party data acquired by the server may include the gender of the person, and may also include other information such as the age and height of the person. The candidate data refers to specific data required to be acquired in the terminal data request. The candidate data includes information such as item identification of the data, item content, and a numerical value corresponding to the item content. For example, in the above example, if the specific data required to be obtained in the terminal data request is a person name and a person gender, the server searches for the person name and analyzes the person gender from the third-party data to obtain candidate data, and the candidate data may include person name items with item contents of small a, small B and small C and corresponding numerical values of 1, 2 and 3, and person gender items with item contents of male and female and corresponding numerical values of 0 and 1. Session (session) is a software object that stores the attributes and configuration information required for a particular end-user session, and is often used to store user preferences. When the web pages of the application program jump, the variables stored in the session can exist in the whole user session of the terminal and cannot be lost. When an end user requests a web page from an application, the web server will automatically create a session object if the end user has no session, and the server will terminate the session when it expires or is abandoned.
The server acquires candidate data required to be acquired by the terminal from third-party data and local data acquired by the third-party server according to the data request, stores the candidate data in a session corresponding to the terminal and sends the session to the terminal, and when the server does not have the corresponding session, a terminal session is created and the candidate data is stored in the created terminal session.
Step 206, receiving the item identifier and the corresponding numerical value submitted by the terminal according to the candidate data.
The item identification refers to the unique identification of the item submitted by the terminal in the terminal data. The items may be selection items (including check items and single-choice items), text items, multi-line text items, and the like. Specifically, the project may be determined according to a specific business logic or business requirements. For example, when the data request of the terminal is a personal information data request, the corresponding item may be a name text item, a gender checklist item, a preference checklist item, or the like. The data submitted by the terminal may contain one or more items. The numerical value corresponding to the item identifier refers to the item content corresponding to the item content selected by the terminal user according to the item. For example, one os project includes three project contents, that is, centOS7, windows Server, and Ubuntu, and the corresponding numerical values are 1, 2, and 3, respectively, and when the project content selected by the end user is Ubuntu, the numerical value corresponding to the os project is 3.
And after the receiving terminal of the server selects according to the item content of the candidate data item, submitting the item identification corresponding to the item and the numerical value corresponding to the item content selected by the item.
Step 208, acquiring the item content corresponding to the item identifier and the value from the session, and saving the item identifier and the corresponding item content.
The item content refers to data content actually displayed by the terminal. Specifically, in one selection item, the item content is the item content of the selectable item. For example, in an operating system selection item, the item content may be a windows system, a Linux system, an IOS system, or the like.
And the server searches a corresponding item from the candidate data stored in the session according to the item identifier and the corresponding numerical value submitted by the terminal, and stores the item identifier and the corresponding item content according to the item identifier and the item content corresponding to the numerical value in the numerical matching item.
According to the data processing method, third-party data are obtained from a third-party server according to an obtained data request, candidate data are obtained from the third-party data and local data and stored in a session and sent to a terminal, an item identifier and a corresponding numerical value submitted by the terminal are received, item content corresponding to the item identifier and the numerical value is obtained from the session, and the item identifier and the corresponding item content are stored. Because the project identification and the project content corresponding to the numerical value can be obtained according to the session for storage, the condition that the viewed and submitted project content are the same can be ensured, the problem that the project content corresponding to the numerical value is inconsistent with the submitted project content due to the problem of data timeliness when the server acquires the data from the third-party server again when the user views the third-party data of the form is avoided, and the data consistency is realized.
As shown in fig. 3, in one embodiment, a data processing method is further provided, which includes:
step 302, obtaining a viewing request containing an item identifier sent by a terminal.
The viewing request refers to a viewing request for data submitted by the terminal. The viewing request sent by the terminal may contain one or more item identifications. The viewing request sent by the terminal comprises information such as item identification of the item to be viewed, terminal session identification and the like.
The server obtains the terminal initiation through the network and includes the viewing request of the project label.
And step 304, acquiring the item content corresponding to the item identifier from the session according to the viewing request, and returning the item content to the terminal.
The server obtains the project identification from the viewing request according to the viewing request sent by the terminal, searches the project corresponding to the project identification from the project identification stored in the server in a session according to the project identification, obtains the project content of the project, and sends the project content to the terminal.
The item content corresponding to the item identifier is searched from the session through the viewing request containing the item identifier sent by the terminal, so that the viewed item content is consistent with the submitted item content, and the data consistency is realized.
As shown in fig. 4, in one embodiment, a data processing method is further provided, which includes:
step 402, receiving a data acquisition request of a terminal.
The data required to be acquired in the data request initiated by the terminal may exist in the server or a third-party server. The data request may contain information such as the type of data that the terminal needs to obtain, the item to which the data belongs, and the like.
And the server receives a data acquisition request sent by the terminal.
And step 404, searching the local data of the server according to the item identifier in the data acquisition request.
The data acquisition request comprises an item identifier of an item to which the data to be acquired by the terminal belongs. The local data of the server refers to data stored in a memory, a database, or the like of the server.
The server can search the item corresponding to the item identifier in the local data of the server according to the item identifier in the data request, and acquire the required data from the item.
And 406, when the server does not have the project data corresponding to the project identification, executing the step of acquiring the third party data from the third party server according to the data request.
The item data corresponding to the item identifier is an item content in the item corresponding to the item identifier and a numerical value corresponding to the item content.
When the server does not have the item data corresponding to the item identifier, that is, the server does not have the item corresponding to the item identifier in the local data of the server, or the item corresponding to the item identifier in the local data of the server does not have the item data, the server sends a third-party data acquisition request to a third-party server according to the data request and the item identifier in the data request, and acquires the third-party data returned from the third server.
The server searches item data of items corresponding to the item identifiers in the local data according to the item identifiers in the data acquisition request sent by the terminal, and acquires third-party data corresponding to the item identifiers from a third-party server when the item data corresponding to the item identifiers does not exist in the local data.
As shown in fig. 5, in one embodiment, a data processing method is further provided, which includes:
step 502, a session invalidation command is obtained.
A session failure is a session expiration or a session being terminated. The session is terminated by closing the network connection between the terminal and the server, closing the webpage between the terminal browser and the server, and the like. The session invalidation command may be initiated by the terminal or generated by the server.
The server may obtain a session invalidation command initiated by the terminal or generated by the server.
And step 504, removing the session corresponding to the session identifier according to the session identifier in the session invalidation instruction.
The session identification refers to a unique identification of the session. A plurality of different sessions can exist in the server at the same time, and the corresponding sessions can be operated according to the session identifications of the different sessions. The clearing of the session corresponding to the session identifier comprises a request for candidate data (including third-party data and local data) saved in the session, clearing of the item identifier saved in the session and item content corresponding to the item identifier, clearing of the session identifier and the session, and the like.
And when the session is invalid, the server removes the session corresponding to the session identifier according to the session identifier in the session invalidation instruction.
In one embodiment, in a data processing method, the step of obtaining a session deactivation instruction further includes: and generating a session invalidation instruction containing the session identifier if the message corresponding to the session identifier is not received after the preset time length is detected.
The preset duration can be determined according to specific service requirements. For example, the preset time period may be 30 minutes, 2 hours, one day, etc., without being limited thereto. The message corresponding to the session identifier refers to a message sent by a terminal of the session corresponding to the session identifier.
And when the distance between the sending time of the message corresponding to the session identifier and the current time exceeds the preset time length, the server generates a session invalidation instruction containing the session identifier, and clears the session corresponding to the session identifier in the server according to the session invalidation instruction.
By detecting that the message corresponding to the session identifier is not received after the preset time length is exceeded, the session corresponding to the session identifier can be cleared, the memory consumption of the server is reduced, and the consistency of data submitted and checked by the terminal is ensured.
In one embodiment, a data processing method is provided, which is described by taking the application of the method to the terminal in fig. 1 as an example, and includes the following steps:
sending a data request to the server, wherein the data request is used for indicating to acquire local data from the server, acquiring third-party data from a third-party server through the server, acquiring candidate data from the third-party data and the local data of the server according to the data request, and storing the candidate data in a session between the server and the terminal.
And receiving the candidate data returned by the server.
The candidate data includes information such as item identification of the data, item content, and a numerical value corresponding to the item content. For example, in the above example, if the specific data required to be obtained in the terminal data request is a person name and a person gender, the server searches for the person name and analyzes the person gender from the third-party data to obtain candidate data, and the candidate data may include person name items with item contents of small a, small B and small C and corresponding numerical values of 1, 2 and 3, and person gender items with item contents of male and female and corresponding numerical values of 0 and 1.
And submitting the item identification and the corresponding numerical value to the server according to the candidate data, wherein the item identification and the corresponding numerical value are used for indicating to acquire the item content corresponding to the item identification and the numerical value from the session, and storing the item identification and the corresponding item content.
And the terminal user selects the item content corresponding to the item identifier according to the item identifier of the candidate data and the item content, acquires the numerical value corresponding to the item content according to the item content selected by the terminal user, and sends the item identifier and the corresponding data to the server. In the above example, when the terminal selects that the item content of the personal sex item is male, the value corresponding to the item content is 0, and the terminal transmits the item identifier of the personal sex item and the corresponding value 0 to the server through the network.
In one embodiment, a data processing method is provided, which further includes: and initiating a viewing request containing the project identification to the server, and receiving the project content returned by the server, wherein the project content is the project content which is obtained by the server from the session and corresponds to the project identification.
The terminal sends a viewing request to the server, the viewing request comprises an item identifier corresponding to an item to be viewed, and the terminal receives the item content of the item corresponding to the item identifier, which is acquired by the server according to the item identifier. The terminal can receive the project content corresponding to the project identification stored by the server, and the project content does not need to be acquired again from the third-party server, so that the consistency of viewing and submitted data can be ensured.
In one embodiment, a data processing method is provided, which further includes: the terminal quits or cancels the session information, or does not initiate the request of the session when the preset time length is exceeded, and the service generates a session failure instruction for clearing the session according to the quitting, the logout or the request that the preset time length is exceeded and the session is not received. The terminal may exit the session by closing the terminal browser, the client, a web page of the browser session, logging off the terminal user's login, etc. The clearing of the session comprises a request for candidate data (including third-party data and local data) saved in the session, clearing of an item identifier saved in the session and item content corresponding to the item identifier, clearing of the session identifier and the session and the like.
In one embodiment, a data processing method is provided, as shown in fig. 6, and is described by taking the example that the method is applied to the terminal in fig. 1, and includes the following steps:
step 602, obtaining a data request, obtaining third-party data from a third-party server according to the data request, and obtaining local data from the server.
The data request may be generated by the user by clicking a button on the display screen or by the user pressing a control on the touch screen. The data request includes information such as the type of data that the terminal needs to acquire and the item to which the data belongs. Specifically, the data required to be acquired in the data request may exist in the server or may exist in a third-party server. The terminal may determine whether the data exists in the server or the third-party server according to the item to which the data required to be acquired in the data request belongs. Therefore, the terminal can respectively acquire the third-party data and the local data from the third-party server and the server according to the item identifier of the data request.
And step 604, acquiring corresponding numerical values according to the item identifications and the item contents selected by the third-party data and the local data.
The items may be selection items (including check items and single-choice items), text items, multi-line text items, and the like. The item identification is a unique identification in the third party data and the local data for distinguishing different items. The item content refers to data content displayed by the terminal. The item identifier and the value corresponding to the item refer to the item content corresponding to the item selected by the terminal user according to the item and the value corresponding to the item content.
And the terminal selects the item content of the item identification according to the acquired third-party data and the local data, and acquires a numerical value corresponding to the item content after determining the selected item identification and the item content.
And 606, uploading the item identification, the item content and the corresponding numerical value to a server and storing.
After the terminal uploads the item identifier, the item content and the corresponding numerical value to the server, the server needs to analyze the item identifier, the item content and the corresponding numerical value uploaded to the third-party data by the terminal according to the data storage format of the server, and convert the item identifier, the item content and the corresponding numerical value into data with the same data storage format as the server.
The terminal uploads the project identification, the project content and the corresponding numerical value to the server, and the server analyzes and stores the project identification, the project content and the corresponding numerical value uploaded by the terminal.
The method comprises the steps of obtaining a data request through a terminal, obtaining third-party data from a third-party server according to the data request, obtaining local data from the server, selecting a project identifier and project content according to the third-party data and the local data, obtaining a corresponding numerical value, uploading the project identifier, the project content and the corresponding numerical value to the server, and storing the project identifier, the project content and the corresponding numerical value. The terminal can upload the project content and the corresponding numerical value to the server for storage, so that the project content can be directly obtained from the server when the terminal views the project again, the data does not need to be pulled to the third-party server again, and the consistency of the data is ensured.
Fig. 7 is a timing chart illustrating the application of the data processing method to form data processing according to an embodiment. The specific steps for implementing the data processing method are as follows:
firstly, a web server acquires a form data request, and acquires third-party data from a third-party server according to the form data request. Forms are components of a web page that are responsible for data collection functions. The form consists of three basic components: a form label containing a URL of a CGI program used for processing form data and a method for submitting the data to a server; form fields containing text boxes, password boxes, hidden fields, multi-line text boxes, check boxes, radio boxes, and the like; and form buttons used for transmitting data to the CGI script acquisition cancel input on the server, wherein the form buttons comprise a submit button, a reset button and a general button, and can also be used for controlling other processing work which is specified in the processing script. When a selected item (single-choice or multi-choice) appears in the form, candidate data in the form needs to be listed, and the candidate data, namely form initialization data, can come from a webpage server of the webpage itself or from other systems, namely a third-party server. The form data request may be initiated by the terminal through a web browser.
Optionally, the web server obtains a data request sent by the terminal, searches local data of the server according to the item identifier in the form data request, and obtains third-party data corresponding to the item identifier from a third-party server when the server does not have the item data corresponding to the item identifier.
And then, the web server acquires form initialization data from the third-party data and the local data of the web server according to the form data request, stores the form initialization in the session and sends the form initialization to the terminal. The local data refers to corresponding data which is searched by the web server from the server according to the data request when the data required in the form data request has data of the web server. The third-party data acquired by the web server from the three-party server according to the form data request may include data required to be acquired by the terminal, and may also include other additional data besides the data required to be acquired by the terminal. And the webpage server receives the third-party data, analyzes the third-party data into a data format required by the webpage, generates form initialization session data with the local data, stores the form initialization session data into a session and sends the session data to the terminal. For example, a form data request sent by a terminal includes a date item and a weather item, the date item exists in a web server, the weather item is in other systems, the web server obtains third-party data including the weather item from a third-party server, wherein the third-party data further includes an address item, the web server obtains the third-party data, then analyzes the third-party data of the weather item from the third-party data, generates form initialization session data with the date item in the local data, stores the form initialization session data in a session, and sends the form initialization session data to the terminal. Session (session) is a software object that stores the attributes and configuration information required for a particular end-user session, and is often used to store user preferences. When the web pages of the application program jump, the variables stored in the session can exist in the whole user session of the terminal and cannot be lost. When an end user requests a web page from an application, the web server will automatically create a session object if the end user has no session, and the server will terminate the session when it expires or is abandoned.
Then, the receiving terminal submits the item form value according to the form initialization data. The form initialization data includes information such as form items, form item contents, and form values corresponding to the item contents. The items may be selection items (including check items and single-choice items), text items, multi-line text items, and the like. Specifically, the project may be determined according to a specific business logic or business requirements. The item form value refers to the item content corresponding to the item selection of the terminal user according to the item and the numerical value corresponding to the item content. For example, if one os project includes three project contents, that is, centOS7, windows Server, and Ubuntu, the project list values are 1, 2, and 3, respectively, and if the project content selected by the end user is Ubuntu, the os project list value is 3.
And then, searching the form item content corresponding to the item form value from the session and storing the form item content. The form item content refers to data content actually displayed by the terminal. Specifically, in one selection item, the form item content is the item content of the selectable item. For example, in the above example, if the submitted item form value is 3, the web server searches, according to the submitted item form value, the Ubuntu, which is the content of the form item having the item form value of 3, in the corresponding operating system item.
Optionally, the web server may further obtain a request for viewing the form content sent by the terminal, read the stored form item content from the session, and return the form item content to the terminal. The request for viewing the form content comprises an item identifier of an item to be viewed, and the web server can search the form item content of the corresponding item according to the item identifier. For example, if the request for viewing the form content sent by the terminal is a content viewing request of a weather item, the web server may obtain the weather item content as a sunny day by viewing the stored item content of the weather item, and return the obtained weather form item content to the terminal in the sunny day.
Optionally, the web server may further obtain a session invalidation instruction, and remove the session corresponding to the web server according to the session invalidation instruction. The session invalidation command may be generated by the web server according to a logout or logout operation of the terminal. Specifically, the session invalidation instruction may be generated by the web server according to an operation of the terminal actively logging out of the login server, or may be generated according to an operation of the terminal closing a web page of the web browser or closing the browser. The session invalidation command may also be generated by the web service detecting that the message corresponding to the session is not accepted for more than a preset time. The session invalidation command contains a session identifier, i.e. a unique identifier of the session. The web server may remove the corresponding session according to the session identifier in the session invalidation command.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided a data processing apparatus including: an obtaining module 802, a sending module 804, a receiving module 806, and a storing module 808, wherein:
the obtaining module 802 is configured to obtain a data request, and obtain third-party data from a third-party server according to the data request.
A sending module 804, configured to obtain candidate data from the third-party data and the local data of the server according to the data request, store the candidate data in a session, and send the candidate data to the terminal.
A receiving module 806, configured to receive the item identifier and the corresponding numerical value submitted by the terminal according to the candidate data.
The saving module 808 is configured to obtain the item content corresponding to the item identifier and the value from the session, and save the item identifier and the corresponding item content.
In an embodiment, the obtaining module 802 is further configured to obtain a viewing request including an item identifier sent by the terminal, obtain, according to the viewing request, item content corresponding to the item identifier from the session, and return the item content to the terminal.
In one embodiment, the receiving module 806 is further configured to receive a data obtaining request of the terminal; searching local data of the server according to the item identifier in the data acquisition request; when the server does not have the item data corresponding to the item identifier, the third-party data is acquired from the third-party server through the acquisition module 802.
In an embodiment, the provided data processing apparatus further includes a detection module 810, and the detection module 810 is configured to detect that a message corresponding to the session identifier is not received over a preset time period, and generate a session invalidation instruction including the session identifier.
In an embodiment, the provided data processing apparatus further includes a clearing module 812, where the clearing module 812 is configured to obtain a session invalidation instruction, and clear a session corresponding to a session identifier according to the session identifier in the session invalidation instruction.
The division of the modules in the data processing apparatus is only for illustration, and in other embodiments, the data processing apparatus may be divided into different modules as needed to complete all or part of the functions of the data processing apparatus.
For specific limitations of the data processing apparatus, reference may be made to the above limitations of the data processing method, which are not described herein again. The various modules in the data processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In another embodiment, there is provided a data processing apparatus, the apparatus comprising: the device comprises a distribution module, a storage module, an updating module and a clearing module, wherein:
and the allocation module is used for allocating the session ID (identification) of the session.
And the storage module is used for storing the data of the session, including third-party data of the session, local data, project values submitted by the terminal, corresponding project data and the like.
And the updating module is used for updating the project data of the storage module according to the numerical value newly submitted by the user.
And the clearing module is used for clearing the stored session data and setting the session validity period and the like.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data of data processing. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a data request, and acquiring third-party data from a third-party server according to the data request;
acquiring candidate data from the third-party data and the local data of the server according to the data request, storing the candidate data in a session, and sending the candidate data to the terminal;
receiving the item identification submitted by the terminal according to the candidate data and the corresponding numerical value;
and acquiring the project content corresponding to the project identifier and the numerical value from the session, and storing the project identifier and the corresponding project content.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring a viewing request containing a project identifier sent by a terminal;
and acquiring the item content corresponding to the item identifier from the session according to the viewing request, and returning the item content to the terminal.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving a data acquisition request of a terminal;
searching local data of the server according to the item identifier in the data acquisition request;
and when the server does not have the project data corresponding to the project identification, executing the step of acquiring the third-party data from the third-party server according to the data request.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring a session invalidation instruction;
and clearing the session corresponding to the session identifier according to the session identifier in the session invalidation instruction.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and generating a session invalidation instruction containing the session identifier if the message corresponding to the session identifier is not received after the preset time length is detected.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a data request, and acquiring third-party data from a third-party server according to the data request;
acquiring candidate data from the third-party data and the local data of the server according to the data request, storing the candidate data in a session, and sending the candidate data to the terminal;
receiving the item identification submitted by the terminal according to the candidate data and the corresponding numerical value;
and acquiring the project content corresponding to the project identifier and the numerical value from the session, and storing the project identifier and the corresponding project content.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a viewing request containing a project identifier sent by a terminal;
and acquiring the item content corresponding to the item identifier from the session according to the viewing request, and returning the item content to the terminal.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a data acquisition request of a terminal;
searching local data of the server according to the item identifier in the data acquisition request;
and when the server does not have the project data corresponding to the project identification, executing the step of acquiring the third-party data from the third-party server according to the data request.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a session invalidation instruction;
and clearing the session corresponding to the session identifier according to the session identifier in the session invalidation instruction.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and generating a session invalidation instruction containing the session identifier if the message corresponding to the session identifier is not received after the preset time length is detected.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. Any reference to memory, databases, or other media used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of data processing, the method comprising:
the method comprises the steps that a server acquires a data request, searches data required to be acquired by a terminal according to the data request, and acquires third-party data from a third-party server when the data required to be acquired by the terminal does not exist in the data of the server; the third-party data comprises data required to be acquired by the terminal and other additional data except the data required to be acquired by the terminal; the data request comprises the type of data required to be acquired by the terminal and the item to which the data belongs;
the server acquires candidate data from the third-party data and the local data of the server according to the data request, stores the candidate data in a session, and sends the candidate data to a terminal; the candidate data comprise item identification, item content and numerical values corresponding to the item content of the data;
the server receives an item identifier corresponding to the submitted item and a numerical value corresponding to the item content selected by the item after the terminal selects the item content of the candidate data item; the server acquires the project content corresponding to the project identification and the numerical value from the session and stores the project identification and the corresponding project content;
acquiring a viewing request containing a project identifier sent by the terminal;
and the server acquires the item content corresponding to the item identifier from the session according to the viewing request and returns the item content to the terminal.
2. The method of claim 1, further comprising:
acquiring a session invalidation instruction;
and the server removes the session corresponding to the session identifier according to the session identifier in the session invalidation command.
3. The method of claim 2, wherein the obtaining the session deactivation command comprises:
and if the message corresponding to the session identifier is not received after the preset time length is detected, generating a session invalidation instruction containing the session identifier.
4. A method of data processing, the method comprising:
the method comprises the steps that a terminal sends a data request to a server, wherein the data request is used for indicating that local data are obtained from the server, when data needing to be obtained in the data request do not exist in the data of the server, third-party data are obtained from a third-party server through the server, candidate data are obtained from the third-party data and the local data of the server according to the data request, and the candidate data are stored in a session between the server and the terminal; the third-party data comprises data required to be acquired by the terminal and other additional data except the data required to be acquired by the terminal; the data request comprises the type of data required to be acquired by the terminal and the item to which the data belongs;
the terminal receives candidate data returned by the server; the candidate data comprise item identification, item content and numerical values corresponding to the item content of the data;
after the terminal selects the item content of the candidate data item, submitting an item identifier corresponding to the item and a numerical value corresponding to the item content selected by the item to the server, wherein the item identifier and the corresponding numerical value are used for indicating to acquire the item content corresponding to the item identifier and the numerical value from the session and storing the item identifier and the corresponding item content;
the terminal sends a viewing request containing the project identification to the server;
and receiving the item content corresponding to the item identification acquired by the server from the session according to the viewing request.
5. A method of data processing, the method comprising:
the terminal acquires a data request, acquires third-party data from a third-party server according to the data request, and acquires local data from the server; the third-party data comprises other additional data besides the local data; the data request comprises the type of data required to be acquired by the terminal and the item to which the data belongs;
the terminal selects the item content of the item identification according to the third-party data and the local data, and acquires a numerical value corresponding to the item content after determining the selected item identification and the item content; the item identification is a unique identification used for distinguishing different items in the third-party data and the local data; the project content refers to data content displayed by the terminal; the numerical value corresponding to the item content refers to a numerical value corresponding to the item content corresponding to the selection of the item by the user of the terminal;
and the terminal uploads the project identification, the project content and the corresponding numerical value to the server and stores the project identification, the project content and the corresponding numerical value.
6. A data processing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a data request, searching data required to be acquired by the terminal according to the data request, and acquiring third-party data from a third-party server when the data required to be acquired by the terminal does not exist in the data of the server; the third-party data comprises data required to be acquired by the terminal and other additional data except the data required to be acquired by the terminal; the data request comprises the type of data required to be acquired by the terminal and the item to which the data belongs;
the sending module is used for acquiring candidate data from the third-party data and the local data of the server according to the data request, storing the candidate data in a session and sending the candidate data to the terminal; the candidate data comprise item identification, item content and numerical values corresponding to the item content of the data;
the receiving module is used for receiving the item identification corresponding to the submitted item and the numerical value corresponding to the item content selected by the item after the terminal selects the item content of the candidate data item;
the storage module is used for acquiring the project content corresponding to the project identifier and the numerical value from the session and storing the project identifier and the corresponding project content; and acquiring a viewing request containing the project identifier sent by the terminal, acquiring project content corresponding to the project identifier from the session according to the viewing request, and returning the project content to the terminal.
7. The method of claim 6, wherein the apparatus further comprises:
and the clearing module is used for acquiring the session invalidation command and clearing the session corresponding to the session identifier according to the session identifier in the session invalidation command.
8. The method according to claim 7, wherein the clearing module is specifically configured to generate a session invalidation command including the session identifier if it is detected that the message corresponding to the session identifier is not received for more than a preset time period.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN201810355481.6A 2018-04-19 2018-04-19 Data processing method, data processing device, computer equipment and storage medium Active CN108664341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810355481.6A CN108664341B (en) 2018-04-19 2018-04-19 Data processing method, data processing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810355481.6A CN108664341B (en) 2018-04-19 2018-04-19 Data processing method, data processing device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108664341A CN108664341A (en) 2018-10-16
CN108664341B true CN108664341B (en) 2021-07-27

Family

ID=63780645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810355481.6A Active CN108664341B (en) 2018-04-19 2018-04-19 Data processing method, data processing device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108664341B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853764A (en) * 2012-12-03 2014-06-11 金蝶软件(中国)有限公司 Terminal information synchronizing method and terminal information synchronizing device
CN104270427A (en) * 2014-09-18 2015-01-07 用友优普信息技术有限公司 Session control method and device
CN106357791A (en) * 2016-09-30 2017-01-25 华为技术有限公司 Method, device and system for processing services
CN107102880A (en) * 2017-05-11 2017-08-29 腾讯科技(深圳)有限公司 Message treatment method, device, storage medium and computer equipment
US9792195B2 (en) * 2011-02-24 2017-10-17 Red Hat, Inc. Terminal data logger

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9792195B2 (en) * 2011-02-24 2017-10-17 Red Hat, Inc. Terminal data logger
CN103853764A (en) * 2012-12-03 2014-06-11 金蝶软件(中国)有限公司 Terminal information synchronizing method and terminal information synchronizing device
CN104270427A (en) * 2014-09-18 2015-01-07 用友优普信息技术有限公司 Session control method and device
CN106357791A (en) * 2016-09-30 2017-01-25 华为技术有限公司 Method, device and system for processing services
CN107102880A (en) * 2017-05-11 2017-08-29 腾讯科技(深圳)有限公司 Message treatment method, device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN108664341A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
CN109672741B (en) Micro-service monitoring method and device, computer equipment and storage medium
CN107784516B (en) Advertisement putting method and device
CN108829485B (en) Application interface layout updating method and device, storage medium and computer equipment
CN110266752B (en) Block chain information pushing method and device, computer equipment and storage medium
CN108399150B (en) Text processing method and device, computer equipment and storage medium
CN108848142B (en) Message pushing method and device, computer equipment and storage medium
CN110913266B (en) Comment information display method, device, client, server, system and medium
CN106528587B (en) Page display method and device in composite webpage system
CN107679214B (en) Link positioning method, device, terminal and computer readable storage medium
CN110233879B (en) Intelligent interface pushing method and device, computer equipment and storage medium
CN110659092B (en) Webpage screenshot method and device, computer equipment and storage medium
CN108959384B (en) Webpage data acquisition method and device, computer equipment and storage medium
CN109753421B (en) Service system optimization method and device, computer equipment and storage medium
JP5905551B1 (en) Information processing device, terminal device, information processing method, and information processing program
CN113220657B (en) Data processing method and device and computer equipment
CN110888709A (en) Intelligent operation method and device of monitoring screen, computer equipment and storage medium
US20170031993A1 (en) Presenting Previously Selected Search Results
CN111090797A (en) Data acquisition method and device, computer equipment and storage medium
CN111431767B (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN111309991B (en) Query statement generation method and device and data query method and system
US20160283517A1 (en) Real Estate Data Gathering System and Method
CN107341234B (en) Page display method and device and computer readable storage medium
CN111273964B (en) Data loading method and device
CN108664341B (en) Data processing method, data processing device, computer equipment and storage medium
CN111158998A (en) Display method and device of buried point data

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