Implementation method of multi-scene service PK component based on SSE

By building a multi-scene business PK component based on SSE, the problem of insufficient interactivity of the existing online activity mode is solved, and real-time confrontation functions of multi-scene and multi-modes are realized, user participation and platform activity are improved, and user experience and business value are optimized.

CN120301936APending Publication Date: 2025-07-11INSPUR SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510415663.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing online activity model has insufficient content homogeneity and interactivity. The existing PK system lacks universality and flexibility, and cannot meet the needs of diverse users. It is difficult to improve user participation and platform activity.

Method used

Build a multi-scenario service PK component based on SSE, including a business system access module, a PK competition configuration module, a SSE real-time data push module, a user matching module and a data statistics module, providing standardized API interfaces, user-defined PK parameters, real-time data push and multi-dimensional data analysis, and supporting multiple PK modes and intelligent matching.

Benefits of technology

It significantly improves user participation and platform activity, enhances user experience and platform interactivity, reduces business system transformation costs, and improves the universality and commercial value of the platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301936A_ABST
    Figure CN120301936A_ABST
Patent Text Reader

Abstract

The invention discloses an implementation method of a multi-scene service PK component based on SSE, and relates to the technical field of internet interaction. A multi-scene service PK component is constructed, and a service system access module provides a standardized API interface for an external service system to seamlessly access the PK component; the PK contest configuration module configures user-defined PK parameters; the SSE real-time data pushing module pushes data in real time in the PK process; the user matching module performs user PK matching according to the PK mode; synchronizing the in-match data: receiving request data of a user through a service system, performing judgment, generating a judgment result R1, and pushing the judgment result R1 to the PK component according to an agreed pushing theme T1; and providing statistical indexes and generating a ranking list through a data statistical module, so that the user can know the match condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention discloses an implementation method for a multi-scenario service PK component based on SSE, which relates to the field of Internet interaction technologies. Background Art

[0002] With the rapid development of Internet technologies and the widespread popularity of mobile terminals, digital activities such as online learning, remote fitness, and webcasting have been deeply integrated into people's daily lives. However, existing online activity models generally suffer from problems such as content homogenization and insufficient interactivity, resulting in a continuous decline in user participation and difficulty in maintaining platform activity. Although existing online platforms provide basic interaction functions, they lack effective incentive mechanisms and flexible PK models, making it difficult to stimulate users' continuous participation interest.

[0003] Moreover, most of the existing PK systems on the market are limited to single business scenarios, lacking generality and flexibility and unable to meet diverse user needs. In addition, the technical implementation of existing PK systems in aspects such as user matching and robot confrontation is relatively simple, making it difficult to provide a good user experience. Summary of the Invention

[0004] In view of the problems of the prior art, the present invention provides an implementation method for a multi-scenario service PK component based on SSE. This component realizes real-time data push through SSE technology and, in combination with an intelligent matching mechanism, unified access to business systems, and a data statistics module, realizes real-time confrontation functions in multiple scenarios and multiple modes, can significantly improve user participation and platform activity, optimize the user experience, and enhance the core competitiveness and commercial value of the platform. It is applicable to Internet platforms such as online learning, exercise, and webcasting that require enhanced user interactivity and participation.

[0005] The specific solution proposed by the present invention is as follows:

[0006] The present invention provides an implementation method for a multi-scenario service PK component based on SSE, constructs a multi-scenario service PK component, and the multi-scenario service PK component includes a business system access module, a PK competition configuration module, an SSE real-time data push module, a user matching module, and a data statistics module.

[0007] Provide a standardized API interface through the business system access module for seamless access of external business systems to the PK component, and configure the interface information of the business system to initialize business data after user matching and synchronize user competition data in real time.

[0008] Configure user-defined PK parameters through the PK competition configuration module. The user-defined PK parameters include PK mode, start and end time, duration of each game, also select the business systems adapted in the business system access module, and configure PK rules according to different scenarios.

