# US 2022/0294874 A1 · Method for reporting asynchronous data, electronic device and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0294874 A1
- Document ID: US20220294874A1
- Status: Published application
- Kind: A1
- Application number: 17/804,925
- Filed: 2022-06-01
- Published: 2022-09-15
- Earliest claimed: 2021-06-03
- Assignees: Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd.
- Applicants: Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd.
- Inventors: Qianpeng Yao
- Web page: https://patentgrep.com/patent/US20220294874A1

## CPC

- H04L 67/025: for remote control or remote monitoring of applications
- H04L 67/60: Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources (admission control or resource allocation H04L47/70)
- G06F 16/9566: {URL specific, e.g. using aliases, detecting broken or misspelled links}
- G06F 16/972: {Access to data in other repository systems, e.g. legacy data or dynamic Web page generation}
- H04L 67/02: based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for reporting asynchronous data and an electronic device are provided. The method includes: in response to satisfying a data reporting condition, calling a connection opening function for opening a Socket connection of a network resource, and generating a HypertextTransferProtocol (HTTP) request by the connection opening function, in which the HTTP request at least includes address information of a server and data to be reported; calling a writing function to write the HTTP request into an exclusive resource corresponding to the connection opening function, and sending the HTTP request to the server by the exclusive resource; and in response to that sending the HTTP request by the exclusive resource is completed, closing the exclusive resource by calling a close function, so as to stop receiving a feedback message of the HTTP request sent by the server, and terminate data reporting.

## Claims

### Claim 1

A method for reporting asynchronous data, comprising:
in response to satisfying a data reporting condition, calling a connection opening function for opening a Socket connection of a network resource, and generating a HypertextTransferProtocol (HTTP) request by the connection opening function, wherein the HTTP request at least comprises address information of a server and data to be reported;
writing the HTTP request into an exclusive resource corresponding to the connection opening function by calling a writing function, and sending the HTTP request to the server by the exclusive resource; and
in response to that sending the HTTP request by the exclusive resource is completed, closing the exclusive resource by calling a close function, so as to stop receiving a feedback message of the HTTP request sent by the server and terminate data reporting.

### Claim 2 (depends on 1)

The method according to claim 1, wherein calling the close function, comprises:
calling a sleep function to set a sleeping duration, wherein the sleeping duration is less than a transmission duration of the feedback message; and
in response to reaching the sleeping duration, calling the close function.

### Claim 3 (depends on 1)

The method according to claim 1, wherein generating the HTTP request by the connection opening function, comprises:
initializing the HTTP request based on the address information; and
generating the HTTP request by constructing header information of the initialized HTTP request based on the address information and the data to be reported.

### Claim 4 (depends on 1)

The method according to claim 1, wherein before calling the connection opening function for opening the Socket connection of the network resource, the method further comprises:
recording an execution position of a business logic when the data reporting condition is satisfied; and
in response to that the data reporting is completed, returning to the execution position of the business logic, and continuing executing subsequent process of the business logic.

### Claim 5 (depends on 2)

The method according to claim 2, wherein before calling the connection opening function for opening the Socket connection of the network resource, the method further comprises:
recording an execution position of a business logic when the data reporting condition is satisfied; and
in response to that the data reporting is completed, returning to the execution position of the business logic, and continuing executing subsequent process of the business logic.

### Claim 6 (depends on 3)

The method according to claim 3, wherein before calling the connection opening function for opening the Socket connection of the network resource, the method further comprises:
recording an execution position of a business logic when the data reporting condition is satisfied; and
in response to that the data reporting is completed, returning to the execution position of the business logic, and continuing executing subsequent process of the business logic.

### Claim 7 (depends on 4)

The method according to claim 4, wherein satisfying the data reporting condition comprises at least one of the following:
in response to a system time reaching a preset timing reporting time, determining that the data reporting condition is satisfied; and,
detecting a target event during execution of the business logic, and in response to the target event being detected, determining that the data reporting condition is satisfied.

### Claim 8 (depends on 1)

The method according to claim 1, wherein configuration information of the server comprises a configuration item configured to instruct the server to continue processing the HTTP request in response to detecting that a client is suspended.

### Claim 9

