Differential data dynamic proxy method and device, electronic equipment and storage medium

By using a differentiated data dynamic proxy method, dynamic proxy field data objects are parsed and generated, solving the adaptation and processing cost problems added in existing technologies and achieving efficient data type processing.

CN116980477BActive Publication Date: 2026-04-24BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2023-07-31
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In existing technologies, after receiving data requests from live streaming or live streaming SaaS environments, data servers need to perform differentiated logic processing on the differentiated response data fields, which increases adaptation and processing costs.

Method used

A differentiated data dynamic proxy method is proposed. By receiving the response data packet from the server, parsing and generating differentiated dynamic proxy field data objects, the method directly distributes them to the business layer to access the differentiated response field data, thus avoiding repeated logical judgments for different operating environments.

Benefits of technology

It reduces business adaptation and processing costs, simplifies data type processing logic in different operating environments, and improves processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116980477B_ABST
    Figure CN116980477B_ABST
Patent Text Reader

Abstract

The present disclosure provides a differentiated data dynamic proxy method and device, electronic equipment and storage medium. The method comprises: receiving response data packets fed back by a server in response to a data request issued by a current running environment, analyzing the response data packets to obtain current running environment differentiated response field data of a differentiated response field identifiable by the current running environment, generating differentiated dynamic proxy field data objects based on the current running environment differentiated response field data, preset differentiated dynamic proxy field data corresponding to the differentiated response field, and the data type of the differentiated response field in the current running environment, and distributing the differentiated dynamic proxy field data objects to a service layer of the current running environment, thereby reducing service adaptation costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to a method, apparatus, electronic device, and storage medium for dynamic proxy of differentiated data. Background Technology

[0002] In existing technologies, after receiving data requests from live streaming or live streaming SaaS environments, data servers need to perform differentiated logical processing on the different response data fields for live streaming and live streaming SaaS. That is, they need to parse the data into the corresponding data type according to the corresponding environment, and then perform corresponding processing for different data types. This increases adaptation and processing costs.

[0003] Therefore, it is necessary to propose a differentiated data dynamic proxy method to solve at least one of the above-mentioned technical problems. Summary of the Invention

[0004] Embodiments of this disclosure provide a method, apparatus, electronic device, and storage medium for dynamic proxying of differentiated data.

[0005] Firstly, this disclosure provides a differentiated data dynamic proxy method, including:

[0006] Receive response data packets from the server in response to data requests issued by the current operating environment. The response data packets include differentiated response field data, where the data types of the differentiated response fields are different in different operating environments.

[0007] The response data packet is parsed to obtain the differentiated response field data that can be recognized in the current operating environment.

[0008] Based on the differentiated response field data in the current runtime environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current runtime environment, a differentiated dynamic proxy field data object is generated.

[0009] Distribute the differentiated dynamic proxy field data object to the business layer of the current runtime environment so that the business layer can call the dynamic methods in the differentiated dynamic proxy field data object to access the differentiated response field data in the differentiated dynamic proxy field data object.

[0010] In some optional implementations, the response data packet also includes indistinguishable response field data, which has the same data type across different operating environments; and

[0011] The response data packet is parsed to obtain the differentiated response field data that is identifiable in the current runtime environment, including:

[0012] The response data packet is parsed to obtain the differentiated response field data and the non-differential response field data that are identifiable in the current operating environment.

[0013] Distribute the undifferentiated response field data of the current operating environment to the business layer of the current operating environment.

[0014] In some optional implementations, a differentiated dynamic proxy field data object is generated based on the differentiated response field data of the current runtime environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current runtime environment, including:

[0015] Determine the current operating environment;

[0016] Determine the data types corresponding to both the differentiated response fields and the current runtime environment;

[0017] Based on the differentiated response field data of the current operating environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the determined data type, a differentiated dynamic proxy field data object is generated.

[0018] In some optional implementations, the differentiated dynamic proxy field data object includes dynamic data and dynamic methods, wherein the dynamic data includes the field name, data type, and data value of the differentiated response field, and the dynamic methods are used to manipulate the dynamic data.

