Service data transmission method, system and storage medium, and related device
Patent Information
- Authority / Receiving Office
- HK · HK
- Patent Type
- Patents
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-07-21
- Publication Date
- 2026-07-17
AI Technical Summary
In existing map application systems, the transmission of 3D map rendering results cannot be guaranteed under poor network conditions, resulting in unstable transmission.
By setting up business processing instances in the business server cluster and having the signaling server manage and allocate idle and well-maintained resources, a connection is established between the business terminal and the business server to transmit business rendering data.
It improved the stability and efficiency of business data transmission, ensuring that 3D map rendering results could be transmitted normally even under poor network conditions, thus enhancing the user experience.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to methods, systems, storage media and related equipment for business data transmission. Background Technology
[0002] With the development of image data processing technology, many image processing-based applications have emerged, such as map applications. In map applications, in order to provide users with more realistic map information, 3D maps are often provided.
[0003] Currently, in map application systems, users can directly access the map server through a map client. The map server is equipped with 3D map rendering capabilities. For example, an executable program providing rendering engine services can be stored on the map server. This allows the map server to directly transmit the 3D map rendering results to the map client for display. However, currently, any existing map client needs to connect to a fixed map server to obtain the 3D map rendering results. This fixed map server then transmits the 3D map rendering results from each map client. In situations with poor network conditions, the transmission of 3D map rendering results cannot be guaranteed. Summary of the Invention
[0004] The embodiments of the present invention provide a business data transmission method, system, storage medium, and related equipment, which can guarantee the transmission of business data.
[0005] One embodiment of the present invention provides a service data transmission method, comprising:
[0006] Receive service connection requests sent by service terminals;
[0007] The first service processing instance corresponding to the service connection request is determined; the first service processing instance is set in the service server cluster and is used to generate service rendering data and transmit the service rendering data to the service terminal.
[0008] Determine the network transmission interfaces corresponding to the business server and business terminal to which the first business processing instance belongs;
[0009] A connection is established between the business server and the business terminal based on their respective network transmission interfaces, so that the first business processing instance can transmit business rendering data to the business terminal.
[0010] Another embodiment of the present invention provides a business data transmission system, including:
[0011] The connection request unit is used to receive service connection requests sent by the service terminal;
[0012] An instance determination unit is used to determine the first service processing instance corresponding to the service connection request; the first service processing instance is set in a service server cluster and is used to generate service rendering data and transmit the service rendering data to the service terminal.
[0013] An interface determination unit is used to determine the network transmission interfaces corresponding to the business server and business terminal to which the first business processing instance belongs.
[0014] The connection transmission unit is used to establish a connection between the business server and the business terminal according to the network transmission interfaces corresponding to the business server and the business terminal respectively, so that the first business processing instance can transmit business rendering data to the business terminal.
[0015] Another aspect of this invention provides a computer-readable storage medium storing a plurality of computer programs adapted for loading by a processor and executing the business data transmission method as described in one aspect of this invention.
[0016] Another embodiment of the present invention provides a server, including a processor and a memory;
[0017] The memory is used to store multiple computer programs, which are loaded and executed by a processor as described in one aspect of the present invention for the business data transmission method; the processor is used to implement each of the multiple computer programs.
[0018] As can be seen, in the method of this embodiment, by setting up service processing instances on each service server in the service server cluster, when a service terminal initiates a service connection request, the signaling server can specify a certain service processing instance in the service server cluster and establish a connection between the service terminal and the service server to which the specified service processing instance belongs, and transmit service rendering data through the established connection. In this way, the signaling server centrally manages and allocates the service processing instances set up in the server cluster, so that when a service terminal initiates a service connection request, the signaling server can allocate an idle and well-maintained resource (i.e., the first service processing instance) to the service terminal, thereby ensuring the connection between the service terminal and the service server and subsequent service data transmission, while improving the utilization rate of the service processing instances deployed in the background. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of a business system to which a business data transmission method provided in an embodiment of the present invention is applied;
[0021] Figure 2 This is a flowchart of a business data transmission method provided in an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of the map system used in the business data transmission method of one application embodiment of the present invention;
[0023] Figure 4 This is an interactive schematic diagram of a map system in one application embodiment of the present invention;
[0024] Figure 5 This is a schematic diagram of the state changes of a three-dimensional Earth instance in one application embodiment of the present invention;
[0025] Figure 6 This is a flowchart of a business data transmission method provided in an application embodiment of the present invention;
[0026] Figure 7 This is a schematic diagram of a distributed system to which the business data transmission method of this invention is applied in another application embodiment of the invention;
[0027] Figure 8 This is a schematic diagram of the block structure in another application embodiment of the present invention;
[0028] Figure 9 This is a schematic diagram of the logical structure of a business data transmission system provided in an embodiment of the present invention;
[0029] Figure 10 This is a schematic diagram of the logical structure of a server provided in an embodiment of the present invention. Detailed Implementation
[0030] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] This invention provides a service data transmission method, which can be mainly applied to, for example... Figure 1 The business system shown may include: a business terminal 10, a signaling server 11, and a business server cluster. The business server cluster may include multiple business servers 12 (the diagram illustrates n business servers as an example), wherein:
[0033] The business terminal 10 is used to initiate a business connection request. After connecting to the business server 12 based on the business connection request, it can also initiate a business data request to the business server 12 and display the business rendering data returned by the business server 12 based on the business data request.
[0034] In specific applications, the service terminal 10 can be a mobile phone, computer, smart voice interaction device, smart home appliance, vehicle terminal, etc., that has a business application or browser installed. The business involved in the service terminal 10 may include, but is not limited to, the following: 3D map business, image business, etc., and the corresponding business rendering data may also include 3D map rendering data, image rendering data, etc.
[0035] The signaling server 11 manages the business server cluster and the business processing instances 120 configured on the business servers 12 within the cluster. This includes monitoring the usage status of these business processing instances 120, such as their number, health status, and network connection quality. When it receives a business connection request from a business terminal 10, it assigns a corresponding business processing instance 120 to the business terminal 10 and establishes a connection between the business terminal 10 and the business server 12 to which the specified business processing instance 120 belongs.
[0036] In specific applications, the signaling server 11 can be a web server or other servers.
[0037] At least one business processing instance 120 can be set up in the business server 12. When any business processing instance 120 is started, it can establish a connection with a business terminal 10, form business rendering data, and transmit business rendering data to the business terminal 10.
[0038] In practical applications, the business server 12 can be a physical machine or a virtualized virtual machine. The business processing instance 120 mainly includes a computer executable file. During startup, the computer executable file can be cached in the memory of the business server 12, and the business processing instance 120 can be pre-started before the business terminal 10 initiates a business connection request. In this way, when the business terminal 10 initiates a business connection request, the startup time of the business processing instance 120 can be saved, thereby shortening the time required to establish a connection with the corresponding business processing instance 120.
[0039] In this embodiment of the invention, after the service processing instance 120 is started, its information can be added to the instance pool pre-configured by the signaling server 11 to facilitate the management of the service processing instance 120 by the signaling server 11. When the service processing instance 120 is first started and added to the instance pool, its state is idle; however, once the service processing instance 120 establishes a connection with a service terminal 10, its state becomes non-idle.
[0040] The instance pool mainly includes information about the business processing instance 120 set in the business server cluster. By adding the business processing instance 120 to the pre-set instance pool, the signaling server 11 can manage the business processing instance 120 in the business server cluster in a unified manner.
[0041] like Figure 2 As shown, the signaling server 11 in the business system can realize business data transmission through the following steps: Step 101, receive the business connection request sent by the business terminal 10.
[0042] Step 102: Determine the first service processing instance corresponding to the service connection request. The first service processing instance is used to generate service rendering data and transmit the service rendering data to the service terminal 10.
[0043] Specifically, if there is an idle service processing instance 120 in the pre-set instance pool, the signaling server 11 can identify an idle service processing instance in the pre-set instance pool as the first service processing instance.
[0044] Furthermore, if there are no idle service processing instances 120 in the pre-configured instance pool, the signaling server 11 will detect whether a certain service processing instance 120 is starting up in the service server cluster. If so, when a service processing instance 120 in the service server cluster completes its startup, the started service processing instance will be identified as the first service processing instance.
[0045] Furthermore, if there are no idle business processing instances 120 in the preset instance pool, and no business processing instances 120 are starting in the business server cluster, then the load of the business server cluster needs to be detected; when the load of the business server cluster does not reach the preset load value, a new business processing instance 120 is started from a business server 12 in the business server cluster, and the newly started business processing instance 120 is determined as the first business processing instance.
[0046] The load of the business server cluster can be represented by a function of the following parameters: the number N of all started business processing instances 120 in the business server cluster, the total number M of all business servers 12, and the maximum number T of business processing instances 120 that a single business server 12 can run; the function value can be, for example, N / M*T.
[0047] Step 103: Determine the network transmission interfaces corresponding to the business server 12 and business terminal 10 to which the first business processing instance belongs.
[0048] Determine the network transmission interface corresponding to the business server 12 to which the first business processing instance belongs, and the network transmission interface corresponding to the business terminal 10.
[0049] Here, network transmission interface refers to the interface that transmits data through network protocols, such as the Remote Desktop Protocol (RDP) interface.
[0050] Step 104: Establish a connection between the business server 12 and the business terminal 10 according to the network transmission interfaces corresponding to the business server 12 and the business terminal 10 respectively, so that the first business processing instance 120 can transmit business rendering data to the business terminal 10.
[0051] Specifically, under normal circumstances, the signaling server 11 can put the network transmission interface information corresponding to the service server 12 and the service terminal 10 into the target message channel. By exchanging the network transmission interface information in the target message channel, the service terminal 10 obtains the network transmission interface information of the service server 12, and the service server 12 obtains the network transmission interface information of the service terminal 10, so as to establish a direct connection between the service server 12 and the service terminal 10.
[0052] On the other hand, in some network scenarios, if the current network parameters meet preset conditions, the information of the network transmission interfaces corresponding to the service server 12 and the service terminal 10 is transmitted to the relay server, and a connection is established between the service server 12 and the service terminal 10 at the relay server. In this case, the connection between the service server 12 and the service terminal 10 needs to go through the relay server, rather than a direct connection. The preset conditions may include, but are not limited to, the following: the network status is a cone network (Network Address Translation, NAT), etc.
[0053] It should be noted that steps 101 to 104 above involve establishing a connection between the service terminal 10 and the service server 12 through the signaling server 11, and transmitting service rendering data through the established connection. Since this embodiment of the invention uses a service server cluster, the service server cluster needs to be managed and monitored to effectively provide service data to the service terminal and improve user experience. Specifically, the signaling server 11 can be managed in, but is not limited to, the following ways:
[0054] (1) Manage idle business processing instances in the pre-configured instance pool
[0055] When the number of idle service processing instances in the preset instance pool of the signaling server 11 is less than the preset number, a service server 12 in the service server cluster is selected to start a new service processing instance 120. After the selected service server 12 starts the new service processing instance 120, the new service processing instance 120 is added to the preset instance pool.
[0056] The preset number can be dynamically adjusted according to actual conditions. Specifically, the signaling server 11 collects the number of idle service processing instances in the preset instance pool at multiple time points within a preset time period; then, based on the number of idle service processing instances at multiple time points, it calculates the preset number, for example, the preset number can be the minimum number among the number of idle service processing instances at multiple time points. In this way, the signaling server 11 can automatically and dynamically adjust the preset number without manual intervention, making the system more intelligent.
[0057] (2) Expand or shrink the business server cluster.
[0058] When the load on the business server cluster exceeds the first preset load value, a new business server 12 is added to the current business server cluster, and a business processing instance 120 is configured on the new business server 12. When the load on the business server cluster is less than or equal to the second preset load value, idle business processing instances in the preset instance pool are released. It can be understood that when the load on the business server cluster is between the second and first preset load values, there is no need to expand or shrink the business server cluster.
[0059] The first and second preset load values can be dynamically adjusted according to actual conditions. Specifically, in one scenario, the signaling server 11 collects the number of service terminals 10 that have established connections with the service server cluster at multiple historical time points within a historical period, and calculates the first and second preset load values based on the number of service terminals at multiple historical time points. For example, the first preset load value can be the maximum number of service terminals at multiple historical time points, and the second preset load value can be the minimum number of service terminals at multiple historical time points.
[0060] In another scenario, the signaling server 11 can collect the number of service terminals 10 that have established connections with the service server cluster at the current time, and predict the number of service terminals 10 at future time points based on the number of service terminals 10 at the current time. Thus, a range can be determined based on the number of service terminals 10 at future time points, and the aforementioned first preset load value and second preset load value can be obtained based on this range.
[0061] In this way, by dynamically adjusting the first and second preset load values, the utilization rate of business servers and networks can be further improved, and costs can be reduced.
[0062] As can be seen, in the method of this embodiment, by setting up service processing instances on each service server in the service server cluster, when a service terminal initiates a service connection request, the signaling server can specify a certain service processing instance in the service server cluster and establish a connection between the service terminal and the service server to which the specified service processing instance belongs, and transmit service rendering data through the established connection. In this way, the signaling server centrally manages and allocates the service processing instances set up in the server cluster, so that when a service terminal initiates a service connection request, the signaling server can allocate an idle and well-maintained resource (i.e., the first service processing instance) to the service terminal, thereby ensuring the connection between the service terminal and the service server and subsequent service data transmission, while improving the utilization rate of the service processing instances deployed in the background.
[0063] The following uses a specific application example to illustrate the business data transmission method in this embodiment of the invention. The method in this embodiment is mainly applied to the transmission of map rendering data, and can be applied to, for example... Figure 3 The map system shown includes: a browser 20, a web server 21, and multiple business servers 22 in a business server cluster, wherein:
[0064] Browser 20 serves as the aforementioned business terminal, used to initiate business connection requests to web server 21. Once a connection is established with business server 22, it can initiate business data requests. In this embodiment, the business connection request can specifically be a map business connection request, and therefore the business data request can be a map data request.
[0065] In this embodiment, the business terminal is a browser 20 as an example. In other embodiments, the business terminal can be a business application, such as a map application, which will not be elaborated here.
[0066] The web server 21 integrates the functions of the aforementioned signaling server and relay server. Specifically, the web server 21 may include a signaling service module 210 and a relay service module 211, wherein:
[0067] The signaling service module 210 is the control center of the entire system, controlling the status of the business server cluster and the status of business processing instances. It provides service interfaces to the outside world, including two main categories: interfaces for pushing rendering data and interfaces related to monitoring and controlling the business server cluster. The relay service module 211 is a relay service that integrates User Datagram Protocol (UDP) hole punching and rendering data relay. Under certain network conditions (such as cone NAT networks), it relays the map rendering data transmitted between the browser 20 and the business server 22.
[0068] In practical applications, the relay service module 211 can provide services such as Simple Traversal of UDP Through NATs (STUN) or Traversal Using Relays around NAT (TURN).
[0069] Each business server 22 can be configured with at least one business processing instance and a monitoring node 221. In this embodiment, the business processing instance is specifically a 3D Earth instance (Tencent Earth), wherein:
[0070] The 3D globe instance 220 is a 3D globe instance developed based on the rendering engine of a 3D game (Unreal Engine 4, UE4). It loads basic base map data, administrative boundaries, lighting effects, etc. Its running environment is a business server 22 configured with a graphics card (the higher the graphics card parameter configuration, the more 3D globe instances it can support and the better the rendering effect). The business server 22 can be a physical machine or a virtualized virtual machine. Multiple 3D globe instances 220 can run on a single business server 22, and each 3D globe instance 220 corresponds to a browser 20. The map rendering data of the 3D globe instance 220 can be transmitted to the browser 20 as a video stream through real-time voice or video dialogue (Web Real-Time Communication, WebRTC) components.
[0071] Monitoring node 221 is used to establish a WebSocket long connection with signaling service module 210 for real-time communication. It is responsible for starting and destroying the 3D earth instance 220 and reporting the status information of the current business server 22.
[0072] Overall, such as Figure 4 As shown, in the map system of this embodiment, the browser 20 initiates a map service connection request to the signaling service module 210 of the web server 21. Through the signaling service module 210, a direct connection can be established between the browser 20 and a specific 3D globe instance 220 in the service server 22, or a connection can be established between the browser 20 and the 3D globe instance 220 via the relay service module 211, thereby transmitting map rendering data. Furthermore, the monitoring node 221 in the service server 22 monitors the usage status of each 3D globe instance 220 and reports the monitored usage status to the signaling service module 210, which then manages the various 3D globe instances 220 in the service server cluster according to the usage status.
[0073] In this embodiment, the signaling service module 210 in the web server 21 can manage the business server cluster in the following ways:
[0074] (1) Manage the startup of 3D Earth instance 220
[0075] In this embodiment, the signaling service module 210 achieves unified management of the 3D globe instance 220 by adding the 3D globe instance 220 configured in the service server 22 to a preset instance pool. The instance pool may include 3D globe instances 220 that have already established a connection with the browser 20 and are in a non-idle state; it may also include 3D globe instances 220 that have been started but not assigned to the browser 20 and are in an idle state.
[0076] In practical applications, to achieve faster map rendering, the business server 22 can pre-start the 3D globe instance 220 and add it to a pre-set instance pool, setting its status to idle. This way, when the browser 20 initiates a map service connection request, the startup time of the 3D globe instance 220 is eliminated. The signaling service module 210 directly allocates an idle 3D globe instance 220 to the browser 20 to establish a connection, accelerating the transmission of map rendering data. Generally, the time required to establish a connection between the browser 20 and the 3D globe instance 220 can be reduced from tens of seconds to a few seconds, improving efficiency by an order of magnitude.
[0077] Furthermore, the signaling service module 210 uses a separate thread to monitor the status of the 3D Earth instance 220. When the number of idle 3D Earth instances 220 in the preset instance pool is less than the preset number, a load balancing algorithm can be used to select a business server 22 with the lowest current resource utilization. The selected business server 22 will then start a new 3D Earth instance 220 and place it into the preset instance pool.
[0078] like Figure 5 As shown, during the process of monitoring any 3D globe instance 220 in the business server cluster, the signaling service module 210 monitors the following changes in the state of the 3D globe instance 220: From the start of the business server 22 to the completion of the startup of the 3D globe instance 220, the state of the 3D globe instance 220 is in the starting state; after the 3D globe instance 220 is added to the instance pool after startup, the state of the 3D globe instance 220 is in the idle state; when the 3D globe instance 220 is assigned to a browser 20 and a connection is established with the browser 20, the state of the 3D globe instance 220 is in the non-idle state or in the connection state; when the 3D globe instance 220 is disconnected from the browser 20, the business server 22 can release the 3D globe instance 220, and its state is in the release state or in the destruction state.
[0079] (2) The business server cluster is automatically expanded or reduced, which effectively controls the cost of business server 22.
[0080] The signaling service module 210 can use a separate thread to monitor the load of the business server cluster in real time. Specifically, when the load of the business server cluster exceeds a first preset load value, a new business server 22 is added to the business server cluster, and business processing instances are configured on the new business server 22. When the load of the business server cluster is less than or equal to a second preset load value, idle business processing instances in the preset instance pool are released.
[0081] (3) The signaling service module 210 will provide the user with the status of the current business server cluster and the status of each three-dimensional earth instance 220 in the business server 22.
[0082] It should be noted that, in order to implement the method of this embodiment, the map system can set up the following two types of service interfaces:
[0083] (1) One type of interface is the backend service interface used by the browser 20 in the process of map rendering data transmission. It is responsible for establishing the connection between the browser and the 3D globe instance 220, including starting the 3D globe instance 220, establishing the connection between the 3D globe instance 220 and the signaling service module 210 in the network server 21, establishing the connection between the 3D globe instance 220 and the browser 20, and relay services in special network environments. Users can initiate a business connection request through the browser 20, thereby triggering the call of this type of service interface. By passing the user's identity information into this type of service interface, the entire process of business connection and business data transmission can be completed. In this process, the browser 20 does not need to care about which business server 22 the 3D globe instance 220 is running on, how it is started, or how the connection is established.
[0084] (2) Another type of interface is used by service operation and maintenance and monitoring personnel. Users can use this type of interface to view the usage status of the business server cluster and the three-dimensional earth instance 220 monitored by the signaling service module 210 in the web server 21, and can also expand or shrink the three-dimensional earth instance 220 in the business server 22.
[0085] In this way, by encapsulating the above two types of interfaces into the map system, the complex cloud rendering push and cloud service management process can be simplified, allowing users to operate and manage through simple interfaces, thereby improving production efficiency and resource utilization and reducing complexity.
[0086] like Figure 6 As shown, in this embodiment of the invention, the transmission of map rendering data can be achieved through the following steps:
[0087] In step 201, the user can operate the browser 20 to call the connection interface of the signaling service module 210 in the web server 21 and initiate a map service connection request.
[0088] Step 202: After receiving the map service connection request, the signaling service module 210 will first determine whether there is an idle 3D globe instance 220 in the preset instance pool. If there is, an idle 3D globe instance 220 can be allocated to the browser 20 and step 203 can be executed. If there is no idle 3D globe instance 220, the signaling service module 210 will continue to execute step 204.
[0089] In step 203, the signaling service module 210 will put the network transmission interface information corresponding to the allocated 3D globe instance 220 and browser 20 into the target message channel. By exchanging the network transmission interface information in the target message channel, a direct connection is established between the business server 22 to which the 3D globe instance 220 belongs and the browser 20.
[0090] In certain network conditions, such as under a cone NAT network, the signaling service module 210 will transmit the network transmission interface information of the business server 22 and the browser 20 to which the 3D globe instance 220 belongs to to the relay service module 211, and establish a connection between the business server 22 and the browser 20 through the relay service module 211.
[0091] Once a connection is established between a 3D globe instance 220 in the business server 22 and the browser 20, when a user initiates a map data request through the browser 20, the 3D globe instance 220 will generate map rendering data and transmit it to the browser 20 through the established connection.
[0092] Step 204: The signaling service module 210 checks whether there is a 3D globe instance 220 that is starting up in the current business server cluster. If there is, the map service connection request of the browser 20 can be put into a waiting queue. When the 3D globe instance 220 finishes starting up and establishes a connection with the signaling service module 210, the 3D globe instance 220 can be assigned to the browser 20, and the process returns to step 203. If there is no 3D globe instance 220 that is starting up, the signaling service module 210 continues to execute step 205.
[0093] Step 205: Signaling service module 210 detects whether the load of the business server cluster has reached the preset load value. If it has, the new 3D earth instance 220 cannot be started, and a failure signal can be returned to browser 20. If it has not reached the load value, signaling service module 210 can also put the map service connection request of browser 20 into a waiting queue and continue to execute step 206.
[0094] Step 206: A business server 22 can be selected from the business server cluster using a load balancing algorithm. By communicating with the monitoring node 221 in the business server 22, the business server 22 is notified to start a new 3D globe instance 220. The new 3D globe instance 220 is then assigned to the browser 20, and the process returns to execute step 203 above.
[0095] The following uses another specific application example to illustrate the business data transmission method in this invention. The business data transmission system in this embodiment is mainly a distributed system 100. The distributed system may include a client 300 and multiple nodes 200 (any form of computing device in the network, such as a server or user terminal). The client 300 and the nodes 200 are connected through network communication.
[0096] Taking a distributed system as an example, see blockchain system. Figure 7 This is an optional structural diagram of the distributed system 100 provided in this embodiment of the invention applied to a blockchain system. It consists of multiple nodes 200 (any form of computing device connected to the network, such as servers or user terminals) and clients 300. The nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In the distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.
[0097] See Figure 7 The functions of each node in the blockchain system shown may include:
[0098] 1) Routing: A basic function of nodes used to support communication between nodes.
[0099] In addition to routing capabilities, nodes can also have the following functions:
[0100] 2) Applications are deployed in the blockchain to implement specific business needs. They record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system. When other nodes successfully verify the source and integrity of the record data, they add the record data to a temporary block.
[0101] For example, the application's business logic includes code that implements business data transmission functionality, which mainly includes:
[0102] The system receives a service connection request sent by a service terminal; determines a first service processing instance corresponding to the service connection request; the first service processing instance is set in a service server cluster and is used to generate service rendering data and transmit the service rendering data to the service terminal; determines the network transmission interfaces corresponding to the service server to which the first service processing instance belongs and the service terminal respectively; and establishes a connection between the service server and the service terminal according to the network transmission interfaces corresponding to the service server and the service terminal respectively, so that the first service processing instance can transmit service rendering data to the service terminal.
[0103] 3) A blockchain consists of a series of blocks that are sequentially generated. Once a new block is added to the blockchain, it will not be removed. The blocks contain the data submitted by the nodes in the blockchain system.
[0104] See Figure 8 This is an optional schematic diagram of the block structure provided in an embodiment of the present invention. Each block includes the hash value of the transaction records stored in this block (shown as the hash of this block in the diagram) and the hash value of the previous block (shown as the hash of the previous block in the diagram). The blocks are connected through hash values to form a blockchain. Additionally, the block may also include information such as a timestamp when it was generated. A blockchain is essentially a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains relevant information used to verify the validity of the information (anti-counterfeiting) and to generate the next block.
[0105] This invention also provides a business data transmission system, such as the signaling server mentioned above, the structural diagram of which is shown below. Figure 9 As shown, it can specifically include:
[0106] The connection request unit 30 is used to receive a service connection request sent by the service terminal.
[0107] The instance determination unit 31 is used to determine the first service processing instance corresponding to the service connection request received by the connection request unit 30; the first service processing instance is set in the service server cluster and is used to form service rendering data and transmit the service rendering data to the service terminal.
[0108] The instance determination unit 31 is specifically used to determine an idle business processing instance in a preset instance pool as the first business processing instance; or, when a business processing instance in the business server cluster completes startup, the startup-completed business processing instance is determined as the first business processing instance; or, when the load of the business server cluster does not reach a preset load value, a business server in the business server cluster is selected, and a new business processing instance is started, and the new business processing instance is determined as the first business processing instance.
[0109] The interface determination unit 32 is used to determine the network transmission interfaces corresponding to the business server and business terminal to which the first business processing instance determined by the instance determination unit 31 belongs.
[0110] The connection transmission unit 33 is used to establish a connection between the business server and the business terminal according to the network transmission interfaces corresponding to the business server and the business terminal determined by the interface determination unit 32, so that the first business processing instance can transmit business rendering data to the business terminal.
[0111] The connection transmission unit 33 is specifically used to put the information of the network transmission interfaces corresponding to the service server and the service terminal into the target message channel, and to establish a direct connection between the service server and the service terminal by exchanging the information of the network transmission interfaces in the target message channel; or, if the current network parameters meet the preset conditions, to transmit the information of the network transmission interfaces corresponding to the service server and the service terminal to the relay server, and to establish a connection between the service server and the service terminal in the relay server.
[0112] Furthermore, the service data transmission system of this embodiment may also include:
[0113] The management unit 34 is used to select a business server in the business server cluster to start a new business processing instance when the number of idle business processing instances in the preset instance pool is less than the preset number; after the selected business server starts the new business processing instance, the new business processing instance is added to the preset instance pool.
[0114] Setting unit 35 is used to collect the number of idle service processing instances in the preset instance pool at multiple time points within a preset time period; and to calculate the preset number used by management unit 34 based on the number of idle service processing instances at the multiple time points.
[0115] Furthermore, the management unit 34 is also used to add a new business server to the business server cluster and set up a business processing instance on the new business server when the load of the business server cluster is greater than the first preset load value; and to release the idle business processing instances in the preset instance pool when the load of the business server cluster is less than or equal to the second preset load value.
[0116] The load of the business server cluster is a function value calculated from the following parameters: the number of all started business processing instances in the business server cluster, the total number of all business servers in the business server cluster, and the maximum number of business processing instances running on a single business server.
[0117] The setting unit 35 is also used to collect the number of business terminals that have established connections with the business server cluster at multiple historical time points within a historical time period; and to calculate the first preset load value and the second preset load value based on the number of business terminals at the multiple historical time points.
[0118] As can be seen, in this embodiment of the invention, by setting up business processing instances on each business server in the business server cluster, when the connection request unit 30 in the business data transmission system of this embodiment receives a business connection request, the instance determination unit 31 will specify a certain business processing instance in the business server cluster, and the connection transmission unit 33 will establish a connection between the business terminal and the business server to which the specified business processing instance belongs, and transmit business rendering data through the established connection. In this way, the business data transmission system of this embodiment centrally manages and allocates the business processing instances set up in the server cluster, so that when the business terminal initiates a business connection request, the business data transmission system can allocate an idle and well-maintained resource (i.e., the first business processing instance) to the business terminal, thereby ensuring the connection between the business terminal and the business server and subsequent business data transmission, while improving the utilization rate of the business processing instances deployed in the background.
[0119] This invention also provides a server, the structural diagram of which is shown below. Figure 10As shown, the server can vary considerably depending on its configuration or performance, and may include one or more central processing units (CPUs) 40 (e.g., one or more processors) and memory 41, and one or more storage media 42 (e.g., one or more mass storage devices) for storing application programs 421 or data 422. The memory 41 and storage media 42 can be temporary or persistent storage. The program stored in the storage media 42 may include one or more modules (not shown in the figure), each module including a series of instruction operations on the server. Furthermore, the CPU 40 may be configured to communicate with the storage media 42 and execute the series of instruction operations in the storage media 42 on the server.
[0120] Specifically, the application program 421 stored in the storage medium 42 includes an application program for business data transmission, and this program may include the connection request unit 30, instance determination unit 31, interface determination unit 32, connection transmission unit 33, management unit 34, and setting unit 35 in the aforementioned business data transmission system, which will not be elaborated here. Furthermore, the central processing unit 40 may be configured to communicate with the storage medium 42 and execute a series of operations corresponding to the list processing application stored in the storage medium 42 on the server.
[0121] The server may also include one or more power supplies 43, one or more wired or wireless network interfaces 44, one or more input / output interfaces 45, and / or one or more operating systems 423, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0122] The steps performed by the signaling server in the above method embodiments can be based on this. Figure 10 The server structure is shown.
[0123] Furthermore, in another aspect, embodiments of the present invention also provide a computer-readable storage medium storing a plurality of computer programs adapted for loading by a processor and executing a business data transmission method as described above by the signaling server.
[0124] Another embodiment of the present invention provides a server, including a processor and a memory;
[0125] The memory is used to store multiple computer programs, which are loaded and executed by a processor using a business data transmission method as described above by the signaling server; the processor is used to implement each of the multiple computer programs.
[0126] Additionally, according to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the business data transmission methods provided in the various optional implementations described above.
[0127] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0128] The above provides a detailed description of a business data transmission method, system, storage medium, and related equipment provided by embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A business data transmission method, applied to a signaling server, characterized in that, include: Receive service connection requests sent by service terminals; The service connection request is a map service connection request; Determine the first business processing instance corresponding to the business connection request; The first business processing instance is set in the business server cluster and is used to generate business rendering data and transmit business rendering data to the business terminal. The first business processing instance is a business processing instance that is pre-started and added to a preset instance pool and is in an idle state. The business processing instance is a 3D earth instance developed based on the rendering engine of a 3D game. Determine the network transmission interfaces corresponding to the business server and business terminal to which the first business processing instance belongs; Based on the network transmission interfaces corresponding to the business server and the business terminal respectively, a data connection is established between the business server and the business terminal through a web page real-time communication component. This includes: exchanging information of the network transmission interfaces through the signaling server to establish a direct data transmission connection between the business terminal and the business server to which the first business processing instance belongs, so that the first business processing instance can run its rendering engine, generate map rendering data, and transmit the map rendering data to the browser of the business terminal in the form of a video stream through the web page real-time communication component.
2. The method as described in claim 1, characterized in that, Determining the first service processing instance corresponding to the service connection request includes: The first service processing instance is determined from the pre-set instance pool that is in an idle state. Alternatively, when a business processing instance in the business server cluster completes startup, the business processing instance that has completed startup is identified as the first business processing instance. Alternatively, when the load of the business server cluster does not reach the preset load value, a business server in the business server cluster is selected, and a new business processing instance is started, which is then identified as the first business processing instance.
3. The method as described in claim 1, characterized in that, The step of establishing a data connection between the business server and the business terminal via a real-time web communication component based on the network transmission interfaces corresponding to the business server and the business terminal respectively includes: The information of the network transmission interfaces corresponding to the business server and the business terminal is placed into the target message channel, and the information of the network transmission interfaces is exchanged in the target message channel to establish a direct connection between the business server and the business terminal. Alternatively, if the current network parameters meet the preset conditions, the information of the network transmission interfaces corresponding to the service server and the service terminal is transmitted to the relay server, and a connection between the service server and the service terminal is established at the relay server.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: When the number of idle business processing instances in the preset instance pool is less than the preset number, a business server in the business server cluster is selected to start a new business processing instance. Once the selected business server starts a new business processing instance, the new business processing instance is added to the preset instance pool.
5. The method as described in claim 4, characterized in that, The method further includes: Collect the number of idle business processing instances in the preset instance pool at multiple time points within a preset time period; The preset number is calculated based on the number of service processing instances that are idle at the multiple time points.
6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: When the load of the business server cluster exceeds the first preset load value, a new business server is added to the business server cluster and a business processing instance is set on the new business server. When the load of the business server cluster is less than or equal to the second preset load value, the idle business processing instances in the preset instance pool are released.
7. The method as described in claim 6, characterized in that, The load of the business server cluster is a function value calculated from the following parameters: The number of all started business processing instances in the business server cluster, the total number of all business servers in the business server cluster, and the maximum number of business processing instances running on a single business server.
8. The method as described in claim 6, characterized in that, The method further includes: The number of business terminals that established connections with the business server cluster at multiple historical time points within a historical period is collected. The first preset load value and the second preset load value are calculated based on the number of service terminals at the multiple historical time points.
9. A business data transmission system, applied to a signaling server, characterized in that, include: The connection request unit is used to receive service connection requests sent by the service terminal; The service connection request is a map service connection request; An instance determination unit is used to determine the first service processing instance corresponding to the service connection request; The first business processing instance is set in the business server cluster and is used to generate business rendering data and transmit business rendering data to the business terminal. The first business processing instance is a business processing instance that is pre-started and added to a preset instance pool and is in an idle state. The business processing instance is a 3D earth instance developed based on the rendering engine of a 3D game. An interface determination unit is used to determine the network transmission interfaces corresponding to the business server and business terminal to which the first business processing instance belongs. The connection transmission unit is used to establish a data connection between the business server and the business terminal through a web real-time communication component based on the network transmission interfaces corresponding to the business server and the business terminal, respectively. This includes: exchanging information of the network transmission interfaces through the signaling server to establish a direct data transmission connection between the business terminal and the business server to which the first business processing instance belongs, so that the first business processing instance can run its rendering engine, generate map rendering data, and transmit the map rendering data to the browser of the business terminal in the form of a video stream through the web real-time communication component.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of computer programs adapted to be loaded by a processor and executed as described in any one of claims 1 to 8.
11. A server, characterized in that, Including processor and memory; The memory is used to store a plurality of computer programs, which are loaded by a processor and executed as described in any one of claims 1 to 8; the processor is used to implement each of the plurality of computer programs.
12. A computer program product, characterized in that, include: Computer instructions, stored in a computer-readable storage medium, are adapted to be loaded by a processor and executed as described in any one of claims 1 to 8, for the business data transmission method.