[0009] During the PK process, real-time data is pushed through the SSE real-time data push module to ensure that users can receive the dynamic information of their opponents in real time during the PK process;

[0010] The user matching module conducts user PK matching according to the PK mode:

[0011] Formulate matching rules: Match based on whether the user participates in the competition through sharing, the region where the unit is located, and the unit information; or adopt a priority strategy, first pair according to sharing participation in the competition, and then match in the order of across regions and across units;

[0012] Select the matching queue: After user U1 initiates a PK request, first traverse and match in the matching queue Q1. If no opponent is found in queue Q1, push user U1 into the matching queue Q1 and wait for an opponent to join; if user U1 participates in the competition based on the PK connection shared by user U2, then U1 and U2 are directly paired successfully;

[0013] Conduct event session binding: After successful matching, automatically generate the PK room H1, and notify both users of successful pairing through the SSE protocol. The users then enter the game page; after the PK room H1 is created, call the business interface of the PK competition configuration to complete the initialization of the event session on the business system side. The business system returns the event session code B1, and bind the event session code B1 to the users of the current PK room H1 to form the binding relationship M1;

[0014] Synchronize in-game data: Receive the request data from the user through the business system, make a judgment, generate the judgment result R1, and push the judgment result R1 to the PK component according to the agreed push topic T1;

[0015] Provide statistical metrics and generate a leaderboard through the data statistics module for users to understand the game situation.

[0016] Furthermore, in the implementation method of the multi-scenario service PK component based on SSE, the interface information of the business system configured through the business system access module involves the following interfaces:

[0017] Business event information loading interface: Call the interface to load the event codes of the events configured in the business system for binding with the PK competition,

[0018] Business initialization interface: Call the interface to implement the initialization of business data. The interface request parameters include: business event code, number of sessions, message push topic; the response parameters include at least the event session code,

[0019] Message Push Interface: After submitting business data to the business system, the business system calls the interface according to the agreed event push theme to push the processing result to the PK component again.

[0020] Furthermore, in the implementation method of a multi-scenario service PK component based on SSE, user-defined PK parameters are configured through the PK competition configuration module, including:

[0021] Provide a graphical configuration interface, set PK parameters through the interface, where the PK modes include: free PK, unit PK, city PK, and sharing PK.

[0022] Select the adapted business systems in the business system access module, set the corresponding business event codes, and persist the configured PK competition parameters to the database.

[0023] Furthermore, in the implementation method of a multi-scenario service PK component based on SSE, data is pushed in real time through the SSE real-time data push module, including:

[0024] Establish a connection: The client of the SSE real-time data push module sends an SSE connection request to the server through the HTTP protocol.

[0025] The server of the SSE real-time data push module responds to the request, establishes a long connection, maintains the connection status, and binds the connection to the user to form a binding relationship M2.

[0026] Push data: The PK component listens to the push theme T1, receives the judgment result R1, creates an SSE event, obtains the business code from the push result, determines the PK room according to the binding relationship M1, and pushes the judgment result to the client in JSON format according to the PK room.

[0027] Furthermore, in the implementation method of a multi-scenario service PK component based on SSE, statistical indicators are provided and a leaderboard is generated through the data statistics module, including:

[0028] Data collection: Real-time data streams collect PK data, including the total number of PKs, the number of online users, and PK scores.

[0029] Data storage: Store the PK data in a distributed database to support high-concurrency access.

[0030] Data analysis: Generate statistical indicators through a computing engine and generate a leaderboard in three dimensions: individual, unit, and region.

[0031] The present invention also provides a multi-scenario service PK component based on SSE. The multi-scenario service PK component includes a service system access module, a PK competition configuration module, an SSE real-time data push module, a user matching module, and a data statistics module.

[0032] The service system access module provides a standardized API interface for seamless access of external service systems to the PK component and configures the interface information of the service system to initialize the service data after user matching is completed and synchronize the user competition data in real time.