[0019] In some alternative implementations, before receiving the response data packet from the server in response to a data request issued by the current operating environment, the method further includes:

[0020] A data request is sent to the server. The data request includes the field names of the differentiated response fields. The server obtains the source data based on the data request, generates the differentiated response field data based on the source data, and generates and sends back a response data packet based on the differentiated response field data.

[0021] In some optional implementations, the data request may also include the response data type corresponding to the differentiated response fields; and

[0022] The server retrieves the source data based on the data request, including:

[0023] The server retrieves the source data corresponding to the differentiated response fields;

[0024] Differentiated response field data is generated based on the source data, including:

[0025] The source data corresponding to the differentiated response field is converted into the response data type corresponding to the differentiated response field, and the converted data is identified as the differentiated response field data.

[0026] In some optional implementations, the data request may also include indistinguishable response field data, where the data type of the indistinguishable response field is the same across different operating environments; and

[0027] The server retrieves the source data based on the data request, including:

[0028] The server retrieves the source data corresponding to the fields in the undifferentiated response.

[0029] Generate and return response data packets based on differentiated response field data, including:

[0030] A response data packet is generated and fed back based on the source data corresponding to the differentiated response field data and the undifferentiated response field data.

[0031] Secondly, this disclosure provides a differentiated data dynamic proxy device, comprising:

[0032] The receiving unit is used to receive the response data packet sent by the server in response to the data request issued by the current operating environment. The response data packet includes differentiated response field data, wherein the data types of the differentiated response fields are different in different operating environments.

[0033] The parsing unit is used to parse the response data packet to obtain the differentiated response field data that can be recognized in the current operating environment.

[0034] The generation unit is used to generate a differentiated dynamic proxy field data object based on the differentiated response field data in the current runtime environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current runtime environment.

[0035] The distribution unit is used to distribute the differentiated dynamic proxy field data object to the business layer of the current runtime environment, so that the business layer can call the dynamic methods in the differentiated dynamic proxy field data object to access the differentiated response field data in the differentiated dynamic proxy field data object.

[0036] Thirdly, this disclosure provides an electronic device, including:

[0037] One or more processors;

[0038] Storage device, on which one or more programs are stored,

[0039] When the above-described one or more programs are executed by the above-described one or more processors, the above-described one or more processors implement the method as described in any embodiment of the first aspect of this disclosure.

[0040] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method described in any embodiment of the first aspect of this disclosure.

[0041] The differentiated data dynamic proxy method, apparatus, electronic device, and storage medium provided in the embodiments of this disclosure first receive a response data packet from the server in response to a data request issued by the current operating environment. The response data packet includes differentiated response field data, wherein the data type of the differentiated response field is different in different operating environments. Then, the response data packet is parsed to obtain differentiated response field data for the current operating environment that can be recognized by the differentiated response field in the current operating environment. Next, based on the differentiated response field data for the current operating environment, a preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current operating environment, a differentiated dynamic proxy field data object is generated. Finally, the differentiated dynamic proxy field data object is distributed to the business layer of the current operating environment so that the business layer can call the dynamic methods in the differentiated dynamic proxy field data object to access the differentiated response field data in the differentiated dynamic proxy field data object. By generating differentiated dynamic proxy field data objects, the business layer can directly access differentiated response field data within these objects by calling dynamic methods. This eliminates the need for the business layer to first determine the current runtime environment, parse the differentiated response field data into a data type recognizable by that environment, and then perform actions based on that data type. It also eliminates the need for different differentiated logic for different runtime environments, reducing business adaptation costs and the processing costs caused by inconsistent data types of differentiated response field data across different runtime environments. Attached Figure Description

[0042] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings:

[0043] Figure 1 This is a system architecture diagram of one embodiment of the differentiated data dynamic proxy system according to the present disclosure;

[0044] Figure 2 This is a flowchart of an embodiment of the differentiated data dynamic proxy method according to this disclosure;

