A data processing method, cloud, client and data processing system
Through the cloud's active triggering of communication with the client, the task type is obtained and encrypted to generate task processing information, which solves the problem of cloud response time delay caused by the client's scheduled data upload, achieves the effect of reducing the amount of client tasks and cloud visits, and improves Overall processing efficiency.
Patent Information
- Application Number
- CN202311551593.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2043-11-20
AI Technical Summary
In the existing technology, the client regularly sends data to the cloud, causing the cloud's response time to slow down and reducing the cloud's processing efficiency.
The cloud actively triggers the establishment of communication with the client, obtains the task type, encrypts and generates task processing information, and sends it to the client for the client to extract task data and perform business processing in the cloud, avoiding the client from regularly uploading data.
It reduces the number of times the client performs data collection tasks and the amount of scheduled access to the cloud, improving the processing efficiency of the cloud.
Smart Images

Figure CN117573390B_ABST
Abstract
Description
Background Art
[0002] With the development of economy, transactions between enterprises are becoming more frequent. In order to count various transaction records and related information, it is generally necessary to collect document data from various enterprises, and then perform statistics, calculate relevant taxes and process invoices based on the document data.
[0003] In order to transmit data with terminals of different enterprises, one of the common methods is to customize the client for different enterprises, obtain, push and transmit data through the customized client, so that the back-end cloud can perform tax calculation and invoice processing based on the collected data.
[0004] However, the commonly used methods currently have the following technical problems: Since the customized client collects data through a scheduled task round-robin method, the client will send data to the cloud at a regular interval. Once the cloud is connected to multiple clients, the scheduled access volume of the cloud will increase, which will slow down the response time of the cloud and reduce the processing efficiency of the cloud. Summary of the invention
[0005] The present invention provides a data processing method, a cloud, a client and a data processing system to solve the technical problem of increasing the cloud's scheduled access volume due to the client sending data to the cloud at a scheduled time.
[0006] A first aspect of an embodiment of the present invention provides a data processing method, which is applicable to a cloud communicating with a client, and includes:
[0007] After establishing communication with the client and obtaining the task type, encrypting and generating task processing information according to the task type and sending it to the client, so that the client can extract corresponding task data according to the task processing information;
[0008] After obtaining the encrypted task data fed back by the client, the task data is decrypted, and business processing is performed on the decrypted task data.
[0009] In a possible implementation manner of the first aspect, establishing communication with the client includes:
[0010] Obtaining encrypted authentication information of the client, wherein the encrypted authentication information is generated by encrypting the user name, client password and machine code by the client using a preset shared key;
[0011] Using the client encrypted verification information to perform communication verification and after the communication verification is passed, creating a client session ID;
[0012] The user name, client password and machine code are encrypted using a preset shared key to obtain cloud encrypted verification information, and the customer session ID is sent to the client using the cloud encrypted verification information, so that the client can save the customer session ID to establish channel communication.
[0013] In a possible implementation manner of the first aspect, after the step of establishing communication with the client, the method further includes:
[0014] Acquire an encryption sequence sent by the client within a preset time interval, where the encryption sequence is information obtained by serializing and encrypting a message generated by the client using a user name and a current time;
[0015] After the activation verification is passed using the encryption sequence, the preset session list is refreshed and a response message is sent to the client, so that the client can determine the activation time after decrypting the response message, so that the communication channel between the client and the cloud remains activated.
[0016] In a possible implementation manner of the first aspect, obtaining the task type includes:
[0017] Obtaining the request type of the client;
[0018] If the request type is a front-end user request, when the user ID of the front-end user corresponding to the client is obtained and it is determined that the user ID is online in the communication channel, the first task ID is generated using the user ID, and the task type is searched using the first task ID;
[0019] If the request type is a background task request, when the default ID corresponding to the client is obtained and it is determined that the default ID is online in the communication channel, the default ID is used to generate a second task ID, and the task type is searched using the second task ID.
[0020] In a possible implementation manner of the first aspect, obtaining the task type further includes:
[0021] If it is determined that the user ID is not online in the communication channel, a prompt message is displayed;
[0022] If it is determined that the default ID is not online in the communication channel, the client is added to a preset execution task list, and the task validity period of the client is set.
[0023] In a possible implementation manner of the first aspect, the encrypting and generating task processing information according to the task type includes:
[0024] Creating an entity class object according to the task type, and setting properties of the entity class object based on type parameters corresponding to the task type to obtain a parameter object;
[0025] The parameter object is serialized and encrypted to obtain task processing information.
[0026] In a possible implementation manner of the first aspect, the serializing and encrypting the parameter object to obtain the task processing information includes:
[0027] Obtain the object ID and entity class object corresponding to the parameter object;
[0028] Using the object ID to search for a client session ID and a preset shared key respectively, using the client session ID, the preset shared key and the object ID to generate a cloud key, and converting the entity class object into a cloud string in JSON format;
[0029] The cloud key is used to encrypt the cloud character string to obtain task processing information.
[0030] In a possible implementation manner of the first aspect, decrypting the task data and performing business processing on the decrypted task data includes:
[0031] When it is determined that the data ID corresponding to the task data is in the list, decrypting the task data to obtain decrypted data;
[0032] After the decrypted data is deserialized, a preset upper layer application is called to perform business processing on the deserialized data.
[0033] A second aspect of an embodiment of the present invention provides a data processing method, which is applicable to a client communicating with a cloud, and includes:
[0034] After establishing communication with the cloud, sending the task type to the cloud, so that the cloud generates task processing information based on the encrypted task type;
[0035] After receiving the task processing information sent by the cloud, the corresponding task data is extracted from the intranet according to the task processing information, the task data is encrypted and sent to the cloud, so that the cloud can decrypt the task data and perform business processing on the decrypted task data.
[0036] In a possible implementation manner of the second aspect, establishing communication with the cloud includes:
[0037] After loading the locally stored user name, client password and machine code, the user name, client password and machine code are encrypted using a preset shared key to obtain client encrypted verification information, and the client encrypted verification information is sent to the cloud, so that the cloud uses the client encrypted verification information for communication verification and creates a client session ID and generates cloud encrypted verification information after the communication verification passes;
[0038] After acquiring the client session ID, the client session ID is saved to establish channel communication.
[0039] In a possible implementation manner of the second aspect, after the step of establishing communication with the cloud, the method further includes:
[0040] After obtaining the user name and the current time, a message is generated using the user name and the current time and serialized and encrypted in sequence to obtain an encrypted sequence;
[0041] Sending an encryption sequence to the cloud at a preset time interval, so that the cloud refreshes a preset session list after passing activation verification using the encryption sequence;
[0042] Receive a response message sent by the cloud, determine an activation time after decrypting the response message, and repeatedly send an encrypted sequence to the cloud according to the activation time to activate the communication channel.
[0043] In a possible implementation manner of the second aspect, extracting corresponding task data from an intranet according to the task processing information includes:
[0044] Decrypting the task processing information using a preset decryption key to obtain a decrypted message, wherein the preset decryption key is a key generated using the client session ID, the object ID and a preset shared key;
[0045] After deserializing the decrypted message to obtain a standard object, a client implementation class is created based on the standard object and a task type is determined;
[0046] Call the client implementation class to perform business operations according to the configuration and parameters corresponding to the task type, and obtain the operation results;
[0047] After the operation result is converted into a standard entity class, the standard entity class is serialized to obtain task data.
[0048] A third aspect of an embodiment of the present invention provides a cloud, the cloud comprising:
[0049] A task processing information generating module is used to generate task processing information encrypted according to the task type and send it to the client after establishing communication with the client and obtaining the task type, so that the client can extract corresponding task data according to the task processing information;
[0050] The business processing module is used to decrypt the encrypted task data fed back by the client after obtaining the encrypted task data, and perform business processing on the decrypted task data.
[0051] A fourth aspect of an embodiment of the present invention provides a client, the client comprising:
[0052] A task type sending module, used for sending the task type to the cloud after establishing communication with the cloud, so that the cloud generates task processing information based on the encrypted task type;
[0053] The data extraction module is used to extract the corresponding task data from the intranet according to the task processing information after receiving the task processing information sent by the cloud, encrypt the task data and send it to the cloud so that the cloud can decrypt the task data and perform business processing on the decrypted task data.
[0054] A fifth aspect of an embodiment of the present invention provides a data transmission system, comprising: a cloud and a client communicating with each other, the cloud is applicable to the data processing method as described above, and the client is applicable to the data processing method as described above.
[0055] Compared with the prior art, the data processing method, cloud, client and data processing system provided by the embodiments of the present invention have the following beneficial effects: the present invention can be actively triggered by the cloud to establish communication with the client, and after establishing communication, the task type is obtained and encrypted to generate task processing information, which is sent to the client for the client to extract the corresponding task data according to the task processing information; finally, according to the business processing, the whole process is triggered by the cloud, and there is no need for the client to upload data to the cloud periodically. On the one hand, it can reduce the number of times the client executes data collection tasks and reduce the amount of tasks of the client. On the other hand, it can reduce the scheduled access to the cloud and reduce the cloud resources occupied by the access, so as to improve the processing efficiency of the cloud. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flowchart of a data processing method provided by an embodiment of the present invention;
[0057] Figure 2 is an operation flow chart of establishing communication between a cloud and a client provided by an embodiment of the present invention;
[0058] Figure 3 is an operation flow chart of keeping the communication channel between the cloud and the client active provided by an embodiment of the present invention;
[0059] Figure 4 It is an operation flow chart of serialization encryption processing in the cloud provided by an embodiment of the present invention;
[0060] Figure 5 This is an operational flow chart of decryption and business processing in the cloud provided by an embodiment of the present invention;
[0061] Figure 6 This is an operation flow chart of processing performed by an upper layer application on the cloud provided by an embodiment of the present invention;
[0062] Figure 7 is an operation flow chart of a data processing method provided by one embodiment of the present invention;
[0063] Figure 8 It is a flowchart of a data processing method provided by an embodiment of the present invention;
[0064] Fig. 9 It is an operation flow chart of the deserialization processing of the client provided by an embodiment of the present invention;
[0065] Fig.10 is an operation flow chart of a data processing method provided by one embodiment of the present invention;
[0066] Fig.11 This is a schematic diagram of a cloud structure provided by an embodiment of the present invention;
[0067] Fig.12 It is a structural diagram of a client provided by an embodiment of the present invention;
[0068] Fig.13 It is a structural diagram of a data processing system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] In order to solve the above problems, a data processing method provided in an embodiment of the present application will be introduced and explained in detail through the following specific embodiments.
[0071] Reference Figure 1, which shows a flow chart of a data processing method provided by an embodiment of the present invention.
[0072] In one embodiment, the method is applicable to a cloud, which can communicate with multiple clients. Each client can be a smart client installed on an enterprise device, computer or server. The client can extract various enterprise data in the enterprise's intranet and transmit the data to the cloud for the cloud to use various enterprise data for tax calculation or ticket processing, etc.
[0073] It should be noted that the managers or users of the enterprise can also directly operate their clients and send data to the cloud by using the clients.
[0074] Wherein, as an example, the data processing method may include:
[0075] S11, after establishing communication with the client and obtaining the task type, encrypting and generating task processing information according to the task type and sending it to the client, so that the client can extract corresponding task data according to the task processing information;
[0076] In one embodiment, in actual application, the cloud and the client can establish communication first, and after the communication is established, the task type can be obtained through the client. After the task type user calls the client to upload data to the cloud, the type of task that is triggered to be executed by the cloud. Then, the cloud can encrypt and convert the task type to generate task processing information, and send the task processing information to the client, so that the client can extract corresponding data according to the task processing information. For example, for tasks that require tax statistics, tax data can be obtained; for tasks that require invoicing, ticket-related data can be obtained.
[0077] Since the data extraction process is actively initiated by the cloud, the client does not need to collect data regularly and feed it back to the cloud. On the one hand, it can reduce the number of times the client collects data and simplify the operation process. On the other hand, it can avoid the client sending data to the cloud regularly, thereby reducing the cloud's access volume and avoiding excessive access volume occupying the cloud's resources, thereby reducing the cloud's communication pressure and improving the cloud's processing efficiency.
[0078] Wherein, as an example, establishing communication with the client may include the following sub-steps:
[0079] S111, obtaining encrypted authentication information of the client, wherein the encrypted authentication information is generated by the client encrypting a user name, a client password and a machine code using a preset shared key.
[0080] S112, using the client encrypted verification information to perform communication verification and after the communication verification passes, creating a client session ID.
[0081] S113, using a preset shared key to encrypt the user name, client password and machine code to obtain cloud encrypted verification information, and using the cloud encrypted verification information to send the client session ID to the client, so that the client can save the client session ID to establish channel communication.
[0082] In one implementation, the client can first obtain the preset shared key, user name, client password, machine code, cloud verification URL, etc. from the local computer, and then use the preset shared key to encrypt the user name, client password, and machine code to obtain the client encrypted verification information. The client encrypted verification information is then sent to the cloud through the cloud verification URL.
[0083] Next, the client encrypted authentication information can be decrypted using the preset shared key to obtain the user name, client password, machine code and cloud authentication URL. The cloud can use the cloud authentication URL for communication authentication. When the communication authentication is confirmed to be successful, the client session ID (SessionID) of the client is created.
[0084] After establishing a channel with the client, the cloud server will create a client session ID (SessionID) for this connection to indicate the uniqueness of the channel, so that the upper-layer application can locate the channel when issuing tasks. The cloud can then use the preset shared key to encrypt the user name, client password and machine code to obtain cloud encrypted verification information (enckey). At the same time, the client session ID can be sent to the client through the cloud encrypted verification information, so that the client can save the client session ID in memory to complete the channel communication.
[0085] In an optional embodiment, the cloud and the client can establish a WebSocket channel for communication. Considering that the client needs to be deployed in the intranet of the customer enterprise, and since there are usually firewalls, NAT and other security devices when the client accesses the external network from the enterprise's intranet, the present invention adopts the WebSocket protocol with the same source and port as the http protocol. As long as the customer's firewall, NAT and other security devices have opened the http / https port for accessing the cloud server, it can be used. There is no need to open separate ports for configuration sending and feedback, which can simplify the communication process and improve the communication efficiency between the client and the cloud.
[0086] Reference Figure 2 , showing an operational flow chart of establishing communication between the cloud and the client provided by an embodiment of the present invention.
[0087] In an actual operation mode, the process of establishing communication between the cloud and the client may include the following steps:
[0088] The first step is to load the locally configured pre-shared key, user name, password, cloud verification URL, etc.
[0089] The second step is to obtain the machine code (CPU SN + SN of the first partition of the first physical hard disk).
[0090] The third step is to use the pre-shared key to encrypt the username, password, and machine code and send them to the cloud verification URL.
[0091] In the fourth step, the cloud performs verification according to the cloud verification URL. If it passes, a customer session ID (SessionID) is created and saved to the session list; otherwise, if it fails, the user is prompted that the verification has failed.
[0092] Step 5: Generate cloud-encrypted authentication information (enckey) using the preset shared key, username, client password, and machine code.
[0093] Step 6: Use the cloud-encrypted authentication information (enckey) to send the client session ID (SessionID) to the client.
[0094] In the seventh step, the client decrypts the cloud encrypted verification information (enckey) to obtain the client session ID (SessionID), and then saves the client session ID (SessionID) to the memory.
[0095] Since the client's intranet has security devices such as a client firewall and NAT, each security device will periodically detect the client. In order to avoid the situation where the cloud and the client need to reconnect due to NAT timeout, the WebSocket channel between the cloud and the client needs to be kept activated. As an example, after the step of establishing communication with the client, the method may also include the following sub-steps:
[0096] S114: Acquire an encryption sequence sent by the client within a preset time interval, where the encryption sequence is information obtained by serializing and encrypting the message generated by the client using the user name and the current time.
[0097] S115. After the activation verification is passed using the encryption sequence, a preset session list is refreshed and a response message is sent to the client, so that the client can determine the activation time after decrypting the response message, so that the communication channel between the client and the cloud remains activated.
[0098] In one embodiment, the operation of keeping the cloud and the client activated can be initiated by the client. Because the client's intranet has various security devices, in order to prevent various security devices from intercepting the communication channel between the cloud and the client, the client can trigger an activation operation at a preset time interval.
[0099] In one operation mode, the client can use the preset shared key and the client session ID (SessionID) to generate a client key (seEnckey), and at the same time the client can obtain the user name and real time, and then generate an object message about the current user name and real time, and after serializing and encrypting the object message, obtain an encrypted sequence. Finally, the client can send the encrypted sequence to the cloud server.
[0100] Similarly, the cloud server can verify the encryption sequence in the same manner as in step S112 above. When the verification is successful, the cloud server can refresh its session list and return a response message (echoResponse object message) to the client.
[0101] After receiving the response message, the client can decrypt the response message and then refresh the next activation time. Specifically, the next activation time can be refreshed according to a preset time interval.
[0102] Reference Figure 3 , showing an operation flow chart of keeping the communication channel between the cloud and the client activated provided by an embodiment of the present invention.
[0103] In an actual operation, the process of keeping the communication channel between the cloud and the client active may include the following steps:
[0104] In the first step, the client uses the preset shared key and the client session ID (SessionID) to generate the client's key (seEnckey).
[0105] In the second step, the client obtains the user name and current time.
[0106] In the third step, the client generates an object message about the user name and current time.
[0107] In the fourth step, the client serializes and encrypts the object message and sends it to the cloud server.
[0108] In the fifth step, the cloud server verifies the encryption sequence. If the verification fails, the received encryption sequence is discarded; if the verification passes, the session table is refreshed.
[0109] Step 6: The cloud server returns a response message (echoResponse object message) to the client.
[0110] In the seventh step, the client decrypts the response message (echoResponse object message) and refreshes the next activation time.
[0111] The present invention can effectively prevent NAT timeout reconnection and timely detect when the client's IP changes by keeping the WebSocket channel between the cloud and the client activated, thereby ensuring that the communication between the client and the cloud will not be interrupted.
[0112] When establishing a WebSocket channel communication with the client, the task type of the client's current access may be obtained, where, as an example, obtaining the task type may include the following sub-steps:
[0113] S21. Obtain the request type of the client.
[0114] In one embodiment, it may be determined first whether the currently connected client is a directly connected client or an indirectly connected client. The indirectly connected client may be a client set up in an enterprise intranet.
[0115] If it is a directly connected client, the client can be directly controlled to extract data. If it is an indirect client, the request type of the operation requested by the client can be determined. In one embodiment, the request type can be a front-end user of the client controlling the client to perform a data extraction request, or a scheduled background task request of the client.
[0116] S22. If the request type is a front-end user request, when the user ID of the front-end user corresponding to the client is obtained and it is determined that the user ID is online in the communication channel, the user ID is used to generate a first task ID, and the task type is searched using the first task ID.
[0117] If the request type is a front-end user request, the user ID of the front-end user of the client may be obtained. The user ID of the front-end user may be a personal account ID of the user logging into the client.
[0118] Then determine whether the user ID is online in the WebSocket channel. If online, the user ID can be used to generate a first task ID, and the task type can be found using the first task ID.
[0119] In one implementation, the first task ID may be generated by using the Guid of the aerospace information AOS+ platform. It should be noted that it may be similar to a common Guid and may be composed of unordered decimal numbers.
[0120] The first task ID can be associated with the content of this task (user ID, organization ID, SessionID, task creation time, task validity period, client task type (document acquisition, customer code acquisition, product code acquisition, invoicing data return), task execution entity class Json serialization into String, etc.). These contents related to the issued task are saved in the task table for the following purposes:
[0121] First, it can avoid repeated execution of tasks.
[0122] Second, if the client completes the task before the last one is sent, it will be returned to the upper-level application in chronological order (for example, when obtaining the document data from 2023-01-01 to 2023-09-30 and returning the invoice data with invoice number 00000001, the returned task will be executed first. Through the management of the task table, it is ensured that the task sent first within the same user ID is executed first (although it will cause a slow response to the upper-level application, the consistency of the data must be ensured).
[0123] Third, avoid sending multiple tasks of the same task type (limited to document acquisition, customer code acquisition, and product code acquisition) within the same user ID due to improper user operation or "jittering" issues on the front-end page. This will increase the pressure on the client's database / API when the client executes the task.
[0124] Since the first task ID is associated with the above information, the task type of this task can be found through the first task ID.
[0125] S23. If the request type is a background task request, when a default ID corresponding to the client is obtained and it is determined that the default ID is online in the communication channel, a second task ID is generated using the default ID, and the task type is searched using the second task ID.
[0126] Similarly, if the request type is a background task request, the default ID corresponding to the client can be obtained, which can be the client's own encoded ID. Then it can be determined whether the default ID is online in the WebSocket channel. If it is online, the default ID can be used to generate a second task ID, and the second task ID can be used to find the task type.
[0127] In one embodiment, the method of generating the second task ID and the method of searching for the task type using the second task ID may be the same as the first task ID in step S22 , and the above description may be specifically followed.
[0128] Optionally, the task types searched using the first task ID and the second task ID may include: document acquisition type, customer code acquisition type, product code acquisition type, invoicing data return type, etc.
[0129] S24: If it is determined that the user ID is not online in the communication channel, a prompt message is displayed.
[0130] S25. If it is determined that the default ID is not online in the communication channel, the client is added to a preset execution task list, and the task validity period of the client is set.
[0131] In an optional embodiment, it may be determined that the user ID is not online in the WebSocket channel. At this time, the cloud can display the preset prompt information and send the preset prompt information to the client for the client to display the prompt information.
[0132] Similarly, it may be determined that the default ID is not online in the WebSocket channel. In this case, the client can be added to the preset execution task list and the task validity period of the client can be set.
[0133] In one embodiment, after determining the task type, the task type can be encrypted to generate a task processing information, and then the task processing information is sent to the client, so that the client can perform corresponding task processing according to the task processing information, for example, it can obtain document data, customer code data, product code data, etc.
[0134] In order to prevent information from being stolen, as an example, the step of generating task processing information encrypted according to the task type may include the following sub-steps:
[0135] S31. Create an entity class object according to the task type, and set attributes of the entity class object based on type parameters corresponding to the task type to obtain a parameter object.
[0136] In one embodiment, an object of a corresponding entity class may be created and configured according to a task corresponding to a task type to obtain an entity class object, and then properties of the entity class object may be set according to type parameters corresponding to the task type to obtain a parameter object.
[0137] Among them, the properties of the setting object may include: first, task type (document acquisition, customer code acquisition, product code acquisition, invoicing data feedback, and input reimbursement certification will be expanded in the future); second, connection method (SQL, Http Api, SAP JCO / SNC, FTP, SMB); third, connection parameters: taking SQL as an example, it includes: database type (SQL Server, Oracle, MySQL, DB2, HANA) and database connection string (address, port, user name, password, library name, other connection parameters); fourth, execution command (taking SQL as an example: SELECT*FROM xxfp WHERE billTime BETWEEN? AND?); fifth, execution parameters (taking the above SQL as an example: [2023-09-01 00:00:00,2023-09-17 23:59:59]; sixth, user ID; seventh, organization ID; eighth, task creation time; ninth, reserved parameters.
[0138] S32: Serialize and encrypt the parameter object to obtain task processing information.
[0139] Next, the parameter object can be serialized and encrypted to obtain task processing information, which is then sent to the client.
[0140] The entity class object sent down is created by the cloud server and generates an encrypted String through the steps of "entity class serialization and encryption".
[0141] In this number, an entity class object refers to an object in Java.
[0142] Specifically, in an actual operation mode, the serialization and encryption processing of the parameter object to obtain the task processing information may include the following sub-steps:
[0143] S321. Obtain the object ID and entity class object corresponding to the parameter object.
[0144] S322, using the object ID to respectively search for the client session ID and the preset shared key, using the client session ID, the preset shared key and the object ID to generate a cloud key, and converting the entity class object into a cloud string in JSON format.
[0145] S323: Using the cloud key to encrypt the cloud character string to obtain task processing information.
[0146] In specific operations, the object ID and entity class object corresponding to the parameter object can be obtained. If it is a front-end user request, the object ID of the parameter object can be the user ID of the front-end user corresponding to the client; similarly, if it is a back-end task request, the object ID of the parameter object can be the default ID corresponding to the client.
[0147] Next, the entity class object can be converted into a cloud string in JSON format. The object ID can be used to find the client's client session ID. Similarly, the corresponding organization ID can be obtained through the object ID of the parameter object, and the corresponding preset shared key can be obtained through the organization ID. Algorithm A is used to generate a cloud key from the client session ID, the preset shared key and the object ID. Among them, algorithm A can be a conventional encryption algorithm or a user-preset encryption algorithm, which can be adjusted according to actual needs.
[0148] After completing the above operations, algorithm S can be used to encrypt the cloud string in JSON format as content and the cloud key as the encryption key to generate task processing information.
[0149] Reference Figure 4 , showing an operational flow chart of serialized encryption processing in the cloud provided by an embodiment of the present invention.
[0150] In one implementation, the operation flow of serialization encryption processing in the cloud may include the following steps:
[0151] The first step is to obtain the object ID and entity class object corresponding to the parameter object.
[0152] In the second step, the entity class object is converted into a cloud string in JSON format, and the object ID is used to find the client session ID of the client and obtain the corresponding preset shared key through the object ID of the parameter object.
[0153] In the third step, algorithm A is used to generate a cloud key using the customer session ID, the preset shared key and the object ID.
[0154] The fourth step is to use algorithm S to encrypt the cloud string in JSON format as the content and the cloud key as the encryption key.
[0155] S12: After obtaining the encrypted task data fed back by the client, decrypt the task data, and perform business processing on the decrypted task data.
[0156] After generating the task processing information, the cloud can send the task processing information to the client, and then the client can decrypt the task processing information and perform the corresponding task processing according to the decrypted information to extract the corresponding data. At the same time, the extracted data can be encrypted to obtain the task data. Then the encrypted task data can be sent to the cloud, and the cloud can use the task data to perform tax calculation, bill processing and other task operations after decryption.
[0157] In an optional embodiment, step S12 may include the following sub-steps:
[0158] S121. When it is determined that the data ID corresponding to the task data is in the list, the task data is decrypted to obtain decrypted data.
[0159] S122: After deserializing the decrypted data, a preset upper layer application is called to perform business processing on the deserialized data.
[0160] Specifically, the cloud can first determine whether the data ID corresponding to the task data returned by the client is in the session list, where the data ID can be the client session ID (SessionID) in the previous step, which the cloud has stored in the session list in the previous step. If it is determined that the data ID is in the session list, it can be determined that the data is the data required for the task, and it can be decrypted to obtain the decrypted data.
[0161] The decrypted data can then be deserialized, and after the deserialization is completed, a preset upper-layer application is called to perform business processing on the deserialized data.
[0162] Reference Figure 5 , showing an operational flow chart of decryption and business processing in the cloud provided by an embodiment of the present invention.
[0163] In one operation mode, the operation process of decryption and business processing in the cloud may include the following steps:
[0164] The first step is to determine whether the data ID corresponding to the returned task data is in the session list. If not, the task data is discarded; if so, the client session ID (SessionID) and the preset shared key corresponding to the task data are searched.
[0165] The second step is to use the client session ID (SessionID) and the preset shared key to generate a decryption key and decrypt the task data.
[0166] In the third step, if the decryption fails, the task data is discarded; otherwise, if the decryption succeeds, the task data is deserialized to obtain a standard object.
[0167] The fourth step is to delete the client's session ID (SessionID) from the session list.
[0168] The fifth step is to call the upper-level application to perform corresponding business processing on the standard object.
[0169] Reference Figure 6 , showing an operational flow chart of processing performed by an upper-layer application in the cloud provided by an embodiment of the present invention.
[0170] In one operation mode, the operation processed by the upper-layer application can be that the cloud directly decrypts and deserializes the data returned by the client and sends it to the upper-layer application. For example, if the user calls the upper-layer application to obtain a document, the data can be returned to the document obtaining application. For another example, if the user calls the application to return invoicing data, the data can be returned to the application that returns invoicing data, etc.
[0171] Reference Figure 7 , shows an operation flow chart of a data processing method provided by an embodiment of the present invention.
[0172] Specifically, the operation of the data processing method in the cloud may include the following steps:
[0173] In the first step, the cloud establishes a communication connection with the device to determine whether the device's main type is a client. If not, it communicates directly with the device to extract data; if it is a client, it obtains the client's request type.
[0174] In the second step, the cloud generates corresponding task IDs based on different request types and determines the task type of the client.
[0175] The third step is to create a task dispatch entity class based on the task type in the cloud.
[0176] In the fourth step, the cloud configures the entity class according to the parameters.
[0177] In the fifth step, the cloud serializes and encrypts the entity class.
[0178] Step 6: Place the task list on the cloud and set the effective time.
[0179] The seventh step is to send the data to the client through the ws channel, and the client will perform corresponding data extraction and processing.
[0180] In this embodiment, the embodiment of the present invention provides a data processing method, which has the beneficial effect that: the present invention can be actively triggered by the cloud to establish communication with the client, and after the communication is established, the task type is obtained and encrypted to generate task processing information, which is sent to the client for the client to extract the corresponding task data according to the task processing information; finally, according to the business processing, the whole process is triggered by the cloud, and there is no need for the client to upload data to the cloud regularly. On the one hand, it can reduce the number of times the client executes data collection tasks and reduce the amount of tasks of the client. On the other hand, it can reduce the scheduled access to the cloud and reduce the cloud resources occupied by the access, so as to improve the processing efficiency of the cloud.
[0181] Reference Figure 8 , which shows a flow chart of a data processing method provided by an embodiment of the present invention.
[0182] In one embodiment, the method is applicable to a client, which can communicate with the cloud. Each client can be a smart client installed on an enterprise device, computer or server. The client can extract various enterprise data in the enterprise's intranet and transmit the data to the cloud for the cloud to use various enterprise data for tax calculation or ticket processing, etc.
[0183] It should be noted that the client can be a self-developed universal client. Except for the configuration of logging into the cloud, the client is stored locally on the client. The acquisition of document data, customer code, and product code are all issued through the cloud server. The client executes the results according to the issued commands and returns them to the cloud server in encrypted form.
[0184] In addition, the universal client of the present invention can realize the data flow from the cloud server to the client from the external network to the internal network, so it can allow the cloud server to actively write the invoicing results back to the database / http api / SAP JCO of the internal network, and even write to the FTP of the internal network. This avoids the problem of high access volume to the cloud server caused by the client only being able to cycle the invoicing results through scheduled tasks.
[0185] Wherein, as an example, the data processing method may include:
[0186] S41. After establishing communication with the cloud, sending the task type to the cloud, so that the cloud generates task processing information by encryption according to the task type.
[0187] In one embodiment, the client may actively establish a communication connection with the cloud, and after completing the communication connection, the task type may be sent to the cloud, so that the cloud may generate task processing information based on the encrypted task type.
[0188] Specifically, the process of generating task processing information can refer to the analytical description of steps S31-S32 of the above embodiment, and will not be described again here to avoid repetition.
[0189] Wherein, as an example, establishing communication with the cloud may include the following sub-steps:
[0190] S51. After loading the locally stored user name, client password and machine code, the user name, client password and machine code are encrypted using a preset shared key to obtain client encrypted verification information, and the client encrypted verification information is sent to the cloud, so that the cloud can use the client encrypted verification information for communication verification and create a client session ID and generate cloud encrypted verification information after the communication verification is passed.
[0191] S52: After acquiring the client session ID, save the client session ID to establish channel communication.
[0192] Specifically, the steps for establishing communication can refer to the analytical description of steps S111-S113 of the above embodiment and the attached Figure 2 In order to avoid repetition, the public content will not be repeated here.
[0193] After the step of establishing communication with the cloud, the method may further include the following sub-steps:
[0194] S61. After obtaining the user name and the current time, a message is generated using the user name and the current time, and serialized and encrypted in sequence to obtain an encrypted sequence.
[0195] S62: Send an encryption sequence to the cloud at a preset time interval, so that the cloud refreshes a preset session list after passing activation verification using the encryption sequence.
[0196] S63, receiving a response message sent by the cloud, determining an activation time after decrypting the response message, and repeatedly sending an encrypted sequence to the cloud according to the activation time to activate the communication channel.
[0197] Specifically, the steps of maintaining activation can refer to the analytical description of steps S114-S115 of the above embodiment and the attached Figure 3 In order to avoid repetition, the public content will not be repeated here.
[0198] S42. After receiving the task processing information sent by the cloud, extract the corresponding task data from the intranet according to the task processing information, encrypt the task data and send it to the cloud so that the cloud can decrypt the task data and perform business processing on the decrypted task data.
[0199] In one embodiment, the client can extract corresponding task data from the intranet database or according to different task types based on the task processing information sent by the cloud, and then encrypt the task data and send it to the cloud after encryption so that the cloud can decrypt the task data and perform business processing on the decrypted task data.
[0200] The steps of decrypting the task data in the cloud and performing business processing on the decrypted task data can refer to the analytical description of steps S121-S122 of the above embodiment and the attached Figure 5 and attached Figure 6 In order to avoid repetition, the public content will not be repeated here.
[0201] Wherein, as an example, extracting corresponding task data from the intranet according to the task processing information may include the following sub-steps:
[0202] S421. Decrypt the task processing information using a preset decryption key to obtain a decrypted message, where the preset decryption key is a key generated using a client session ID, an object ID, and a preset shared key.
[0203] S422: After deserializing the decrypted message to obtain a standard object, create a client implementation class based on the standard object and determine the task type.
[0204] S423: Call the client implementation class to perform business operations according to the configuration and parameters corresponding to the task type to obtain operation results.
[0205] S424: After converting the operation result into a standard entity class, serializing the standard entity class to obtain task data.
[0206] Specifically, the client can use a preset decryption key to decrypt the task processing information to obtain a decrypted message, wherein the preset decryption key can be a key generated using the client session ID, the object ID and the preset shared key. If the decryption fails, the task ID execution failure can be returned to the cloud.
[0207] Next, the client can deserialize the decrypted message to obtain a standard object, and then create a client implementation class based on the standard object and determine the task type.
[0208] Then, you can call the client implementation class according to the configuration and parameters corresponding to the task type to perform business operations and obtain the operation results. For example, you can call the client implementation class of document data acquisition according to the configuration and parameters of document data acquisition to perform document data acquisition operations and obtain document data. Finally, you can convert the document data into a standard entity class, serialize the standard entity class of the document data to obtain the task data, and finally return it to the cloud.
[0209] For example, in SQL, there are database types, database connection strings, execution commands, and execution parameters. The client connects, executes, and obtains the returned data based on these parameters. The data is serialized and encrypted and then returned to the cloud server.
[0210] It should be noted that, generally speaking, only one implementation class is created for a task. These implementation classes are needed when the client connects to the database / http api of the customer's intranet. Because the upper layer message needs to be unified, the factory mode based on interface is adopted.
[0211] Because each customer's acquisition and write-back situations are different, some customers use the database and create SQL implementation classes through the factory. Similarly, if the customer uses the http api, create the HTTP implementation class through the factory.
[0212] After all, the client is universal, so during the design process, each connection method that the current customer needs to use is implemented in an implementation class.
[0213] Reference Fig. 9 , shows an operational flow chart of the deserialization processing of the client provided by an embodiment of the present invention.
[0214] Specifically, the client's deserialization processing operations may include:
[0215] The client can directly deserialize the decrypted message in JSON format to obtain a standard object.
[0216] It should be noted that the client's operations of converting into entity classes, serializing and encrypting and returning them to the cloud are the same as the operation process of the cloud sending tasks to the client, but the entity class definitions of task delivery and task return are different (that is, the corresponding classes are different), so the message structure may be different.
[0217] Reference Fig.10 , shows an operation flow chart of a data processing method provided by an embodiment of the present invention.
[0218] Specifically, the operation of the data processing method performed by the client may include the following steps:
[0219] In the first step, after the client receives the task processing information from the cloud, it generates a decryption key based on algorithm A using the task ID, customer session ID and the preset shared key, and then uses the decryption key to decrypt the task processing information.
[0220] In the second step, if the client decryption fails, the client can return the task ID execution failure to the cloud; if the client decryption succeeds, the client can deserialize the task processing information to obtain the standard object, and then create a customer implementation class based on the standard object and determine the task type.
[0221] In the third step, the client is executed by the client implementation class according to the configuration and parameters.
[0222] In the fourth step, the client converts the execution results into standard entity classes.
[0223] In the fifth step, the client serializes the standard entity class.
[0224] In the sixth step, the client uses the decryption key to encrypt the serialized result and finally sends it to the cloud.
[0225] The client of the present invention only needs a universal version, and there is no need to customize and develop a client for each customer. Moreover, the client can be upgraded together when updating, and there is no need to modify the code for each customer separately for upgrading, which can greatly reduce the difficulty of development and reduce the cost of development.
[0226] The cloud server and client of the present invention adopt the WebSocket protocol which is homologous to http, and do not need to open access ports separately. It is convenient to cross NAT and adapt to the dynamic IP changes of operators. No special NAT ALG is required.
[0227] The cloud server and client of the present invention adopt agreed common entity classes to facilitate upper-layer application processing and lower-layer structured return.
[0228] In this embodiment, the embodiment of the present invention provides a data processing method, which has the beneficial effect that: the client of the present invention extracts and processes data through the information sent by the cloud server, and can realize the data flow from the external network to the internal network sent by the cloud server to the client. At the same time, the cloud server can be allowed to actively write the invoicing results back to the database / http api / SAP JCO of the internal network, and even write to the FTP of the internal network, thereby avoiding the problem of high access volume to the cloud server caused by the client only being able to cycle the invoicing results through scheduled tasks.
[0229] The embodiment of the present invention also provides a cloud, see Fig.11 , showing a schematic diagram of a cloud structure provided by an embodiment of the present invention.
[0230] As an example, the cloud may include:
[0231] The task processing information generating module 101 is used to generate task processing information encrypted according to the task type and send it to the client after establishing communication with the client and obtaining the task type, so that the client can extract corresponding task data according to the task processing information;
[0232] The business processing module 102 is used to decrypt the encrypted task data fed back by the client after obtaining the encrypted task data, and perform business processing on the decrypted task data.
[0233] Optionally, the module for generating task processing information is further used to:
[0234] Obtaining encrypted authentication information of the client, wherein the encrypted authentication information is generated by encrypting the user name, client password and machine code by the client using a preset shared key;
[0235] Using the client encrypted verification information to perform communication verification and after the communication verification is passed, creating a client session ID;
[0236] The user name, client password and machine code are encrypted using a preset shared key to obtain cloud encrypted verification information, and the customer session ID is sent to the client using the cloud encrypted verification information, so that the client can save the customer session ID to establish channel communication.
[0237] Optionally, the module for generating task processing information is further used to:
[0238] Acquire an encryption sequence sent by the client within a preset time interval, where the encryption sequence is information obtained by serializing and encrypting a message generated by the client using a user name and a current time;
[0239] After the activation verification is passed using the encryption sequence, the preset session list is refreshed and a response message is sent to the client, so that the client can determine the activation time after decrypting the response message, so that the communication channel between the client and the cloud remains activated.
[0240] Optionally, the module for generating task processing information is further used to:
[0241] Obtaining the request type of the client;
[0242] If the request type is a front-end user request, when the user ID of the front-end user corresponding to the client is obtained and it is determined that the user ID is online in the communication channel, the first task ID is generated using the user ID, and the task type is searched using the first task ID;
[0243] If the request type is a background task request, when the default ID corresponding to the client is obtained and it is determined that the default ID is online in the communication channel, the default ID is used to generate a second task ID, and the task type is searched using the second task ID.
[0244] Optionally, the module for generating task processing information is further used to:
[0245] If it is determined that the user ID is not online in the communication channel, a prompt message is displayed;
[0246] If it is determined that the default ID is not online in the communication channel, the client is added to a preset execution task list, and the task validity period of the client is set.
[0247] Optionally, the module for generating task processing information is further used to:
[0248] Creating an entity class object according to the task type, and setting properties of the entity class object based on type parameters corresponding to the task type to obtain a parameter object;
[0249] The parameter object is serialized and encrypted to obtain task processing information.
[0250] Optionally, the module for generating task processing information is further used to:
[0251] Obtain the object ID and entity class object corresponding to the parameter object;
[0252] Using the object ID to search for a client session ID and a preset shared key respectively, using the client session ID, the preset shared key and the object ID to generate a cloud key, and converting the entity class object into a cloud string in JSON format;
[0253] The cloud key is used to encrypt the cloud character string to obtain task processing information.
[0254] Optionally, the business processing module is used to:
[0255] When it is determined that the data ID corresponding to the task data is in the list, decrypting the task data to obtain decrypted data;
[0256] After the decrypted data is deserialized, a preset upper layer application is called to perform business processing on the deserialized data.
[0257] The embodiment of the present invention also provides a client, see Fig.12 , showing a schematic structural diagram of a client provided by an embodiment of the present invention.
[0258] Wherein, as an example, the client may include:
[0259] The task type sending module 201 is used to send the task type to the cloud after establishing communication with the cloud, so that the cloud can generate task processing information based on the task type encryption;
[0260] The data extraction module 202 is used to extract the corresponding task data from the intranet according to the task processing information after receiving the task processing information sent by the cloud, encrypt the task data and send it to the cloud so that the cloud can decrypt the task data and perform business processing on the decrypted task data.
[0261] Optionally, the sending task type module is further used to:
[0262] After loading the locally stored user name, client password and machine code, the user name, client password and machine code are encrypted using a preset shared key to obtain client encrypted verification information, and the client encrypted verification information is sent to the cloud, so that the cloud uses the client encrypted verification information for communication verification and creates a client session ID and generates cloud encrypted verification information after the communication verification passes;
[0263] After acquiring the client session ID, the client session ID is saved to establish channel communication.
[0264] Optionally, the sending task type module is further used to:
[0265] After obtaining the user name and the current time, a message is generated using the user name and the current time and serialized and encrypted in sequence to obtain an encrypted sequence;
[0266] Sending an encryption sequence to the cloud at a preset time interval, so that the cloud refreshes a preset session list after passing activation verification using the encryption sequence;
[0267] Receive a response message sent by the cloud, determine an activation time after decrypting the response message, and repeatedly send an encrypted sequence to the cloud according to the activation time to activate the communication channel.
[0268] Optionally, the sending task type module is further used to:
[0269] Decrypting the task processing information using a preset decryption key to obtain a decrypted message, wherein the preset decryption key is a key generated using the client session ID, the object ID and a preset shared key;
[0270] After deserializing the decrypted message to obtain a standard object, a client implementation class is created based on the standard object and a task type is determined;
[0271] Call the client implementation class to perform business operations according to the configuration and parameters corresponding to the task type, and obtain the operation results;
[0272] After the operation result is converted into a standard entity class, the standard entity class is serialized to obtain task data.
[0273] The embodiment of the present invention also provides a data transmission system, see Fig.13 , showing a schematic structural diagram of a data transmission system provided by an embodiment of the present invention.
[0274] Wherein, as an example, the data transmission system may include: a cloud and a client communicating with each other, the cloud is applicable to the data processing method as described in the above embodiment, and the client is applicable to the data processing method as described in the above embodiment.
[0275] Those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0276] Furthermore, an embodiment of the present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data processing method as described in the above embodiment is implemented.
[0277] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the data processing method described in the above embodiment.
[0278] Those skilled in the art will appreciate that the embodiments of the present application may also provide computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes.
[0279] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), apparatuses, and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0280] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0281] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0282] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data processing method, characterized in that: The method is applicable to a cloud communicating with a client, and the method comprises: After establishing communication with the client and obtaining the task type, encrypting and generating task processing information according to the task type and sending it to the client, so that the client can extract corresponding task data according to the task processing information; After obtaining the encrypted task data fed back by the client, decrypting the task data, and performing business processing on the decrypted task data; The acquisition task type includes: Obtaining the request type of the client; If the request type is a front-end user request, when the user ID of the front-end user corresponding to the client is obtained and it is determined that the user ID is online in the communication channel, the first task ID is generated using the user ID, and the task type is searched using the first task ID; If the request type is a background task request, when a default ID corresponding to the client is obtained and it is determined that the default ID is online in the communication channel, a second task ID is generated using the default ID, and the task type is searched using the second task ID.
2. The data processing method according to claim 1, characterized in that: The establishing communication with the client comprises: Obtaining encrypted authentication information of the client, wherein the encrypted authentication information is generated by encrypting the user name, client password and machine code by the client using a preset shared key; Using the client encrypted verification information to perform communication verification and after the communication verification is passed, creating a client session ID; The user name, client password and machine code are encrypted using a preset shared key to obtain cloud encrypted verification information, and the customer session ID is sent to the client using the cloud encrypted verification information, so that the client can save the customer session ID to establish channel communication.
3. The data processing method according to any one of claims 1 to 2, characterized in that: After the step of establishing communication with the client, the method further includes: Acquire an encryption sequence sent by the client within a preset time interval, where the encryption sequence is information obtained by serializing and encrypting a message generated by the client using a user name and a current time; After the activation verification is passed using the encryption sequence, the preset session list is refreshed and a response message is sent to the client, so that the client can determine the activation time after decrypting the response message, so that the communication channel between the client and the cloud remains activated.
4. The data processing method according to claim 1, characterized in that: The obtaining task type further includes: If it is determined that the user ID is not online in the communication channel, a prompt message is displayed; If it is determined that the default ID is not online in the communication channel, the client is added to a preset execution task list, and the task validity period of the client is set.
5. The data processing method according to claim 1, characterized in that: The step of generating task processing information according to the task type through encryption includes: Creating an entity class object according to the task type, and setting properties of the entity class object based on type parameters corresponding to the task type to obtain a parameter object; The parameter object is serialized and encrypted to obtain task processing information.
6. The data processing method according to claim 5, characterized in that: The serialization and encryption processing of the parameter object to obtain task processing information includes: Obtain the object ID and entity class object corresponding to the parameter object; Using the object ID to search for a client session ID and a preset shared key respectively, using the client session ID, the preset shared key and the object ID to generate a cloud key, and converting the entity class object into a cloud string in JSON format; The cloud key is used to encrypt the cloud character string to obtain task processing information.
7. The data processing method according to claim 1, characterized in that: The decrypting the task data and performing business processing on the decrypted task data includes: When it is determined that the data ID corresponding to the task data is in the list, decrypting the task data to obtain decrypted data; After the decrypted data is deserialized, a preset upper layer application is called to perform business processing on the deserialized data.
8. A data processing method, characterized in that: The method is applicable to a client communicating with a cloud, and the method comprises: After establishing communication with the cloud, sending the task type to the cloud, so that the cloud generates task processing information based on the encrypted task type; After receiving the task processing information sent by the cloud, extract the corresponding task data from the intranet according to the task processing information, encrypt the task data and send it to the cloud, so that the cloud can decrypt the task data and perform business processing on the decrypted task data; The method for determining the task type includes: The type of request sent to the cloud, if the request type is a front-end user request, the cloud obtains the user ID of the front-end user corresponding to the client and determines that the user ID is online in the communication channel, generates a first task ID using the user ID, and searches for the task type using the first task ID; If the request type is a background task request, the cloud obtains the default ID corresponding to the client and determines that the default ID is online in the communication channel, generates a second task ID using the default ID, and uses the second task ID to search for the task type.
9. The data processing method according to claim 8, characterized in that: The establishing communication with the cloud comprises: After loading the locally stored user name, client password and machine code, the user name, client password and machine code are encrypted using a preset shared key to obtain client encrypted verification information, and the client encrypted verification information is sent to the cloud, so that the cloud uses the client encrypted verification information for communication verification and creates a client session ID and generates cloud encrypted verification information after the communication verification passes; After acquiring the client session ID, the client session ID is saved to establish channel communication.
10. The data processing method according to any one of claims 8 to 9, characterized in that: After the step of establishing communication with the cloud, the method further includes: After obtaining the user name and the current time, a message is generated using the user name and the current time and serialized and encrypted in sequence to obtain an encrypted sequence; Sending an encryption sequence to the cloud at a preset time interval, so that the cloud refreshes a preset session list after passing activation verification using the encryption sequence; Receive a response message sent by the cloud, determine an activation time after decrypting the response message, and repeatedly send an encrypted sequence to the cloud according to the activation time to activate the communication channel.
11. The data processing method according to claim 8, characterized in that: The extracting corresponding task data from the intranet according to the task processing information includes: Decrypting the task processing information using a preset decryption key to obtain a decrypted message, wherein the preset decryption key is a key generated using the client session ID, the object ID and a preset shared key; After deserializing the decrypted message to obtain a standard object, a client implementation class is created based on the standard object and a task type is determined; Call the client implementation class to perform business operations according to the configuration and parameters corresponding to the task type, and obtain the operation results; After the operation result is converted into a standard entity class, the standard entity class is serialized to obtain task data.
12. A cloud, characterized in that: The cloud communicates with the client, and the cloud includes: A task processing information generating module is used to generate task processing information encrypted according to the task type and send it to the client after establishing communication with the client and obtaining the task type, so that the client can extract corresponding task data according to the task processing information; A business processing module, used for decrypting the encrypted task data fed back by the client after obtaining the encrypted task data, and performing business processing on the decrypted task data; The acquisition task type includes: Obtaining the request type of the client; If the request type is a front-end user request, when the user ID of the front-end user corresponding to the client is obtained and it is determined that the user ID is online in the communication channel, the first task ID is generated using the user ID, and the task type is searched using the first task ID; If the request type is a background task request, when a default ID corresponding to the client is obtained and it is determined that the default ID is online in the communication channel, a second task ID is generated using the default ID, and the task type is searched using the second task ID.
13. A client, characterized in that: The client communicates with the cloud, and the client includes: A task type sending module, used for sending the task type to the cloud after establishing communication with the cloud, so that the cloud generates task processing information based on the encrypted task type; A data extraction module is used to extract corresponding task data from the intranet according to the task processing information after receiving the task processing information sent by the cloud, encrypt the task data and send it to the cloud so that the cloud can decrypt the task data, and perform business processing on the decrypted task data; The method for determining the task type includes: The type of request sent to the cloud, if the request type is a front-end user request, the cloud obtains the user ID of the front-end user corresponding to the client and determines that the user ID is online in the communication channel, generates a first task ID using the user ID, and searches for the task type using the first task ID; If the request type is a background task request, the cloud obtains the default ID corresponding to the client and determines that the default ID is online in the communication channel, generates a second task ID using the default ID, and uses the second task ID to search for the task type.
14. A data transmission system, characterized in that: The data transmission system comprises: a cloud and a client communicating with each other, the cloud is applicable to the data processing method according to any one of claims 1 to 7, and the client is applicable to the data processing method according to any one of claims 8 to 11.
15. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data processing method according to any one of claims 1 to 7 or the data processing method according to any one of claims 8 to 11 is implemented.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the data processing method according to any one of claims 1 to 7 or the data processing method according to any one of claims 8 to 11.