[0033] The PK competition configuration module configures user-defined PK parameters. The user-defined PK parameters include PK mode, start and end times, and duration of each game. It also selects the service systems adapted in the service system access module and configures PK rules according to different scenarios.

[0034] The SSE real-time data push module pushes data in real time during the PK process to ensure that users receive the dynamic information of their opponents in real time during the PK process.

[0035] The user matching module performs user PK matching according to the PK mode:

[0036] Formulate matching rules: Match based on whether the user participates in the competition through sharing, the region where the unit is located, and the unit information; or adopt a priority strategy, first pair according to sharing participation in the competition, and then match in the order of cross-region and cross-unit.

[0037] Select a matching queue: After user U1 initiates a PK request, first traverse and match in the matching queue Q1. If no opponent is found in queue Q1, user U1 is pushed into the matching queue Q1 and waits for an opponent to join; if user U1 participates in the competition based on the PK connection shared by user U2, then U1 and U2 are directly paired successfully.

[0038] Perform event session binding: After successful matching, a PK room H1 is automatically generated, and both users are notified of successful pairing through the SSE protocol. The users then enter the competition page; after the PK room H1 is created, the business interface of the PK competition configuration is called to initialize the event session on the service system side. The service system returns the event session code B1, and the event session code B1 is bound to the users in the current PK room H1 to form a binding relationship M1.

[0039] Synchronize in-game data: Receive the request data of the user through the service system, make a determination, generate a determination result R1, and push the determination result R1 to the PK component according to the agreed push topic T1.

[0040] The data statistics module provides statistical metrics and generates a leaderboard for users to understand the competition situation.

[0041] Furthermore, the interface information of the business system configured by the business system access module in the multi-scenario service PK component based on SSE involves the following interfaces:

[0042] Business event information loading interface: Call the interface to load the event codes of the configured events in the business system for binding to the PK competition.

[0043] Business initialization interface: Call the interface to initialize business data. The interface request parameters include: business event code, number of sessions, and message push topic; the response parameters include at least the event session code.

[0044] Message push interface: After submitting business data to the business system, the business system calls the interface according to the agreed event push topic to push the processing result back to the PK component.

[0045] Furthermore, the user-defined PK parameters configured by the PK competition configuration module in the multi-scenario service PK component based on SSE include:

[0046] Provide a graphical configuration interface to set PK parameters through the interface. The PK modes include: free PK, unit PK, city PK, and share PK.

[0047] Select the adapted business system in the business system access module and set the corresponding business event code, and persist the configured PK competition parameters to the database.

[0048] Furthermore, the SSE real-time data push module in the multi-scenario service PK component based on SSE pushes data in real time during the PK process, including:

[0049] Establish a connection: The client of the SSE real-time data push module sends an SSE connection request to the server through the HTTP protocol.

[0050] The server of the SSE real-time data push module responds to the request, establishes a long connection, maintains the connection status, and binds the connection to the user to form a binding relationship M2.

[0051] Push data: The PK component listens to the push topic T1, receives the determination result R1, creates an SSE event, obtains the business code from the push result, determines the PK room according to the binding relationship M1, and pushes the determination result to the client in JSON format according to the PK room.

[0052] Furthermore, the data statistics module in the multi-scenario service PK component based on SSE provides statistical metrics and generates a leaderboard, including:

[0053] Data collection: Real-time data stream collects PK data, including the total number of PKs, the number of online users, and PK scores.

[0054] Data storage: Store PK data in a distributed database, supporting high-concurrency access.

[0055] Data analysis: Generate statistical metrics through a computing engine and generate leaderboards in three dimensions: individual, unit, and region.

[0056] The advantages of the present invention are as follows:

[0057] Loose coupling of the PK function: By separating the PK function from the business system, the coupling degree between the business system and the PK function is reduced, and at the same time, the transformation cost of the business system is also reduced.

[0058] Improve user participation: By introducing PK elements, the participation and activity of users in scenarios such as online learning and exercise are significantly improved.