[0045] Figure 3 This is a schematic diagram of a structure of an embodiment of the differentiated data dynamic agent device according to the present disclosure;

[0046] Figure 4 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present disclosure. Detailed Implementation

[0047] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0048] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0049] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the differentiated data dynamic proxy method, apparatus, terminal device, and storage medium of this disclosure can be applied.

[0050] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0051] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications, such as live streaming applications and web browser applications, can be installed on terminal devices 101, 102, and 103.

[0052] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with microphones and speakers, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), portable computers, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as multiple software programs or software modules (e.g., receiving response data packets from the server in response to data requests issued by the current operating environment) or as a single software program or software module. No specific limitations are imposed here.

[0053] Server 105 can be a server that provides various services, such as a backend server that processes data requests sent from terminal devices 101, 102, and 103. The backend server can process the data requests sent by the terminal devices accordingly.

[0054] In some cases, the differentiated data dynamic proxy method provided in this disclosure can be jointly executed by terminal devices 101, 102, and 103 and server 105. For example, the "data request" step can be executed by terminal devices 101, 102, and 103, and the "obtain source data according to the data request" step can be executed by server 105. This disclosure does not limit this. Correspondingly, the differentiated data dynamic proxy device can also be respectively set in terminal devices 101, 102, and 103 and server 105.

[0055] In some cases, the differentiated data dynamic proxy method provided in this disclosure can be executed by terminal devices 101, 102, and 103. Correspondingly, the differentiated data dynamic proxy device can also be set in terminal devices 101, 102, and 103. In this case, the system architecture 100 may not include server 105.

[0056] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.

[0057] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0058] Continue to refer to Figure 2 , Figure 2 A flowchart 200 is shown as an embodiment of the differentiated data dynamic proxy method according to this disclosure. Figure 2 The differentiated data dynamic proxy method shown can be applied to Figure 1 The terminal device shown in the figure. The process 200 includes the following steps:

[0059] Step 201: Receive the response data packet from the server in response to the data request issued by the current operating environment.

[0060] In this embodiment, the response data packet includes differentiated response field data, wherein the data type of the differentiated response fields differs in different operating environments.

[0061] The server can be a data server, which can send response data packets to the client.

[0062] In some alternative implementations, the current operating environment can be a live streaming app with live streaming capabilities, or a live streaming SaaS that has live streaming capabilities and is based on a SaaS model.

[0063] Different operating environments correspond to different SDKs (Software Development Kits).

[0064] For example, the data types that need to be returned to the live streaming app and the live streaming SaaS are different for some fields.

[0065] For example, for the roomid field, the data to be returned to the live streaming app should be a long integer, while the data to be returned to the live streaming SaaS app should be a string.

[0066] Differentiated response fields indicate that the type of field data to be returned differs depending on the operating environment. In other words, the data type of a differentiated response field varies across different operating environments.

[0067] In some alternative implementations, the current operating environment may also be software, a web page, or hosted software, or software, a web page, or hosted software based on SaaS.

[0068] Step 202: Parse the response data packet to obtain the differentiated response field data that can be recognized in the current operating environment.

[0069] In this embodiment, the response data packet is a data packet sent back by the server in response to a data request issued by the current operating environment.

[0070] The response data packet is parsed, that is, the differentiated response field data in the response data packet is parsed to obtain the differentiated response field data that can be recognized in the current operating environment.

[0071] For example, if the current operating environment is a live streaming app, the `roomid` field in the differentiated response is parsed to obtain a long integer type data that can be recognized in the live streaming app environment. If the current operating environment is a live streaming SaaS, the `roomid` field in the differentiated response is parsed to obtain a string type data that can be recognized in the live streaming SaaS environment.

[0072] In some alternative implementations, the response data packet may also include indistinguishable response field data, which have the same data type across different operating environments.

[0073] Undifferentiated response fields indicate that the data type of the fields to be returned is the same across different operating environments. In other words, undifferentiated response fields have the same data type across different operating environments.