An electronic device, comprising:
a processor; and
a memory storing an executable program code; wherein,
when the processor runs a program corresponding to the executable program code, the processor is caused to perform a method for reporting asynchronous comprising:
in response to satisfying a data reporting condition, calling a connection opening function for opening a Socket connection of a network resource, and generating a HypertextTransferProtocol (HTTP) request by the connection opening function, wherein the HTTP request at least comprises address information of a server and data to be reported;
writing the HTTP request into an exclusive resource corresponding to the connection opening function by calling a writing function, and sending the HTTP request to the server by the exclusive resource; and
in response to that sending the HTTP request by the exclusive resource is completed, closing the exclusive resource by calling a close function, so as to stop receiving a feedback message of the HTTP request sent by the server and terminate data reporting.

### Claim 10 (depends on 9)

The device according to claim 9, wherein calling the close function, comprises:
calling a sleep function to set a sleeping duration, wherein the sleeping duration is less than a transmission duration of the feedback message; and
in response to reaching the sleeping duration, calling the close function.

### Claim 11 (depends on 9)

The device according to claim 9, wherein generating the HTTP request by the connection opening function, comprises:
initializing the HTTP request based on the address information; and
generating the HTTP request by constructing header information of the initialized HTTP request based on the address information and the data to be reported.

### Claim 12 (depends on 9)

The device according to claim 9, wherein before calling the connection opening function for opening the Socket connection of the network resource, the method further comprises:
recording an execution position of a business logic when the data reporting condition is satisfied; and
in response to that the data reporting is completed, returning to the execution position of the business logic, and continuing executing subsequent process of the business logic.

### Claim 13 (depends on 12)

The device according to claim 12, wherein satisfying the data reporting condition comprises at least one of the following:
in response to a system time reaching a preset timing reporting time, determining that the data reporting condition is satisfied; and,
detecting a target event during execution of the business logic, and in response to the target event being detected, determining that the data reporting condition is satisfied.

### Claim 14 (depends on 9)

The device according to claim 9, wherein configuration information of the server comprises a configuration item configured to instruct the server to continue processing the HTTP request in response to detecting that a client is suspended.

### Claim 15

A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor is caused to perform a method for reporting asynchronous data comprising:
in response to satisfying a data reporting condition, calling a connection opening function for opening a Socket connection of a network resource, and generating a HypertextTransferProtocol (HTTP) request by the connection opening function, wherein the HTTP request at least comprises address information of a server and data to be reported;
writing the HTTP request into an exclusive resource corresponding to the connection opening function by calling a writing function, and sending the HTTP request to the server by the exclusive resource; and
in response to that sending the HTTP request by the exclusive resource is completed, closing the exclusive resource by calling a close function, so as to stop receiving a feedback message of the HTTP request sent by the server and terminate data reporting.

### Claim 16 (depends on 15)

The storage medium according to claim 15, wherein calling the close function, comprises:
calling a sleep function to set a sleeping duration, wherein the sleeping duration is less than a transmission duration of the feedback message; and
in response to reaching the sleeping duration, calling the close function.

### Claim 17 (depends on 15)

The storage medium according to claim 15, wherein generating the HTTP request by the connection opening function, comprises:
initializing the HTTP request based on the address information; and
generating the HTTP request by constructing header information of the initialized HTTP request based on the address information and the data to be reported.

### Claim 18 (depends on 15)

The storage medium according to claim 15, wherein before calling the connection opening function for opening the Socket connection of the network resource, the method further comprises:
recording an execution position of a business logic when the data reporting condition is satisfied; and
in response to that the data reporting is completed, returning to the execution position of the business logic, and continuing executing subsequent process of the business logic.

### Claim 19 (depends on 18)

The storage medium according to claim 18, wherein satisfying the data reporting condition comprises at least one of the following:
in response to a system time reaching a preset timing reporting time, determining that the data reporting condition is satisfied; and,
detecting a target event during execution of the business logic, and in response to the target event being detected, determining that the data reporting condition is satisfied.

### Claim 20 (depends on 15)

The storage medium according to claim 15, wherein configuration information of the server comprises a configuration item configured to instruct the server to continue processing the HTTP request in response to detecting that a client is suspended.