[0059] Enhance interactivity: Support multiple PK modes and intelligent matching mechanisms to ensure that users can compete with opponents from different regions and units, enhancing the interactivity of the platform.

[0060] Flexible configuration: The PK configuration module supports a variety of parameter settings, can adapt to different scenarios and user needs, and improves the versatility and flexibility of the platform.

[0061] Data-driven: The data statistics module provides multi-dimensional PK data analysis to help platform managers optimize operation strategies and enhance the competitiveness of the platform. Description of the Drawings

[0062] Figure 1 It is a schematic diagram of the interaction of each module of the components of the present invention.

[0063] Figure 2 It is a schematic diagram of the logical relationship between the PK component and the business system.

[0064] Figure 3 It is a sequence diagram of each module of the PK component. Detailed Implementation Modes

[0065] The following further describes the present invention in conjunction with the drawings and specific embodiments, so that those skilled in the art can better understand the present invention and be able to implement it, but the embodiments cited are not intended to limit the present invention.

[0066] Embodiment 1

[0067] The present invention provides a method for implementing a multi-scenario business PK component based on SSE, constructs a multi-scenario business PK component, and the multi-scenario business PK component includes a business system access module, a PK competition configuration module, an SSE real-time data push module, a user matching module, and a data statistics module.

[0068] Provide a standardized API interface through the business system access module for seamless access of external business systems to the PK component, and configure the interface information of the business system to initialize business data after user matching is completed and synchronize user competition data in real time.

[0069] The interface information of the business system configured through the business system access module involves the following interfaces:

[0070] Business event information loading interface A1: Call the interface to load the event code of the events configured in the business system for binding to the PK competition.

[0071] Business initialization interface A2: Call the interface to implement the initialization of business data. The interface request parameters include: business event code, number of sessions, and message push topic; the response parameters include at least the event session code.

[0072] Message push interface A3: After submitting business data to the business system, the business system calls the interface according to the agreed event push topic to push the processing result back to the PK component.

[0073] Configure user-defined PK parameters through the PK competition configuration module. The user-defined PK parameters include PK mode, start and end time, duration of each game, and also select the business systems adapted in the business system access module and configure PK rules according to different scenarios. Among them, configuring user-defined PK parameters through the PK competition configuration module includes:

[0074] Provide a graphical configuration interface to set PK parameters through the interface. The PK modes include: free PK, unit PK, city PK, and sharing PK.

[0075] Select the business systems adapted in the business system access module, set the corresponding business event codes, and persist the configured PK competition parameters to the database.

[0076] Push data in real time during the PK process through the SSE real-time data push module to ensure that users receive the dynamic information of their opponents in real time during the PK process. Specifically, it can include:

[0077] Establish a connection: The client of the SSE real-time data push module sends an SSE connection request to the server through the HTTP protocol.

[0078] The server of the SSE real-time data push module responds to the request, establishes a long connection, maintains the connection status, and binds the connection to the user to form a binding relationship M2.

[0079] Push data: The PK component monitors the push topic T1, receives the judgment result R1, creates an SSE event, obtains the service code from the push result, determines the PK room according to the binding relationship M1, and pushes the judgment result to the client in JSON format according to the PK room.

[0080] The user matching module performs user PK matching according to the PK mode:

[0081] Formulate matching rules: Match based on whether the user participates in the competition from sharing, the region where the unit is located, and the unit information; or adopt a priority strategy, first pair according to sharing participation in the competition, and then match in the order of cross-region and cross-unit;

[0082] Select the matching queue: After the user U1 initiates a PK request, first traverse and match in the matching queue Q1. If no opponent is found in the queue Q1, push the user U1 into the matching queue Q1 and wait for the opponent to join; if the user U1 participates in the competition based on the PK connection shared by the user U2, then U1 and U2 are directly paired successfully;