[0074] Based on the above optional implementation methods, step 202 can optionally be performed as follows:

[0075] First, the response data packet is parsed to obtain the differentiated response field data and the non-differentiated response field data that are identifiable in the current operating environment.

[0076] Then, the undifferentiated response field data of the current operating environment is distributed to the business layer of the current operating environment for use.

[0077] In this embodiment, the business layer refers to a layer in the software architecture. For the purpose of reuse and decoupling, the software architecture is generally divided into a base layer, service layer, data layer and business layer from high to low. In the live streaming environment, the business layer can be the UI interface visible to the user and belongs to the highest layer. The data layer is used to encapsulate API interface requests. The business layer depends on the data layer to connect to the server API interface to obtain response data packets.

[0078] Step 203: Generate a differentiated dynamic proxy field data object based on the differentiated response field data of the current running environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current running environment.

[0079] In this embodiment, the preset differentiated dynamic proxy field data class is a differentiated dynamic proxy field data class pre-created for the differentiated response field.

[0080] Creating a class refers to defining a differentiated dynamic proxy field data class in a public code file, and maintaining an id type value inside the differentiated dynamic proxy field data class. That is, defining a variable in the differentiated dynamic proxy field data class, the type of which is id. The id type can be a type specific to iOS devices, and it can be in pointer form.

[0081] Generating a differentiated dynamic proxy field data object involves instantiating a differentiated dynamic proxy field data class. Specifically, based on the differentiated response field data and the data type of the differentiated response field in the current runtime environment, a preset differentiated dynamic proxy field data class corresponding to the differentiated response field is instantiated to generate a differentiated dynamic proxy field data object.

[0082] Differentiated dynamic field data objects include differentiated dynamic proxy field data, which can point to data of any type.

[0083] In some optional implementations, a differentiated dynamic proxy field data object can be generated based on the differentiated response field data of the current runtime environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current runtime environment.

[0084] First, determine the current runtime environment. Then, determine the data types corresponding to both the differentiated response fields and the current runtime environment. Finally, based on the differentiated response field data of the current runtime environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response fields, and the determined data types, generate a differentiated dynamic proxy field data object.

[0085] For example, if the current operating environment is determined to be a live streaming app, and the data type corresponding to the differentiated response field roomid and the live streaming app is determined to be a long integer data type, then a differentiated dynamic proxy field data object is generated based on the live streaming app's differentiated response field data, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field roomid, and the determined data type long integer.

[0086] In some alternative implementations, the differentiated dynamic proxy field data object includes dynamic data and dynamic methods, wherein the dynamic data includes the field name, data type, and data value of the differentiated response field, and the dynamic methods are used to manipulate the dynamic data.

[0087] Step 204: Distribute the differentiated dynamic proxy field data object to the business layer of the current runtime environment so that the business layer can call the dynamic methods in the differentiated dynamic proxy field data object to access the differentiated response field data in the differentiated dynamic proxy field data object.

[0088] In this embodiment, the differentiated dynamic proxy field data object is distributed to the business layer of the current runtime environment so that the business layer can call the dynamic methods in the differentiated dynamic proxy field data to access the differentiated response field data in the differentiated dynamic proxy field data object.

[0089] In other words, when the business layer uses the differentiated dynamic proxy field data object, it can access the specific differentiated response field data by calling the corresponding dynamic methods.

[0090] For different data types, there are corresponding dynamic methods in their respective preset differentiated dynamic proxy field data classes.

[0091] For example, long integer data types have corresponding dynamic methods, and string data types have corresponding dynamic methods. For the differentiated dynamic proxy field data object of the roomid field in a live streaming app, the dynamic method corresponding to the long integer data type can be called.

[0092] When the business layer uses fields with different data types, it can call the corresponding dynamic methods respectively.

[0093] In some alternative implementations, before receiving the response data packet from the server in response to the data request issued by the current operating environment, the client sends a data request to the server. The data request includes the field names of the differentiated response fields. The server obtains the source data according to the data request, generates the differentiated response field data based on the source data, and generates and sends back a response data packet based on the differentiated response field data.

[0094] In some alternative implementations, the client sends the request to the server. This can be done by sending the request to different servers depending on the operating environment. For example, for a live streaming app, the data request can be sent to the live streaming app's server, while for a live streaming SaaS, the data request can be sent to the live streaming SaaS's server.

[0095] After receiving a data request from a client, different servers can call the same data query service API interface to send a data request to the same data server.

[0096] For example, the server-side of a live streaming app and the server-side of a live streaming SaaS can call the same API interface to send data requests to the same data server.

[0097] In some optional implementations, the data request may also include the response data type corresponding to the differentiated response field, and the server can obtain the source data accordingly based on the data request, where the server refers to the data server.

[0098] Here, we obtain source data, which can be obtained from a database or from real-time video data.

[0099] First, the server can obtain the source data corresponding to the differentiated response fields, and then generate the differentiated response field data based on the source data.

[0100] Specifically, differentiated response field data is generated based on source data, the source data corresponding to the differentiated response fields is converted into the response data type corresponding to the differentiated response fields, and the converted data is identified as differentiated response field data.

[0101] In some optional implementations, the data request may also include indistinguishable response field data, where the data type is the same across different operating environments. Thus, the server can retrieve the source data based on the data request as follows:

[0102] First, the server obtains the source data corresponding to the undifferentiated response fields. Then, it generates and sends back a response data packet based on the differentiated response field data. Specifically, the server generates and sends back a response data packet based on the differentiated response field data and the source data corresponding to the undifferentiated response fields. That is, the data server merges the differentiated response field data and the undifferentiated response field data to generate a response data packet and sends it back to the client.

[0103] The differentiated data dynamic proxy method, apparatus, electronic device, and storage medium provided in the embodiments of this disclosure first receive a response data packet from the server in response to a data request issued by the current operating environment. The response data packet includes differentiated response field data, wherein the data type of the differentiated response field is different in different operating environments. Then, the response data packet is parsed to obtain differentiated response field data for the current operating environment that can be recognized by the differentiated response field in the current operating environment. Next, based on the differentiated response field data for the current operating environment, a preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current operating environment, a differentiated dynamic proxy field data object is generated. Finally, the differentiated dynamic proxy field data object is distributed to the business layer of the current operating environment so that the business layer can call the dynamic methods in the differentiated dynamic proxy field data object to access the differentiated response field data in the differentiated dynamic proxy field data object. By generating differentiated dynamic proxy field data objects, the business layer can directly access differentiated response field data within these objects by calling dynamic methods. This eliminates the need for the business layer to first determine the current runtime environment, parse the differentiated response field data into a data type recognizable by that environment, and then perform actions based on that data type. It also eliminates the need for different differentiated logic for different runtime environments, reducing business adaptation costs and the comprehension costs caused by inconsistent data types of differentiated response field data across different runtime environments.

[0104] Further reference Figure 3 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a differentiated data dynamic proxy device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various terminal devices.

[0105] like Figure 3 As shown, the differentiated data dynamic proxy device of this embodiment includes a receiving unit 301, a parsing unit 302, a generating unit 303, a distributing unit 304, a determining unit 305, a sending unit 306, and an acquiring unit 307.

[0106] In this embodiment, the specific processing of the receiving unit 301, parsing unit 302, generating unit 303, distributing unit 304, determining unit 305, sending unit 306, and acquiring unit 307 of the differentiated data dynamic proxy device, and the resulting technical effects, can be referred to respectively. Figure 2The relevant descriptions of steps 201 to 204 in the corresponding embodiments will not be repeated here.

[0107] The receiving unit 301 is used to receive a response data packet from the server in response to a data request issued by the current operating environment. The response data packet includes differentiated response field data, wherein the data types of the differentiated response fields are different in different operating environments.

[0108] The parsing unit 302 is used to parse the response data packet to obtain the current operating environment differentiated response field data that can be identified in the current operating environment.