[0083] Perform event session binding: After successful matching, automatically generate the PK room H1, and notify both users of successful pairing through the SSE protocol. The users then enter the game page; after the PK room H1 is created, call the business interface of the PK competition configuration to complete the initialization of the event session on the business system side. The business system returns the event session code B1, and binds the event session code B1 to the users of the current PK room H1 to form the binding relationship M1;

[0084] Synchronize in-game data: Receive the request data of the user through the business system, make a judgment, generate the judgment result R1, and push the judgment result R1 to the PK component according to the agreed push topic T1;

[0085] Provide statistical indicators and generate a leaderboard through the data statistics module for users to understand the game situation. Specifically, it may include:

[0086] Data collection: Real-time data stream collects PK data, including the total number of PKs, the number of online users, and PK scores,

[0087] Data storage: Store the PK data in a distributed database to support high-concurrency access,

[0088] Data analysis: Generate statistical indicators through the calculation engine and generate a leaderboard in three dimensions: individual, unit, and region.

[0089] Embodiment 2

[0090] The present invention also provides a multi-scenario service PK component based on SSE. The multi-scenario service PK component includes a service system access module, a PK competition configuration module, an SSE real-time data push module, a user matching module, and a data statistics module.

[0091] The service system access module provides a standardized API interface for seamless access of external service systems to the PK component and configures the interface information of the service system to initialize the service data after user matching is completed and synchronize the user competition data in real time.

[0092] The PK competition configuration module configures user-defined PK parameters. The user-defined PK parameters include PK mode, start and end times, duration of each game, and also selects the service systems adapted in the service system access module and configures PK rules according to different scenarios.

[0093] The SSE real-time data push module pushes data in real time during the PK process to ensure that users receive the dynamic information of their opponents in real time during the PK process.

[0094] The user matching module performs user PK matching according to the PK mode:

[0095] Formulate matching rules: Match based on whether the user participates in the competition from sharing, the region where the unit is located, and the unit information; or adopt a priority strategy, first pair according to sharing participation in the competition, and then match in the order of cross-region and cross-unit.

[0096] Select the matching queue: After user U1 initiates a PK request, traverse and match in the matching queue Q1 first. If no opponent is found in queue Q1, push user U1 into the matching queue Q1 and wait for the opponent to join; if user U1 participates in the competition based on the PK connection shared by user U2, then U1 and U2 are directly paired successfully.

[0097] Perform event session binding: After successful matching, automatically generate a PK room H1 and notify both users of successful pairing through the SSE protocol. The users then enter the competition page; after the PK room H1 is created, call the service interface of the PK competition configuration to complete the initialization of the event session on the service system side. The service system returns the event session code B1 and binds the event session code B1 to the users in the current PK room H1 to form a binding relationship M1.

[0098] Synchronize in-game data: Receive the request data of the user through the service system, make a determination, generate a determination result R1, and push the determination result R1 to the PK component according to the agreed push topic T1.

[0099] The data statistics module provides statistical indicators and generates a leaderboard for users to understand the competition situation.

[0100] For the information interaction, execution process, etc. among the modules within the above-mentioned component, since they are based on the same concept as the method embodiment of the present invention, the specific content can be referred to the description in the method embodiment of the present invention, and will not be elaborated here.

[0101] Similarly, the advantages of the component of the present invention are as follows:

[0102] Loose coupling of PK function: By separating the PK function from the business system, the coupling degree between the business system and the PK function is reduced, and at the same time, the transformation cost of the business system is also reduced.

[0103] Improve user participation: By introducing PK elements, the participation and activity of users in scenarios such as online learning and exercise are significantly improved.

[0104] Enhance interactivity: Support multiple PK modes and intelligent matching mechanisms to ensure that users can compete with opponents from different regions and different units, enhancing the interactivity of the platform.

[0105] Flexible configuration: The PK configuration module supports a variety of parameter settings, can adapt to different scenarios and user needs, and improves the versatility and flexibility of the platform.

[0106] Data-driven: The data statistics module provides multi-dimensional PK data analysis to help platform managers optimize operation strategies and enhance the competitiveness of the platform.