[0109] The generation unit 303 is used to generate a differentiated dynamic proxy field data object based on the differentiated response field data of the current running environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current running environment.

[0110] The distribution unit 304 is used to distribute the differentiated dynamic proxy field data object to the business layer of the current running environment, so that the business layer can call the dynamic method in the differentiated dynamic proxy field data object to access the differentiated response field data in the differentiated dynamic proxy field data object.

[0111] In some optional implementations, the response data packet also includes indistinguishable response field data, which has the same data type across different operating environments; and

[0112] Parsing unit 303 is also used to parse the response data packet to obtain differentiated response field data that can be recognized in the current runtime environment, including:

[0113] The parsing unit 302 is also used to parse the response data packet to obtain the differentiated response field data and the non-differential response field data that are identifiable in the current operating environment.

[0114] The distribution unit 304 is also used to distribute the non-differentiated response field data of the current operating environment to the business layer of the current operating environment.

[0115] In some optional implementations, the generation unit 303 is further configured to generate a differentiated dynamic proxy field data object based on the differentiated response field data of the current runtime environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current runtime environment, including:

[0116] Unit 305 is used to determine the current operating environment.

[0117] The determination unit 305 is also used to determine the data type corresponding to both the differentiated response field and the current operating environment.

[0118] The generation unit 303 is also used to generate a differentiated dynamic proxy field data object based on the differentiated response field data of the current running environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the determined data type.

[0119] In some optional implementations, the differentiated dynamic proxy field data object includes dynamic data and dynamic methods, wherein the dynamic data includes the field name, data type, and data value of the differentiated response field, and the dynamic methods are used to manipulate the dynamic data.

[0120] In some optional implementations, the receiving unit 301 is further configured to, before receiving the response data packet sent by the server in response to a data request issued by the current operating environment, include:

[0121] The sending unit 306 is used to send a data request to the server. The data request includes the field names of the differentiated response fields. The server obtains the source data according to the data request, generates the differentiated response field data based on the source data, and generates and sends back a response data packet based on the differentiated response field data.

[0122] In some optional implementations, the data request may also include the response data type corresponding to the differentiated response fields; and

[0123] Acquisition unit 307 is used by the server to obtain source data according to the data request, including:

[0124] The acquisition unit 307 is also used by the server to obtain the source data corresponding to the differentiated response fields.

[0125] Generation unit 303 is also used to generate differentiated response field data based on the source data, including:

[0126] The generation unit 303 converts the source data corresponding to the differentiated response field into the response data type corresponding to the differentiated response field, and is also used to determine the converted data as the differentiated response field data.

[0127] In some optional implementations, the data request may also include indistinguishable response field data, where the data type of the indistinguishable response field is the same across different operating environments; and

[0128] Acquisition unit 307 is also used by the server to obtain source data according to the data request, including:

[0129] The acquisition unit 307 is also used by the server to obtain the source data corresponding to the undifferentiated response field.

[0130] The generation unit 303 is also used to generate and feed back response data packets based on the differentiated response field data, including:

[0131] The generation unit 303 is also used to generate and feed back response data packets based on the source data corresponding to the differentiated response field data and the undifferentiated response field data.

[0132] It should be noted that the implementation details and technical effects of each unit in the differentiated data dynamic proxy device provided in the embodiments of this disclosure can be referred to the descriptions of other embodiments in this disclosure, and will not be repeated here.

[0133] The following is for reference. Figure 4 It shows a schematic diagram of the structure of a computer system 400 suitable for implementing the terminal device of this disclosure. Figure 4 The computer system 400 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0134] like Figure 4 As shown, the computer system 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the computer system 400. The processing device 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 404 is also connected to the bus 404.

[0135] Typically, the following devices can be connected to I / O interface 404: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows computer system 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 A computer system 400 with various electronic devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0136] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.

[0137] It should be noted that the computer-readable medium described above in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0138] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0139] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the following functions: Figure 2The illustrated embodiments and their alternative implementations demonstrate a differentiated data dynamic proxy method.