[0107] The above-mentioned embodiments are only preferred embodiments given to fully illustrate the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or transformations made by those skilled in the art on the basis of the present invention are all within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.

Claims

1. A method for implementing a multi-scenario service PK component based on SSE, characterized in that Build a multi-scenario business PK component, which includes a business system access module, a PK competition configuration module, an SSE real-time data push module, a user matching module, and a data statistics module. Provide a standardized API interface through the business system access module for seamless access of external business systems to the PK component, and configure the interface information of the business system to initialize business data after user matching and synchronize user competition data in real time. Configure user-defined PK parameters through the PK competition configuration module. The user-defined PK parameters include PK mode, start and end times, duration of each game, and also select the business systems adapted in the business system access module and configure PK rules according to different scenarios. Push data in real time during the PK process through the SSE real-time data push module to ensure that users receive dynamic information of their opponents in real time during the PK process. The user matching module performs user PK matching according to the PK mode: Formulate matching rules: Match based on whether the user participates in the competition through sharing, the region where the unit is located, and unit information; or adopt a priority strategy, first pair according to sharing participation in the competition, and then match in the order of cross-region and cross-unit. Select a matching queue: After user U1 initiates a PK request, first traverse and match in the matching queue Q1. If no opponent is found in queue Q1, push user U1 into the matching queue Q1 and wait for an opponent to join; if user U1 participates in the competition based on the PK connection shared by user U2, then U1 and U2 are directly paired successfully. Perform event session binding: After successful matching, automatically generate a PK room H1, and notify both users of successful pairing through the SSE protocol. The users then enter the game page; after the PK room H1 is created, call the business interface of the PK competition configuration to complete the initialization of the event session on the business system side. The business system returns the event session code B1, and bind the event session code B1 to the users in the current PK room H1 to form a binding relationship M1. Synchronize in-game data: Receive the request data of the user through the business system, make a judgment, generate a judgment result R1, and push the judgment result R1 to the PK component according to the agreed push topic T1. Provide statistical indicators and generate a leaderboard through the data statistics module for users to understand the game situation.

2. The implementation method of a multi-scenario service PK component based on SSE according to claim 1, characterized in that The interface information of the business system configured through the business system access module involves the following interfaces: Business event information loading interface: Call the interface to load the event code of the events configured in the business system for binding with the PK competition. Business initialization interface: Call the interface to implement the initialization of business data. The interface request parameters include: business event code, number of sessions, message push topic; the response parameters include at least the event session code. Message push interface: After submitting the business data to the business system, the business system calls the interface to push the processing result back to the PK component according to the agreed event push topic.

3. The implementation method of a multi-scenario service PK component based on SSE according to claim 1, characterized in that Configure user-defined PK parameters through the PK competition configuration module, including: Provide a graphical configuration interface to set PK parameters through the interface. The PK modes include: free PK, unit PK, city PK, share PK. Select the adapted business system in the business system access module, set the corresponding business competition code, and persist the configured PK competition parameters to the database.

4. The implementation method of a multi-scenario service PK component based on SSE according to claim 1, characterized in that During the PK process, real-time data is pushed through the SSE real-time data push module, including: Establish a connection: The client of the SSE real-time data push module sends an SSE connection request to the server through the HTTP protocol. The server of the SSE real-time data push module responds to the request, establishes a long connection, maintains the connection status, and binds the connection to the user to form a binding relationship M2. Push data: The PK component listens to the push topic T1, receives the judgment result R1, creates an SSE event, obtains the business code from the push result, determines the PK room according to the binding relationship M1, and pushes the judgment result to the client in JSON format according to the PK room.

5. The implementation method of a multi-scenario service PK component based on SSE according to claim 1, characterized in that Provide statistical metrics and generate a leaderboard through the data statistics module, including: Data collection: Real-time data stream collects PK data, including the total number of PKs, the number of online users, and PK scores. Data storage: Store PK data in a distributed database to support high-concurrency access. Data analysis: Generate statistical metrics through a computing engine and generate a leaderboard in three dimensions: individual, unit, and region.