[0140] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0142] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the units are not necessarily limiting in certain circumstances; for example, a receiving unit can also be described as "a unit for receiving response data packets".

[0143] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

Claims

1. A method for dynamic proxy of differentiated data, characterized in that, The method includes: The system receives a response data packet from the server in response to a data request issued by the current operating environment. The response data packet includes differentiated response field data, wherein the data types of the differentiated response fields are different in different operating environments. The response data packet is parsed to obtain the current operating environment differentiated response field data that can be identified in the current operating environment; Based on the differentiated response field data of the current operating environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current operating environment, a differentiated dynamic proxy field data object is generated; The differentiated dynamic proxy field data object is distributed to the business layer of the current runtime environment so that the business layer can call the dynamic methods in the differentiated dynamic proxy field data object to access the differentiated response field data in the differentiated dynamic proxy field data object.

2. The method according to claim 1, characterized in that, The response data packet also includes indistinguishable response field data, which has the same data type across different operating environments; and The step of parsing the response data packet to obtain the differentiated response field data that is identifiable in the current operating environment includes: The response data packet is parsed to obtain the differentiated response field data and the non-differentiated response field data that are identifiable in the current operating environment. The data of the undifferentiated response field in the current operating environment is distributed to the business layer of the current operating environment.

3. The method according to claim 1, characterized in that, The step of generating a differentiated dynamic proxy field data object based on the differentiated response field data of the current operating environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current operating environment includes: Determine the current operating environment; Determine the data types corresponding to both the differentiated response field and the current operating environment; Based on the differentiated response field data of the current operating environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the determined data type, the differentiated dynamic proxy field data object is generated.

4. The method according to claim 1, characterized in that, The differentiated dynamic proxy field data object includes dynamic data and dynamic methods. The dynamic data includes the field name, data type, and data value of the differentiated response field, and the dynamic methods are used to manipulate the dynamic data.

5. The method according to claim 1, characterized in that, Before receiving the response data packet from the server in response to a data request issued by the current operating environment, the method further includes: A data request is sent to the server, the data request including the field name of the differentiated response field, wherein the server obtains source data according to the data request, generates the differentiated response field data based on the source data, and generates and sends back a response data packet based on the differentiated response field data.

6. The method according to claim 5, characterized in that, The data request also includes the response data type corresponding to the differentiated response field; as well as The server obtains source data based on the data request, including: The server obtains the source data corresponding to the differentiated response field; The process of generating the differentiated response field data based on the source data includes: The source data corresponding to the differentiated response field is converted into the response data type corresponding to the differentiated response field, and the converted data is determined as the differentiated response field data.

7. The method according to claim 5, characterized in that, The data request also includes indiscriminate response field data, which has the same data type in different operating environments; as well as The server obtains source data based on the data request, including: The server obtains the source data corresponding to the undifferentiated response field; The process of generating and feeding back a response data packet based on the differentiated response field data includes: A response data packet is generated and fed back based on the source data corresponding to the differentiated response field data and the undifferentiated response field data.

8. A differentiated data dynamic proxy device, comprising: The receiving unit is used to receive a response data packet from the server in response to a data request issued by the current operating environment. The response data packet includes differentiated response field data, wherein the data types of the differentiated response fields are different in different operating environments. The parsing unit is used to parse the response data packet to obtain the current operating environment differentiated response field data that can be identified in the current operating environment. The generation unit is used to generate a differentiated dynamic proxy field data object based on the differentiated response field data of the current running environment, the preset differentiated dynamic proxy field data class corresponding to the differentiated response field, and the data type of the differentiated response field in the current running environment. The distribution unit is used to distribute the differentiated dynamic proxy field data object to the business layer of the current runtime environment, so that the business layer can call the dynamic methods in the differentiated dynamic proxy field data object to access the differentiated response field data in the differentiated dynamic proxy field data object.

9. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by one or more processors, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for overcoming field conflict in multi-language development system

    CN106843888A

  • HBase-based heterogeneous database online exchange and sharing system in big data environment

    CN107045534A