6. A multi-scenario service PK component based on SSE, characterized in that The multi-scenario business PK component includes a business system access module, a PK competition configuration module, an SSE real-time data push module, a user matching module, and a data statistics module. The business system access module provides a standardized API interface for seamless access of external business systems to the PK component, and configures the interface information of the business system to initialize the business data after user matching and synchronize the user competition data in real time. The PK competition configuration module configures user-defined PK parameters. The user-defined PK parameters include PK mode, start and end time, duration of each game, also selects the adapted business system in the business system access module, and configures PK rules according to different scenarios. The SSE real-time data push module pushes data in real time during the PK process to ensure that users receive the dynamic information of their opponents in real time during the PK process. The user matching module performs user PK matching according to the PK mode: Formulate matching rules: Match based on whether the user participates in the competition through sharing, the region where the unit is located, and the unit information; or adopt a priority strategy, first pair according to sharing participation in the competition, and then match in the order of cross-region and cross-unit. Select the matching queue: After user U1 initiates a PK request, first traverse and match in the matching queue Q1. If no opponent is found in queue Q1, push user U1 into the matching queue Q1 and wait for the opponent to join; if user U1 participates in the competition based on the PK connection shared by user U2, then U1 and U2 are directly paired successfully. Perform event session binding: After successful matching, automatically generate a PK room H1, and notify both users of successful pairing through the SSE protocol. The users will then enter the competition page. After the creation of the PK room H1, call the business interface of the PK competition configuration to complete the initialization of the event session on the business system side. The business system returns the event session code B1, and bind the event session code B1 with the users in the current PK room H1 to form a binding relationship M1. Synchronize in-competition data: Receive the request data from the user through the business system, make a determination, generate a determination result R1, and push the determination result R1 to the PK component according to the agreed push topic T1. The data statistics module provides statistical metrics and generates a leaderboard for users to understand the competition situation.

7. The multi-scenario service PK component based on SSE according to claim 6, characterized in that The interface information of the business system configured by the business system access module involves the following interfaces: Business event information loading interface: Call the interface to load the event codes of the events configured in the business system for binding with the PK competition. Business initialization interface: Call the interface to implement the initialization of business data. The interface request parameters include: business event code, number of sessions, and message push topic. The response parameters include at least the event session code. Message push interface: After submitting the business data to the business system, the business system calls the interface to push the processing result to the PK component according to the agreed event push topic.

8. The multi-scenario service PK component based on SSE according to claim 6, characterized in that The PK competition configuration module configures user-defined PK parameters, including: Provide a graphical configuration interface to set PK parameters through the interface. The PK modes include: free PK, unit PK, city PK, and sharing PK. Select the business system adapted in the business system access module, set the corresponding business event code, and persist the configured PK competition parameters to the database.

9. The multi-scenario service PK component based on SSE according to claim 6, characterized in that The SSE real-time data push module pushes data in real time during the PK process, including: Establish a connection: The client of the SSE real-time data push module sends an SSE connection request to the server through the HTTP protocol. The server of the SSE real-time data push module responds to the request, establishes a long connection, maintains the connection status, and binds the connection with the user to form a binding relationship M2. Push data: The PK component listens to the push topic T1, receives the determination result R1, creates an SSE event, obtains the business code from the push result, determines the PK room according to the binding relationship M1, and pushes the determination result to the client in JSON format according to the PK room.

10. A multi-scenario service PK component based on SSE according to claim 6, characterized in that the data The statistics module provides statistical metrics and generates a leaderboard, including: Data collection: Real-time data stream collects PK data, including the total number of PKs, the number of online users, and PK scores. Data storage: Store the PK data in a distributed database to support high-concurrency access. Data analysis: Generate statistical metrics through a computing engine and generate a leaderboard in three dimensions: individual, unit, and region.